aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/fallback.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fallback.pl')
-rwxr-xr-xscripts/fallback.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/fallback.pl b/scripts/fallback.pl
new file mode 100755
index 0000000..03706c4
--- /dev/null
+++ b/scripts/fallback.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl -w
+#
+# build header file from
+#
+use strict;
+
+while (my $line = <>) {
+ chomp $line;
+
+ # ignore comments
+ next if $line =~ /^!/;
+# next if $line =~ /^\s*$/;
+
+ # quote stuff
+ $line =~ s/\\/\\\\/g;
+ $line =~ s/\"/\\\"/g;
+
+ # continued line?
+ if ($line =~ s/\\\\$//) {
+ printf "\"%s\"\n",$line;
+ next;
+ }
+
+ # write out
+ printf "\"%s\",\n",$line;
+}