X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/460b9539a7c15580e41a71bbc0f47ae776238915..f0feb22e80bfe438c16d212a7cc8be6d2282b6ac:/scripts/text2c?ds=sidebyside diff --git a/scripts/text2c b/scripts/text2c index 23079f3..95d2181 100755 --- a/scripts/text2c +++ b/scripts/text2c @@ -1,7 +1,12 @@ #! /usr/bin/perl -w +my $class = "static"; +if($ARGV[0] eq '-extern') { + $class = ""; + shift; +} my $name = shift; push(@out, "/* autogenerated file, do not edit */\n\n"); -push(@out, "static const char $name\[] = \n"); +push(@out, "$class const char $name\[] = \n"); while(<>) { next if /arch-tag/; s/[\\\"\?]/\\$&/g; @@ -12,4 +17,3 @@ push(@out, ";\n"); ((print @out) and (close STDOUT)) or die "$0: stdout: $!\n"; -# arch-tag:2eRG7Dpm6lpL7BR3hPvriQ