[project @ 2003-11-17 14:41:58 by simonmar]
[ghc-hetmet.git] / ghc / compiler / count_lines
index 3ede63d..43ca79e 100644 (file)
@@ -38,7 +38,7 @@ foreach $f ( @ARGV ) {
     } else {
        print STDERR "not counted in a directory: $f\n";
        $ModCount{$f} += $cnt;
-       $ModComments{$mod} += $comments;
+       $ModComments{$f} += $comments;
     }
 }
 
@@ -54,6 +54,7 @@ printf "\n%-20s %6d %6d\n\n\n", 'TOTAL:', $tot, $totcmts;
 
 $tot = 0;
 $totcmts = 0;
+printf "\n                      Code  Comments\n";
 foreach $m (sort (keys %ModCount)) {
     printf "%-20s %6d %6d\n", $m, $ModCount{$m}, $ModComments{$m};
     $tot += $ModCount{$m};