X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/763d5e6ad88ef3ba1cd1d7742d060e4f1e54c6b8..f0feb22e80bfe438c16d212a7cc8be6d2282b6ac:/scripts/text2c diff --git a/scripts/text2c b/scripts/text2c index 46b2276..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;