From acac35c12597eb678c4a0866f79a6aeb9171dd09 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 1 Oct 2016 20:46:16 +0200 Subject: libtcc: filetype cleanup - does not change signature of tcc_add_file --- tcc.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index 5f504bd..d16fea8 100644 --- a/tcc.h +++ b/tcc.h @@ -755,6 +755,7 @@ struct TCCState { struct filespec **files; /* files seen on command line */ int nb_files; /* number thereof */ int nb_libraries; /* number of libs thereof */ + int filetype; char *outfile; /* output filename */ char *option_m; /* only -m32/-m64 handled */ int print_search_dirs; /* option */ @@ -1070,10 +1071,6 @@ ST_DATA int tcc_ext; /* XXX: get rid of this ASAP */ ST_DATA struct TCCState *tcc_state; -#define AFF_PRINT_ERROR 0x0001 /* print error if file not found */ -#define AFF_REFERENCED_DLL 0x0002 /* load a referenced dll from another dll */ -#define AFF_PREPROCESS 0x0004 /* preprocess file */ - /* public functions currently used by the tcc main function */ ST_FUNC char *pstrcpy(char *buf, int buf_size, const char *s); ST_FUNC char *pstrcat(char *buf, int buf_size, const char *s); @@ -1144,7 +1141,19 @@ 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, int filetype); +ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags); +/* flags: */ +#define AFF_PRINT_ERROR 0x10 /* print error if file not found */ +#define AFF_REFERENCED_DLL 0x20 /* load a referenced dll from another dll */ +#define AFF_PREPROCESS 0x40 /* preprocess file */ +/* combined with: */ +#define AFF_TYPE_NONE 0 +#define AFF_TYPE_C 1 +#define AFF_TYPE_ASM 2 +#define AFF_TYPE_ASMPP 3 +#define AFF_TYPE_BIN 4 +#define AFF_TYPE_LIB 5 + ST_FUNC int tcc_add_crt(TCCState *s, const char *filename); #ifndef TCC_TARGET_PE -- cgit v1.3.1