scanner.c

changeset 18
cae1294702aa
parent 16
bc9a0fefd892
child 20
43725438ac50
equal deleted inserted replaced
17:5f43f733cc12 18:cae1294702aa
10 #include "suffix_fnc.h" 10 #include "suffix_fnc.h"
11 11
12 int scanDirectory(DIR *dir, const int spaces, 12 int scanDirectory(DIR *dir, const int spaces,
13 char* currdir, settings_t* settings) { 13 char* currdir, settings_t* settings) {
14 DIR *subdir; 14 DIR *subdir;
15 char* subdirname;
16 struct dirent *entry; 15 struct dirent *entry;
17 int lines, digits, a; 16 int lines, a;
18 int lineSum = 0; 17 int lineSum = 0;
19 18
20 while ((entry = readdir(dir)) != NULL) { 19 while ((entry = readdir(dir)) != NULL) {
21 if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) { 20 if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) {
22 // Print occurence 21 // Print occurence

mercurial