aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2016-10-01 20:46:16 +0200
committergrischka <grischka>2016-10-01 20:46:16 +0200
commitacac35c12597eb678c4a0866f79a6aeb9171dd09 (patch)
tree818fe5dd98e2ae339aac1167766d9e52bd0fd9bd /tcc.c
parent8637c1d0ad08d28052efc1de5c38b63acd2c08fc (diff)
downloadtinycc-acac35c12597eb678c4a0866f79a6aeb9171dd09.tar.gz
tinycc-acac35c12597eb678c4a0866f79a6aeb9171dd09.tar.bz2
libtcc: filetype cleanup
- does not change signature of tcc_add_file
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tcc.c b/tcc.c
index 730e1e4..0e516d1 100644
--- a/tcc.c
+++ b/tcc.c
@@ -311,14 +311,16 @@ int main(int argc, char **argv)
/* compile or add each files or library */
for(i = ret = 0; i < s->nb_files && ret == 0; i++) {
struct filespec *f = s->files[i];
- if (f->type == 'l') {
+ if (f->type == AFF_TYPE_LIB) {
if (tcc_add_library_err(s, f->name) < 0)
ret = 1;
} else {
if (1 == s->verbose)
printf("-> %s\n", f->name);
- if (tcc_add_file(s, f->name, f->type) < 0)
+ s->filetype = f->type;
+ if (tcc_add_file(s, f->name) < 0)
ret = 1;
+ s->filetype = AFF_TYPE_NONE;
if (!first_file)
first_file = f->name;
}