fix total lines and total
This commit is contained in:
parent
0e4daea5cc
commit
f64fcb259d
1 changed files with 2 additions and 1 deletions
3
lcc.c
3
lcc.c
|
@ -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", "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;
|
||||
|
|
Loading…
Reference in a new issue