#ifndef TCC_IO_H # define TCC_IO_H 1 # include # define IO_BUF_SIZE 8192 typedef struct BufferedFile { uint8_t *buf_ptr; uint8_t *buf_end; int fd; struct BufferedFile *prev; int line_num; /** current line number - here to simplify code */ int line_ref; /** tcc -E: last printed line */ int ifndef_macro; /** #ifndef macro / #endif search */ int ifndef_macro_saved; /** saved ifndef_macro */ int *ifdef_stack_ptr; /** ifdef_stack value at the start of the file */ int include_next_index; /** next search path */ int prev_tok_flags; /** saved tok_flags */ char *filename[1024]; /** filename */ char *true_filename; /** filename not modified by # line directive */ unsigned char unget[4]; unsigned char buffer[1]; /** extra size for CH_EOB char */ } BufferedFile; # define CH_EOB '\\' /** end of buffer or '\0' char in file */ # define CH_EOF (-1) /** end of file */ #endif /* !TCC_IO_H */