blob: 965f48121c5dd539757d178a9dc56b2442b14ce2 [file] [log] [blame]
# Generate keyword tables from ledman.h.
my @cmds;
my @leds;
while (<>) {
if (/^#define\s+LEDMAN_CMD_([A-Z0-9_]+)/) {
push @cmds, $1;
} elsif (@cmds || /LEDMAN_MAX/) {
next;
} elsif (/^#define\s+LEDMAN_([A-Z0-9_]+)/) {
push @leds, $1;
}
}
print " { \"$_\", LEDMAN_$_ },\n"
foreach (@leds);