libtcc: filetype cleanup
- does not change signature of tcc_add_file
This commit is contained in:
6
tcc.c
6
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user