diff --git a/README.md b/README.md index 8b2caf0..5dbd6a0 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,16 @@ $ make # make install ``` +# Customizing + +You can modify `lcc.h` to add more languages to count lines, with the same format as provided in the file. + +You can also add directories name and file extensions to ignore when counting lines, but the length of `ignore_dir` must be matching `IGNORE_DIRS`. + +# Warning + +Result may not be 100% correct due to coding style, but from testing, code with [suckless coding style](https://suckless.org/coding_style) will be most accurate due to different method of commenting in code. + # Contributions Contributions are welcomed, feel free to open a pull request. diff --git a/lcc.c b/lcc.c index cc7daba..43f38ac 100644 --- a/lcc.c +++ b/lcc.c @@ -93,7 +93,7 @@ void process_directory(const char *dirname) for (int i = 0; i < IGNORE_DIRS; i++) { if (strstr(entry->d_name, ignore_dir[i]) != NULL) { skip = 1; - continue; + break; } } if (skip) continue;