summaryrefslogtreecommitdiff
path: root/src/user/lib/fwik/include/IO/IOStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/fwik/include/IO/IOStream.h')
-rw-r--r--src/user/lib/fwik/include/IO/IOStream.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/user/lib/fwik/include/IO/IOStream.h b/src/user/lib/fwik/include/IO/IOStream.h
new file mode 100644
index 0000000..e9ae246
--- /dev/null
+++ b/src/user/lib/fwik/include/IO/IOStream.h
@@ -0,0 +1,33 @@
+#ifndef DEF_FWIK_IO_IOSTREAM_H
+#define DEF_FWIK_IO_IOSTREAM_H
+
+#include "Term.h"
+
+class IOStream {
+ public:
+ Term *term;
+
+ IOStream() : term(0) {}
+ IOStream(Term *t) : term(t) {}
+
+ void print(char* str);
+ void printf(char* fmt, ...);
+ char* readln();
+
+ IOStream &operator<<(char* s) {
+ print(s);
+ return *this;
+ }
+ IOStream &operator<<(int i) {
+ printf("%d", i);
+ return *this;
+ }
+ IOStream &operator<<(void* p) {
+ printf("%p", p);
+ return *this;
+ }
+};
+
+extern IOStream stdio;
+
+#endif