summaryrefslogtreecommitdiff
path: root/Build/source/utils/psutils/fixscribeps.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/psutils/fixscribeps.pl')
-rw-r--r--Build/source/utils/psutils/fixscribeps.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/Build/source/utils/psutils/fixscribeps.pl b/Build/source/utils/psutils/fixscribeps.pl
new file mode 100644
index 00000000000..d8ed1e86aa3
--- /dev/null
+++ b/Build/source/utils/psutils/fixscribeps.pl
@@ -0,0 +1,19 @@
+@PERL@
+# fixscribeps: get conforming PostScript out of Scribe
+#
+# Copyright (C) Angus J. C. Duggan 1991-1995
+# See file LICENSE for details.
+
+$inepsf = 0;
+$epsfn = 0;
+while (<>) {
+ if (/^([0-9]+ [0-9]+ [0-9]+ PB) (%!.*)/) {
+ print "$1\n%%BeginDocument: Scribe-EPSF $epsfn 0\n$2\n";
+ $inepsf++;
+ } elsif (/^ PE/ && $inepsf) {
+ print "%%EndDocument\n", $_;
+ } else {
+ print $_;
+ }
+}
+@END@