summaryrefslogtreecommitdiff
path: root/Master/bin/mips-irix/fixtpps
diff options
context:
space:
mode:
authorOlaf Weber <olaf@infovore.xs4all.nl>2007-01-01 11:54:51 +0000
committerOlaf Weber <olaf@infovore.xs4all.nl>2007-01-01 11:54:51 +0000
commitc3ef295937d604389c1ce7f325138611b2c7e653 (patch)
treeca9177ea1822f78e641c186e6e0e88b918947a41 /Master/bin/mips-irix/fixtpps
parent90afab3aa815f233aaf0d515eb8a886fabbc635b (diff)
Update of mips-irix binaries part 2: adding updated binaries.
git-svn-id: svn://tug.org/texlive/trunk@3088 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/mips-irix/fixtpps')
-rwxr-xr-xMaster/bin/mips-irix/fixtpps28
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/bin/mips-irix/fixtpps b/Master/bin/mips-irix/fixtpps
new file mode 100755
index 00000000000..4239bb9dfc5
--- /dev/null
+++ b/Master/bin/mips-irix/fixtpps
@@ -0,0 +1,28 @@
+#!/usr/bin/env perl
+# fixtpps: fix tpscript document to work with PSUtils
+#
+# Copyright (C) Angus J. C. Duggan 1991-1995
+# See file LICENSE for details.
+
+$nesting = 0;
+$header = 1;
+
+while (<>) {
+ if (/^%%Page:/ && $nesting == 0) {
+ print $_;
+ print "save home\n";
+ $header = 0;
+ } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) {
+ print $_;
+ $nesting++;
+ } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) {
+ print $_;
+ $nesting--;
+ } elsif (/save home/) {
+ s/save home//;
+ print $_;
+ } elsif (!$header || (! /^save$/ && ! /^home$/)) {
+ print $_;
+ }
+}
+