From e9e9684117719204929821028ba9dbb7915ea119 Mon Sep 17 00:00:00 2001 From: kraxel Date: Sun, 28 Mar 2004 11:31:57 +0000 Subject: Initial revision --- fallback.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 fallback.pl (limited to 'fallback.pl') diff --git a/fallback.pl b/fallback.pl new file mode 100755 index 0000000..03706c4 --- /dev/null +++ b/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; +} -- cgit