From 9ecb56dc075f414399d981af0bf0e90cf4a1bcff Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 14 Nov 2017 09:32:13 +0000 Subject: [PATCH] remove empty lines after kernel annotation --- gpio.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.20.1