From deec94b04b65203e689120e90601b53798fea8e1 Mon Sep 17 00:00:00 2001 From: night0721 Date: Sun, 19 May 2024 01:49:57 +0100 Subject: [PATCH] edit readme and change comment style --- README.md | 18 ++++++++++++++++++ lcc.c | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 013dbf2..8b2caf0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,24 @@ Lines of Code Counter +# Usage +```sh +lcc ... +``` + +# Dependencies + +- gcc + +# Building + +You will need to run these with elevated privilages. + +```sh +$ make +# make install +``` + # Contributions Contributions are welcomed, feel free to open a pull request. diff --git a/lcc.c b/lcc.c index e24e0a8..dab7a28 100644 --- a/lcc.c +++ b/lcc.c @@ -38,7 +38,7 @@ void count_lines(const char *filename, language *lang, lang_stats *stat) stat->lines++; total_stats.lines++; char *line = buffer; - while (isspace(*line)) line++; // Skip leading whitespace + while (isspace(*line)) line++; /* Skip leading whitespace */ if (*line == '\0') { stat->blanks++;