diff options
| author | grischka <grischka> | 2010-11-25 13:29:15 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2010-11-25 13:29:15 +0100 |
| commit | e97bf88badfd72676ebdba0b6027370edfb2e584 (patch) | |
| tree | 2d7428aabda476e8e65cdd78a7c62fa1ae843ea4 /tcc.h | |
| parent | f1c9f649da5b852929e537101edbbaabe99cb90c (diff) | |
| download | tinycc-e97bf88badfd72676ebdba0b6027370edfb2e584.tar.gz tinycc-e97bf88badfd72676ebdba0b6027370edfb2e584.tar.bz2 | |
libtcc: new function tcc_open_bf to create BufferedFile
Use it in:
- tcc_open
- tcc_compile_string
- tcc_define_symbol
- tcc_assemble_inline
Diffstat (limited to 'tcc.h')
| -rw-r--r-- | tcc.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -334,6 +334,7 @@ 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 ifndef_macro; /* #ifndef macro / #endif search */ int ifndef_macro_saved; /* saved ifndef_macro */ @@ -946,8 +947,10 @@ ST_INLN Sym *struct_find(int v); ST_INLN Sym *sym_find(int v); ST_FUNC Sym *global_identifier_push(int v, int t, int c); -ST_FUNC BufferedFile *tcc_open(TCCState *s1, const char *filename); -ST_FUNC void tcc_close(BufferedFile *bf); +ST_FUNC void tcc_open_bf(TCCState *s1, const char *filename, int initlen); +ST_FUNC int tcc_open(TCCState *s1, const char *filename); +ST_FUNC void tcc_close(void); + ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags); ST_FUNC int tcc_add_dll(TCCState *s, const char *filename, int flags); PUB_FUNC int tcc_set_flag(TCCState *s, const char *flag_name, int value); |
