# Read body of input file.
while (<INPUTFILE>) {
- s/#.*$//; # remove comments
+ # Skip comments and empty lines.
+ next if /^\s*$/ || /^\#/;
+
if (s/^(-?\d+)\s+//) {
my $lineNum = $1;
my $CC = line_to_CC($_);
# Assume that a "fn=" line is followed by a "fl=" line.
$currFileFuncName = undef;
- } elsif (s/^\s*$//) {
- # blank, do nothing
-
} elsif (s/^summary:\s+//) {
$summary_CC = line_to_CC($_);
(scalar(@$summary_CC) == @events)
# Read header
while(<INPUTFILE>) {
- # remove comments
- s/#.*$//;
-
- if (/^$/) { ; }
+ # Skip comments and empty lines.
+ if (/^\s*$/ || /^\#/) { ; }
elsif (/^version:\s*(\d+)/) {
# Can't read format with major version > 1
# Read body of input file.
while (<INPUTFILE>) {
+ # Skip comments and empty lines.
+ next if /^\s*$/ || /^\#/;
+
$prev_line_num = $curr_line_num;
- s/#.*$//; # remove comments
s/^\+(\d+)/$prev_line_num+$1/e;
s/^\-(\d+)/$prev_line_num-$1/e;
s/^\*/$prev_line_num/e;
$curr_fn_CC = $fn_totals{$curr_name};
$curr_fn_CC = [] unless (defined $curr_fn_CC);
- } elsif (s/^\s*$//) {
- # blank, do nothing
-
} elsif (s/^cob=(.*)$//) {
$curr_cobj = uncompressed_name("ob",$1);