($alias,$comment) = ($1,$2);
} elsif (m/^\#/) {
next; # future extension
- } elsif (m/^([^#: ])\: [^#]* (\#.*)$/) {
+ } elsif (m/^([^#: ]+)\: [^#]* (\#.*)$/) {
($alias,$comment) = ($1,$2);
} else {
die "generator output $_ ?";
badusage "invalid arguments to list";
my $num = $min_number;
$num ||= 0;
- while ($num <= $#by_number) {
+ for (; $num <= $#by_number; $num++) {
my $alias = $by_number[$num];
report $alias if $alias;
+ $num++;
}
}
or badusage "comment pattern must start with \`#'";
$comment_re = $comment_pattern;
$comment_re =~ s/\W/\\$&/g;
-($comment_re =~ s'\\<number\\>'([1-9]\d{0,8})'g) == 1 #'
+($comment_re =~ s'\\<number\\>'(0|[1-9]\d{0,8})'g) == 1 #'
or badusage "comment pattern (\`$comment_pattern')".
" must contain \`<number>' exactly once";