Skip to content

Commit eaff335

Browse files
authored
LexaCount v1.2 - Table header displaying incorrectly with list from a file enabled
1 parent c9a048d commit eaff335

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lexacount.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
LexaCount simplifies the process of analyzing and understanding the structure
66
of source code in software projects. It provides various options to adapt to
77
different needs, such as excluding lines with only brackets or using table output.
8-
8+
99
Copyright (c) 2024 anic17 Software
1010
1111
This program is free software: you can redistribute it and/or modify
@@ -96,7 +96,7 @@ size_t count_loc(char *filename, char **comments, char *quotes, char *brackets,
9696

9797
while ((chr = fgetc(count_fp)) != EOF)
9898
{
99-
99+
100100
isFileEmpty = false;
101101
if (is_quote(quotes, qlen, chr))
102102
{
@@ -369,7 +369,8 @@ int main(int argc, char *argv[])
369369
fprintf(stderr, "%s: %s", loc_file, strerror(errno));
370370
return errno;
371371
}
372-
print_table_separator(longest_fname, excludeBrackets);
372+
if (tableOutput)
373+
print_table_separator(longest_fname, excludeBrackets);
373374

374375
while (fgets(filename, sizeof filename, list))
375376
{

lexacount.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
#define is_bracket is_quote
2929

30-
const char lexacount_version[] = "1.1";
30+
const char lexacount_version[] = "1.2";
31+
3132

3233
int is_quote(char *quotes_str, size_t qlen, int chr);
3334
void show_version();

0 commit comments

Comments
 (0)