io.h 980 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #define EOF (-1)
  10. #define NBUF 512
  11. struct io{
  12. int fd;
  13. unsigned char *bufp, *ebuf, *strp;
  14. unsigned char buf[NBUF];
  15. };
  16. io *err;
  17. io *openfd(int), *openstr(void), *opencore(char *, int);
  18. int emptybuf(io*);
  19. void pchr(io*, int);
  20. int rchr(io*);
  21. int rutf(io*, char*, Rune*);
  22. void closeio(io*);
  23. void flush(io*);
  24. int fullbuf(io*, int);
  25. void pdec(io*, int);
  26. void poct(io*, unsigned);
  27. void pptr(io*, void*);
  28. void pquo(io*, char*);
  29. void pwrd(io*, char*);
  30. void pstr(io*, char*);
  31. void pcmd(io*, tree*);
  32. void pval(io*, word*);
  33. void pfnc(io*, thread*);
  34. void pfmt(io*, char*, ...);