fix total lines and total

This commit is contained in:
Night Kaly 2024-05-19 17:21:18 +01:00
parent 0e4daea5cc
commit f64fcb259d
Signed by: night0721
GPG key ID: 957D67B8DB7A119B

3
lcc.c
View file

@ -166,7 +166,8 @@ int main(int argc, char **argv)
printf("%-10s %-6d %-6d %-8d %-6d %-6d\n", stats[i].name, stats[i].files, code_lines, stats[i].comments, stats[i].blanks, stats[i].lines); printf("%-10s %-6d %-6d %-8d %-6d %-6d\n", stats[i].name, stats[i].files, code_lines, stats[i].comments, stats[i].blanks, stats[i].lines);
} }
} }
printf("%-10s %-6d %-6d %-8d %-6d %-6d\n", "Total", total_stats.files, total_stats.lines, total_stats.comments, total_stats.blanks, total_stats.lines); int total_code_lines = total_stats.lines - total_stats.blanks - total_stats.comments;
printf("%-10s %-6d %-6d %-8d %-6d %-6d\n", "Total", total_stats.files, total_code_lines, total_stats.comments, total_stats.blanks, total_stats.lines);
return 0; return 0;