X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fcount_lines;h=43ca79e68a51ca00dc104606d6428a75a31ea05d;hb=374bc02f5feb4f5bf709d0a04d15ce28ec71eef1;hp=cbf6503b360727f5b77afee224fc349fd45ca7ec;hpb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;p=ghc-hetmet.git diff --git a/ghc/compiler/count_lines b/ghc/compiler/count_lines index cbf6503..43ca79e 100644 --- a/ghc/compiler/count_lines +++ b/ghc/compiler/count_lines @@ -1,4 +1,4 @@ -#! /usr/local/bin/perl +#! /usr/bin/perl # %DirCount = (); %ModCount = (); @@ -8,7 +8,7 @@ foreach $f ( @ARGV ) { if ( $f =~ /\.lhs$/ ) { - open(INF, "unlit $f - |") || die "Couldn't unlit $f!\n"; + open(INF, "../utils/unlit/unlit $f - |") || die "Couldn't unlit $f!\n"; } else { open(INF, "< $f") || die "Couldn't open $f!\n"; } @@ -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};