projects
/
x300-pci
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix highlight of pins with custom description
[x300-pci]
/
gpio.pl
diff --git
a/gpio.pl
b/gpio.pl
index
078e63f
..
d4d9e3a
100755
(executable)
--- a/
gpio.pl
+++ b/
gpio.pl
@@
-64,20
+64,27
@@
foreach (@gpio) {
$mode->{ $l[11] } = [ $l[12], $l[13] ] if $l[13];
#warn "## l = ",dump(@l) if $i > 2 && $i < 5;
}
$mode->{ $l[11] } = [ $l[12], $l[13] ] if $l[13];
#warn "## l = ",dump(@l) if $i > 2 && $i < 5;
}
-
+
+
+ $line = join('|', @l);
+ $line .= "|" unless $line =~ m/\+$/;
+
if ( $last[$i] && $line ne $last[$i] ) {
if ( $last[$i] && $line ne $last[$i] ) {
+ $last[$i] = $line; # save before highlight
foreach my $i ( 0 .. $#l ) {
$l[$i] = "\e[33;7;1m$l[$i]\e[0m" if $l[$i] ne $o[$i];
}
foreach my $i ( 0 .. $#l ) {
$l[$i] = "\e[33;7;1m$l[$i]\e[0m" if $l[$i] ne $o[$i];
}
+ $line = join('|', @l);
+ $line .= "|" unless $line =~ m/\+$/;
+ } else {
+ $last[$i] = $line;
}
}
- $last[$i] = $line;
+
$i++;
# re-create from modified data
$i++;
# re-create from modified data
- $line = join('|', @l);
- $line .= "|" unless $line =~ m/\+$/;
print "$line\n";
}
print "$line\n";
}