ignore # and . files when searching for source files
This commit is contained in:
1 parent
eef931a567
commit
0605c85169
1 file changed
+8
-7
+8
-7
@@ -91,14 +91,15 @@ int main(int argc,char **argv)
|
||||
if (!d) DO_ERROR("opendir() failed");
|
||||
while((de=readdir(d))!=NULL) {
|
||||
if (strlen(de->d_name)>2) {
|
||||
if (!strcmp(&de->d_name[strlen(de->d_name)-2],".s")) {
|
||||
if (strcmp(de->d_name,"combined.s")) {
|
||||
if (source_count>=MAX_FILES) DO_ERROR("Too many source files. Increase MAX_FILES?");
|
||||
source_files[source_count].file=strdup(de->d_name);
|
||||
source_files[source_count].address=-1;
|
||||
source_count++;
|
||||
if (de->d_name[0]!='.'&&de->d_name[0]!='#') // ignore temp files etc
|
||||
if (!strcmp(&de->d_name[strlen(de->d_name)-2],".s")) {
|
||||
if (strcmp(de->d_name,"combined.s")) {
|
||||
if (source_count>=MAX_FILES) DO_ERROR("Too many source files. Increase MAX_FILES?");
|
||||
source_files[source_count].file=strdup(de->d_name);
|
||||
source_files[source_count].address=-1;
|
||||
source_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (retVal) break;
|
||||
|
||||
Reference in new issue
Block a user