|
|
1.1 root 1: #ifdef V10
2: #define _IO_CHMASK 0xff
3: #include <stdio.h>
4: #include <sys/types.h>
5: #include <fcntl.h>
6: #ifdef sgi
7: #include <stdarg.h>
8: #define _IOSTRG _IOEOF
9: #else
10: #define _IOREAD 01
11: #define _IOWRT 02
12: #define _IOSTRG 0100
13: #endif
14: #else
15: /*
16: * pANS stdio -- definitions
17: * The following names are defined in the pANS:
18: * FILE fpos_t _IOFBF _IOLBF _IONBF
19: * BUFSIZ EOF FOPEN_MAX FILENAME_MAX L_tmpnam
20: * SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr
21: * stdin stdout remove rename tmpfile
22: * tmpnam fclose fflush fopen freopen
23: * setbuf setvbuf fprintf fscanf printf
24: * scanf sprintf sscanf vfprintf vprintf
25: * vsprintf fgetc fgets fputc fputs
26: * getc getchar gets putc putchar
27: * puts ungetc fread fwrite fgetpos
28: * fseek fsetpos ftell rewind clearerr
29: * feof ferror perror
30: */
31: #define _POSIX_SOURCE
32: #include <stdio.h>
33: #include <stdlib.h>
34: #include <sys/types.h>
35: #include <unistd.h>
36: #include <fcntl.h>
37:
38: /*
39: * Flag bits
40: */
41: #define BALLOC 1 /* did stdio malloc fd->buf? */
42: #define LINEBUF 2 /* is stream line buffered? */
43: #define STRING 4 /* output to string, instead of file */
44: #define APPEND 8 /* append mode output */
45: /*
46: * States
47: */
48: #define CLOSED 0 /* file not open */
49: #define OPEN 1 /* file open, but no I/O buffer allocated yet */
50: #define RDWR 2 /* open, buffer allocated, ok to read or write */
51: #define RD 3 /* open, buffer allocated, ok to read but not write */
52: #define WR 4 /* open, buffer allocated, ok to write but not read */
53: #define ERR 5 /* open, but an uncleared error occurred */
54: #define END 6 /* open, but at eof */
55: char *strerror(int errno);
56: int _IO_setvbuf(FILE *);
57: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.