blob: 687fd8dd4abd8bf979bd028c64a3de47521a250a (
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
|
#!/usr/bin/perl
if ($#ARGV != 0) {
print STDOUT "usage: $0 <stflfile>\n";
exit(1);
}
$id = `basename $ARGV[0] .stfl`;
chomp($id);
chomp($ucid);
open(FILE,$ARGV[0]) or die "couldn't open $ARGV[0]: $!\n";
print "#ifndef ${id}__h_included\n";
print "#define ${id}__h_included\n";
print "\n";
print "static char ${id}_str[] = \"\" ";
while ($line = <FILE>) {
$line =~ s/"/\\"/g;
chomp($line);
print "\"$line\\n\"\n";
}
close(FILE);
print ";\n";
print "#endif\n";
|