blob: 98ad7e3525820f37687914a17bcceddc14aab6e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/usr/bin/perl
open(CMD, "cat commands.h *-cmd.h|");
open(CMDP, ">commands-perl.pl");
while(<CMD>){
if(/#define (\S+) (.+)/){
print CMDP "\$${1} = $2;\n";
print CMDP "\$PUKE_NAME2NUM\{'$1'\} = $2;\n";
print CMDP "\$PUKE_NUM2NAME\{'$2'\} = '$1';\n";
}
}
print CMDP "\n1;\n";
|