Data Fields | |
| bool | isInit |
| Field to tell us if a BitC STDIO stream has been properly initialized. | |
| FILE * | f |
BitC heap structure that acts as a proxy for C library streams.
Definition at line 45 of file stdio.c.
| FILE* ty_bitc_stdioStream::f |
Field to tell us if a BitC STDIO stream has been properly initialized.
The need for the isInit field is moderately irritating. It arises entirely because the C standard does not require stdin, stdout, and stderr to be implemented as variables whose address can be taken. The result is that we cannot just use the linker to take the address of the corresponding libc structures.
For the moment, we "solve" this by calling a fixup routine at the front of every read/write call. A more efficient approach would be to call a BitC-specific stdio initializer routine from main().
Definition at line 59 of file stdio.c.
Referenced by DEFUN(), and fix_stdio_stream().
1.4.7