]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/dash/contrib/src/output.h
Update
[l4.git] / l4 / pkg / dash / contrib / src / output.h
index 36f9a3c9be5194be6c9210b0166b8da417b9138d..f853e9df65c12393a49ce1cfd1e2f00eb683e024 100644 (file)
@@ -88,7 +88,7 @@ int __closememout(void);
 #endif
 
 static inline void
-freestdout(void)
+freestdout()
 {
        output.nextc = output.buf;
        output.flags = 0;
@@ -97,10 +97,21 @@ freestdout(void)
 #define OUTPUT_ERR 01          /* error occurred on output */
 
 #ifdef USE_GLIBC_STDIO
-#define outc(c, o)     putc((c), (o)->stream)
+static inline void outc(int ch, struct output *file)
+{
+       putc(ch, file->stream);
+}
 #define doformat(d, f, a)      vfprintf((d)->stream, (f), (a))
 #else
-#define outc(c, file)  ((file)->nextc == (file)->end ? outcslow((c), (file)) : (*(file)->nextc = (c), (file)->nextc++))
+static inline void outc(int ch, struct output *file)
+{
+       if (file->nextc == file->end)
+               outcslow(ch, file);
+       else {
+               *file->nextc = ch;
+               file->nextc++;
+       }
+}
 #endif
 #define out1c(c)       outc((c), out1)
 #define out2c(c)       outcslow((c), out2)