aboutsummaryrefslogtreecommitdiffstats
path: root/network_cmds/route.tproj/gen_header.pl
blob: dfd9963dcdf183923288680414a76ea21ca9ef35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/local/bin/perl -n
# 
# Too run convert the keywords run the following command
#	gen_header.pl keywords > keywords.h

next if m/^#/;
next if m/^$/;
$line_no++;
chop;
$keyword = $_;
$upper = $keyword;
$upper =~ tr/a-z/A-Z/;

printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n", 
    $upper, $line_no, $keyword, $upper;