File:  [Plan 9 NeXT] / lucent / sys / src / cmd / rc / io.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:01:01 2018 UTC (8 years, 1 month ago) by root
Branches: lucent, MAIN
CVS tags: plan9, HEAD
Plan 9 NeXT

#define	EOF	(-1)
#define	pchr(b, c) ((b)->bufp==(b)->ebuf?fullbuf((b), (c)):(*(b)->bufp++=(c)))
#define	rchr(b) ((b)->bufp==(b)->ebuf?emptybuf(b):(*(b)->bufp++&0xff))
#define	NBUF	512
typedef struct io io;
struct io{
	int fd;
	char *bufp, *ebuf, *strp, buf[NBUF];
};
io *err;
io *openfd(int), *openstr(void), *opencore(char *, int);
int emptybuf(io*);
void closeio(io*);
void flush(io*);
int fullbuf(io*, int);
void pdec(io*, long);
void poct(io*, ulong);
void phex(io*, long);
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*, ...);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.