aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile2
-rwxr-xr-xscripts/fallback.pl12
2 files changed, 10 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 8ecc5a0..8f688a8 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -184,7 +184,7 @@ RegEdit.o : CFLAGS += -Wno-missing-prototypes -Wno-strict-prototypes -Wno-maybe-
ida: $(OBJS_IDA) $(OBJS_READER) $(OBJS_WRITER)
Ida.ad.h: Ida.ad $(srcdir)/scripts/fallback.pl
- perl $(srcdir)/scripts/fallback.pl < $< > $@
+ perl $(srcdir)/scripts/fallback.pl $< $@
logo.h: logo.jpg
hexdump -v -e '1/1 "0x%02x,"' < $< > $@
diff --git a/scripts/fallback.pl b/scripts/fallback.pl
index 03706c4..971de2c 100755
--- a/scripts/fallback.pl
+++ b/scripts/fallback.pl
@@ -4,7 +4,13 @@
#
use strict;
-while (my $line = <>) {
+my $in = shift;
+my $out = shift;
+
+open(IN, "<", $in) or die "open (read): $in";
+open(OUT, ">", $out) or die "open (write): $out";
+
+while (my $line = <IN>) {
chomp $line;
# ignore comments
@@ -17,10 +23,10 @@ while (my $line = <>) {
# continued line?
if ($line =~ s/\\\\$//) {
- printf "\"%s\"\n",$line;
+ printf OUT "\"%s\"\n",$line;
next;
}
# write out
- printf "\"%s\",\n",$line;
+ printf OUT "\"%s\",\n",$line;
}