blob: a83325b3a0464da555aee87b894812248e04333d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#
die "Please specify input and output filenames" if($#ARGV != 1);
open INF, '<', $ARGV[0] or die "Can't open input file";
open OUF, '>', $ARGV[1] or die "Can't open output file";
print OUF <<EOS;
#include<khimaira.h>
khui_action khui_actions[] = {
EOS
# skip first line
<INF>;
while(<INF>) {
print OUF "{".$_."},\n";
}
print OUF <<EOS;
};
int khui_n_actions = sizeof(khui_actions) / sizeof(khui_action);
EOS
close INF;
close OUF;
|