Commit | Line | Data |
---|---|---|
460b9539 | 1 | #! /usr/bin/perl -w |
a05e4467 RK |
2 | my $class = "static"; |
3 | if($ARGV[0] eq '-extern') { | |
4 | $class = ""; | |
5 | shift; | |
6 | } | |
460b9539 | 7 | my $name = shift; |
8 | push(@out, "/* autogenerated file, do not edit */\n\n"); | |
a05e4467 | 9 | push(@out, "$class const char $name\[] = \n"); |
460b9539 | 10 | while(<>) { |
11 | next if /arch-tag/; | |
12 | s/[\\\"\?]/\\$&/g; | |
13 | s/\n/\\n/g; | |
14 | push(@out, " \"$_\"\n"); | |
15 | } | |
16 | push(@out, ";\n"); | |
17 | ((print @out) | |
18 | and (close STDOUT)) | |
19 | or die "$0: stdout: $!\n"; |