X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/5fa6c4f8d6851c12efe73278f32d0b464c6d054f..a05e4467dee55248f2135dcb532b4729154d69c5:/scripts/text2c?ds=inline 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;