summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-12-14 13:56:22 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-12-15 15:55:46 +0000
commit3d7e772f71ea4f19d366b9e866f69b4339d22e22 (patch)
treeefd27a76049060c8334ed4ef41714cf31509e781
parent9bae79159d3cb5cbb6491711341aa9b07d703ae6 (diff)
downloadhaskell-3d7e772f71ea4f19d366b9e866f69b4339d22e22.tar.gz
Fix a path, and strip out C++ comments too
-rw-r--r--utils/count_lines/count_lines.lprl3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/count_lines/count_lines.lprl b/utils/count_lines/count_lines.lprl
index 50205ee796..bfaad51804 100644
--- a/utils/count_lines/count_lines.lprl
+++ b/utils/count_lines/count_lines.lprl
@@ -14,7 +14,7 @@ my $binPath = $FindBin::Bin;
foreach $f ( @ARGV ) {
if ( $f =~ /\.lhs$/ ) {
- open(INF, "$binPath/../../inplace/lib/unlit $f - |") || die "Couldn't unlit $f!\n";
+ open(INF, "$binPath/../../../inplace/lib/unlit $f - |") || die "Couldn't unlit $f!\n";
} else {
open(INF, "< $f") || die "Couldn't open $f!\n";
}
@@ -22,6 +22,7 @@ foreach $f ( @ARGV ) {
while (<INF>) {
s/--.*//;
s/{-.*-}//;
+ s/\/\/.*//;
next if /^\s*$/;
$cnt++;
}