xref: /plan9/sys/src/cmd/rc/io.h (revision f9e1cf08d3be51592e03e639fc848a68dc31a55e)
1 #define	EOF	(-1)
2 #define	NBUF	512
3 
4 struct io{
5 	int	fd;
6 	uchar	*bufp, *ebuf, *strp;
7 	uchar	buf[NBUF];
8 };
9 io *err;
10 
11 io *openfd(int), *openstr(void), *opencore(char *, int);
12 int emptybuf(io*);
13 void pchr(io*, int);
14 int rchr(io*);
15 void closeio(io*);
16 void flush(io*);
17 int fullbuf(io*, int);
18 void pdec(io*, int);
19 void poct(io*, unsigned);
20 void pptr(io*, void*);
21 void pquo(io*, char*);
22 void pwrd(io*, char*);
23 void pstr(io*, char*);
24 void pcmd(io*, tree*);
25 void pval(io*, word*);
26 void pfnc(io*, thread*);
27 void pfmt(io*, char*, ...);
28