42 continue; |
42 continue; |
43 } |
43 } |
44 |
44 |
45 // Count lines |
45 // Count lines |
46 lines = 0; |
46 lines = 0; |
47 /* char filename[(1+strlen(currdir)+strlen(entry->d_name))]; |
|
48 strcpy(filename, currdir); |
|
49 strncat(filename, &settings->fileSeparator, 1); |
|
50 strcat(filename, entry->d_name); */ |
|
51 if (testSuffix(filename, settings)) { |
47 if (testSuffix(filename, settings)) { |
52 FILE *file = fopen(filename, "r"); |
48 FILE *file = fopen(filename, "r"); |
53 if (file == NULL) { |
49 if (file == NULL) { |
54 perror(" File acces failed"); |
50 perror(" File acces failed"); |
55 continue; |
51 continue; |
70 #else |
66 #else |
71 printf("%-60s%14d lines\n", entryname, lines); |
67 printf("%-60s%14d lines\n", entryname, lines); |
72 #endif /* _WIN32 */ |
68 #endif /* _WIN32 */ |
73 |
69 |
74 lineSum += lines; |
70 lineSum += lines; |
75 } |
71 } else { |
76 else { |
|
77 if (!settings->matchesOnly) { |
72 if (!settings->matchesOnly) { |
78 // Print hint |
73 // Print hint |
79 #ifdef _WIN32 |
74 #ifdef _WIN32 |
80 printf("%-60s%19s\n", entryname, "no match"); |
75 printf("%-60s%19s\n", entryname, "no match"); |
81 #else |
76 #else |