Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
718 | jacekm | 1 | /* |
2 | ** STDIO.H -- Standard Small C Definitions. |
||
3 | */ |
||
4 | |||
5 | extern char _iob[]; |
||
6 | |||
7 | #define exit OS_exit |
||
8 | #define fopen OS_fopen |
||
9 | #define fgetc OS_fgetc |
||
10 | #define fputc OS_fputc |
||
11 | #define fclose OS_fclose |
||
12 | #define calloc OS_calloc // stdlib.h |
||
13 | |||
14 | #define SIZEOF_FILE 32 // sizeof (FILE) |
||
15 | |||
16 | #define stdin (&_iob[0]) |
||
17 | #define stdout (&_iob[1*SIZEOF_FILE]) |
||
18 | #define stderr (&_iob[2*SIZEOF_FILE]) |
||
19 | |||
20 | #define stdaux 3 /* file descriptor for standard auxiliary port */ |
||
21 | #define stdprn 4 /* file descriptor for standard printer */ |
||
22 | #define FILE char /* supports "FILE *fp;" declarations */ |
||
23 | #define ERR (-2) /* return value for errors */ |
||
24 | #define EOF (-1) /* return value for end-of-file */ |
||
25 | #define YES 1 /* true */ |
||
26 | #define NO 0 /* false */ |
||
27 | #define NULL 0 /* zero */ |
||
28 | #define CR 13 /* ASCII carriage return */ |
||
29 | #define LF 10 /* ASCII line feed */ |
||
30 | #define BELL 7 /* ASCII bell */ |
||
31 | #define SPACE ' ' /* ASCII space */ |
||
32 | #define NEWLINE LF /* Small C newline character */ |
||
33 |