summaryrefslogtreecommitdiff
path: root/src/runtime/c/gu/out.h
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-09-05 11:20:39 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-09-05 11:20:39 +0000
commit7c0bad50921365746ea362710015853a4879c0a7 (patch)
treeead13c32a5b2d8ed2968bcdc5b58e5e7eed79720 /src/runtime/c/gu/out.h
parent504341dfbafdcd858704350162bb7e233cf6daf2 (diff)
remove the read and write modules from libgu. this simplifies the i/o layer
Diffstat (limited to 'src/runtime/c/gu/out.h')
-rw-r--r--src/runtime/c/gu/out.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/runtime/c/gu/out.h b/src/runtime/c/gu/out.h
index df2638c72..103eb95a2 100644
--- a/src/runtime/c/gu/out.h
+++ b/src/runtime/c/gu/out.h
@@ -4,6 +4,7 @@
#include <gu/defs.h>
#include <gu/assert.h>
#include <gu/exn.h>
+#include <gu/ucs.h>
typedef struct GuOut GuOut;
@@ -27,10 +28,6 @@ struct GuOut {
GuFinalizer fini;
};
-
-GuOut
-gu_init_out(GuOutStream* stream);
-
GuOut*
gu_new_out(GuOutStream* stream, GuPool* pool);
@@ -40,9 +37,6 @@ gu_out_is_buffered(GuOut* out)
return !!out->stream->begin_buf;
}
-GuOutStream*
-gu_out_proxy_stream(GuOut* out, GuPool* pool);
-
GuOut*
gu_new_buffered_out(GuOut* out, size_t buf_sz, GuPool* pool);
@@ -163,4 +157,20 @@ gu_out_f64le(GuOut* out, double d, GuExn* err);
void
gu_out_f64be(GuOut* out, double d, GuExn* err);
+inline void
+gu_putc(char c, GuOut* out, GuExn* err)
+{
+ GuUCS ucs = gu_char_ucs(c);
+ gu_out_u8(out, (uint8_t) ucs, err);
+}
+
+void
+gu_puts(const char* str, GuOut* out, GuExn* err);
+
+void
+gu_vprintf(const char* fmt, va_list args, GuOut* out, GuExn* err);
+
+void
+gu_printf(GuOut* out, GuExn* err, const char* fmt, ...);
+
#endif // GU_OUT_H_