blob: f13a3ec1808e6c66856bce55ae5018c5bec1735c (
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_accel_def khui_accel_global[] = {
EOS
# skip first line
<INF>;
while(<INF>) {
print OUF "{".$_."},\n";
}
print OUF <<EOS;
};
int khui_n_accel_global = sizeof(khui_accel_global) / sizeof(khui_accel_def);
EOS
close INF;
close OUF;
|