aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/io.h
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-10-13 09:08:59 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-10-13 09:08:59 -0700
commit2ade60747db41771498ab2b85ce6e3c3389f2c26 (patch)
tree302927100158a1b50954e5ca4cb5c564bf19beec /sys/cmd/rc/io.h
parentd1a19f0d477a6249d8af9322317b8434b86260ea (diff)
feat(rc): added unix port of rc with linenoise
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*, ...);