151 while (finder != NULL) { |
151 while (finder != NULL) { |
152 add_string(settings->suffixList, finder); |
152 add_string(settings->suffixList, finder); |
153 finder = strtok(NULL, ","); |
153 finder = strtok(NULL, ","); |
154 } |
154 } |
155 |
155 |
156 /* Open directory */ |
|
157 DIR *dir = opendir(directory); |
|
158 if (dir == NULL) { |
|
159 perror("Operation failed"); |
|
160 destroy_settings_t(settings); |
|
161 return 1; |
|
162 } |
|
163 |
|
164 /* Scan directory */ |
156 /* Scan directory */ |
165 int lines = scanDirectory(dir, 0, directory, settings); |
157 int lines = scanDirectory((scanner_t){directory, 0}, settings); |
166 closedir(dir); |
|
167 destroy_settings_t(settings); |
158 destroy_settings_t(settings); |
168 |
159 |
169 /* Print double line and line count */ |
160 /* Print double line and line count */ |
170 for (int t = 0 ; t < 79 ; t++) { |
161 for (int t = 0 ; t < 79 ; t++) { |
171 printf("="); |
162 printf("="); |