X-Git-Url: http://git.rot13.org/?p=linux-gpio-pinout;a=blobdiff_plain;f=gpio.pl;h=aa7ebb61bfe104d948dc16f46630c8aeaedab4be;hp=4b68965b8bb2ede71b420f57cea6ca89e279bad4;hb=9ecb56dc075f414399d981af0bf0e90cf4a1bcff;hpb=3d70ad085bf632e3718da08e423e83acf2d3e86e diff --git a/gpio.pl b/gpio.pl index 4b68965..aa7ebb6 100755 --- a/gpio.pl +++ b/gpio.pl @@ -78,9 +78,7 @@ while() { die "add pin definition for # $model" unless $pins; -shift(@lines) while ( ! $lines[0] ); # remove empty at beginning -pop(@lines) while ( ! $lines[-1] ); # remove empty at end - +#warn "# lines ",dump( \@lines ); warn "# pins ",dump($pins); my $serial_tty; @@ -129,6 +127,10 @@ warn "# pin_function = ",dump($pin_function); my @max_len = ( 0,0,0,0 ); my @line_parts; + +shift(@lines) while ( ! $lines[0] ); # remove empty at beginning +pop(@lines) while ( ! $lines[-1] ); # remove empty at end + foreach my $line (@lines) { if ( $line =~ m/^#/ ) { push @line_parts, [ $line ] unless $opt_svg && $line =~ m/^###+/; # SVG doesn't display 3rd level comments