2 * pANS stdio -- definitions
3 * The following names are defined in the pANS:
4 * FILE fpos_t _IOFBF _IOLBF _IONBF
5 * BUFSIZ EOF FOPEN_MAX FILENAME_MAX L_tmpnam
6 * SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr
7 * stdin stdout remove rename tmpfile
8 * tmpnam fclose fflush fopen freopen
9 * setbuf setvbuf fprintf fscanf printf
10 * scanf sprintf sscanf vfprintf vprintf
11 * vsprintf fgetc fgets fputc fputs
12 * getc getchar gets putc putchar
13 * puts ungetc fread fwrite fgetpos
14 * fseek fsetpos ftell rewind clearerr
17 * (But plan9 version omits remove and rename, because they are in libc)
26 #define BALLOC 1 /* did stdio malloc fd->buf? */
27 #define LINEBUF 2 /* is stream line buffered? */
28 #define STRING 4 /* output to string, instead of file */
29 #define APPEND 8 /* append mode output */
33 #define CLOSED 0 /* file not open */
34 #define OPEN 1 /* file open, but no I/O buffer allocated yet */
35 #define RDWR 2 /* open, buffer allocated, ok to read or write */
36 #define RD 3 /* open, buffer allocated, ok to read but not write */
37 #define WR 4 /* open, buffer allocated, ok to write but not read */
38 #define ERR 5 /* open, but an uncleared error occurred */
39 #define END 6 /* open, but at eof */
41 int _IO_setvbuf(FILE *);
43 /* half hearted attempt to make multi threaded */
44 extern QLock _stdiolk;