aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/rc/io.h')
-rw-r--r--sys/cmd/rc/io.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/cmd/rc/io.h b/sys/cmd/rc/io.h
new file mode 100644
index 0000000..dac8b48
--- /dev/null
+++ b/sys/cmd/rc/io.h
@@ -0,0 +1,26 @@
+#define EOF (-1)
+#define NBUF 512
+struct io{
+ int fd;
+ char *bufp, *ebuf, *strp, buf[NBUF];
+};
+
+extern struct io *err;
+
+io *openfd(int), *openstr(void), *opencore(char *, int);
+int emptybuf(io*);
+void pchr(io*, int);
+int rchr(io*);
+void closeio(io*);
+void flush(io*);
+int fullbuf(io*, int);
+void pdec(io*, int);
+void poct(io*, unsigned);
+void pptr(io*, void*);
+void pquo(io*, char*);
+void pwrd(io*, char*);
+void pstr(io*, char*);
+void pcmd(io*, tree*);
+void pval(io*, word*);
+void pfnc(io*, thread*);
+void pfmt(io*, char*, ...);