]> git.cameronkatri.com Git - apple_cmds.git/blob - network_cmds/route.tproj/gen_header.pl
file_cmds: Fix install and COLORLS
[apple_cmds.git] / network_cmds / route.tproj / gen_header.pl
1 #!/usr/local/bin/perl -n
2 #
3 # Too run convert the keywords run the following command
4 # gen_header.pl keywords > keywords.h
5
6 next if m/^#/;
7 next if m/^$/;
8 $line_no++;
9 chop;
10 $keyword = $_;
11 $upper = $keyword;
12 $upper =~ tr/a-z/A-Z/;
13
14 printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n",
15 $upper, $line_no, $keyword, $upper;