Skip to content

Commit

Permalink
correct line numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc committed Aug 10, 2007
1 parent 8139713 commit 8908cc9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runoff1
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ if($ARGV[0] eq "-n") {
}
$n = int(($n+49)/50)*50 - 1;

$file = $ARGV[0];
@lines = <>;
$linenum = 0;
foreach (@lines) {
$linenum++;
chomp;
s/\s+$//;
if(length() >= 75){
print "$ARGV[0]:$.: line too long";
print STDERR "$file:$linenum: line too long\n";
}
}
@outlines = ();
Expand Down

0 comments on commit 8908cc9

Please sign in to comment.