History

libtcc: cleanup -x<filetype> switch code

Abusing filename[0] as type is just too much of a hack. -- From 05364072042ff37904a7b0b14cdd85a1ea1ca11d

grischka committed 10 years ago

Commit 09a487e1 parent e6301134 files · +34 −39Browse files

Showing the changes to tcc.h (1 of 4 files). Show all

Unified · Split

tcc.h+5−1
@@ -850,7 +850,7 @@ struct TCCState { · 849 unmodified lines
850850 #endif
851851
852852 /* used by main and tcc_parse_args only */
853− char **files; /* files seen on command line */
853+ struct filespec **files; /* files seen on command line */
854854 int nb_files; /* number thereof */
855855 int nb_libraries; /* number of libs thereof */
856856 char *outfile; /* output filename */
@@ -863,6 +863,10 @@ struct TCCState { · 6 unmodified lines
863863 ParseArgsState *parse_args_state;
864864 };
865865
866+struct filespec {
867+ char type, name[1];
868+};
869+
866870 /* The current value can be: */
867871 #define VT_VALMASK 0x003f /* mask for value location, register or: */
868872 #define VT_CONST 0x0030 /* constant in vc (must be first non register value) */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t