From f2efbb46ef89c7c1693400f7209113c50c959f02 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Wed, 13 Oct 2021 10:51:54 -0700 Subject: Feat(rc): working(ish) version of rc shell Removed compile commands --- sys/cmd/rc/io.h | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'sys/cmd/rc/io.h') diff --git a/sys/cmd/rc/io.h b/sys/cmd/rc/io.h index dac8b48..5457735 100644 --- a/sys/cmd/rc/io.h +++ b/sys/cmd/rc/io.h @@ -1,26 +1,31 @@ -#define EOF (-1) -#define NBUF 512 -struct io{ - int fd; - char *bufp, *ebuf, *strp, buf[NBUF]; +#define EOF (-1) +#define NBUF 512 + +struct Io +{ + int fd; + char *bufp, *ebuf, *strp, buf[NBUF]; }; -extern struct io *err; +extern struct Io *err; + +Io *openfd(int); +Io *openstr(void); +Io *opencore(char *, int); -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*, ...); +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*, ...); -- cgit v1.2.1