From eacdc426d76a88aa9b6efc698106d3f36a774905 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 1 Oct 2016 20:19:37 +0200 Subject: libtcc: cleanup @listfile Also: - allow more than one item per line - respect "quoted items" and escaped quotes \" (also for LIBTCCAPI tcc_setoptions) - cleanup some copy & paste --- tcc.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index 42088e1..9567848 100644 --- a/tcc.h +++ b/tcc.h @@ -638,14 +638,6 @@ struct sym_attr { #endif }; -typedef struct ParseArgsState -{ - int run; - int pthread; - int filetype; - CString linker_arg; /* collect -Wl options for input such as "-Wl,-rpath -Wl," */ -} ParseArgsState; - #if !defined(MEM_DEBUG) #define tal_free(al, p) tal_free_impl(al, p) #define tal_realloc(al, p, size) tal_realloc_impl(&al, p, size) @@ -682,6 +674,7 @@ typedef struct tal_header_t { #endif } tal_header_t; + struct TCCState { int verbose; /* if true, display some information during compilation */ @@ -860,7 +853,10 @@ struct TCCState { int do_bench; /* option -bench */ int gen_deps; /* option -MD */ char *deps_outfile; /* option -MF */ - ParseArgsState *parse_args_state; + + int args_pthread; /* -pthread option */ + CString linker_arg; /* collect -Wl options for input such as "-Wl,-rpath -Wl," */ + int args_ref; /* tcc_parse_args recursive counter */ }; struct filespec { @@ -1312,8 +1308,6 @@ ST_FUNC void preprocess_delete(void); ST_FUNC int tcc_preprocess(TCCState *s1); ST_FUNC void skip(int c); ST_FUNC NORETURN void expect(const char *msg); -ST_FUNC char *trimfront(char *p); -ST_FUNC char *trimback(char *a, char *e); /* ------------ tccgen.c ------------ */ -- cgit v1.3.1