io.h - 9base - revived minimalist port of Plan 9 userland to Unix | |
git clone git://git.suckless.org/9base | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
io.h (646B) | |
--- | |
1 /* | |
2 * on Mac OS X, err is something else, | |
3 * and assigning to it causes a bus error. | |
4 * what a crappy linker. | |
5 */ | |
6 #define err rc_err | |
7 #define EOF (-1) | |
8 #define NBUF 512 | |
9 struct io{ | |
10 int fd; | |
11 char *bufp, *ebuf, *strp, buf[NBUF]; | |
12 }; | |
13 io *err; | |
14 io *openfd(int), *openstr(void), *opencore(char *, int); | |
15 int emptybuf(io*); | |
16 void pchr(io*, int); | |
17 int rchr(io*); | |
18 void closeio(io*); | |
19 void flush(io*); | |
20 int fullbuf(io*, int); | |
21 void pdec(io*, int); | |
22 void poct(io*, unsigned); | |
23 void pptr(io*, void*); | |
24 void pquo(io*, char*); | |
25 void pwrd(io*, char*); | |
26 void pstr(io*, char*); | |
27 void pcmd(io*, tree*); | |
28 void pval(io*, word*); | |
29 void pfnc(io*, thread*); | |
30 void pfmt(io*, char*, ...); |