summaryrefslogtreecommitdiff
path: root/Master/bin
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-01-10 11:17:59 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-01-10 11:17:59 +0000
commit7c2ab63c28e352e1449c8e95589ec0fa7f9b94d7 (patch)
tree65e0d015dfe741622eee7a94ef6ef4fed1cab55d /Master/bin
parent30be42ace99ca88d8a40301534b9f249d1b09d8c (diff)
win32 'linked' scripts
git-svn-id: svn://tug.org/texlive/trunk@21004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin')
-rwxr-xr-xMaster/bin/win32/deweb.exebin0 -> 1536 bytes
-rwxr-xr-xMaster/bin/win32/extractres.bat103
-rwxr-xr-xMaster/bin/win32/fixdlsrps.bat61
-rwxr-xr-xMaster/bin/win32/fixfmps.bat28
-rwxr-xr-xMaster/bin/win32/fixpsditps.bat32
-rwxr-xr-xMaster/bin/win32/fixpspps.bat65
-rwxr-xr-xMaster/bin/win32/fixscribeps.bat26
-rwxr-xr-xMaster/bin/win32/fixtpps.bat35
-rwxr-xr-xMaster/bin/win32/fixwfwps.bat40
-rwxr-xr-xMaster/bin/win32/fixwpps.bat38
-rwxr-xr-xMaster/bin/win32/fixwwps.bat27
-rwxr-xr-xMaster/bin/win32/includeres.bat57
-rwxr-xr-xMaster/bin/win32/ps2eps.exebin0 -> 1536 bytes
-rwxr-xr-xMaster/bin/win32/psmerge.bat92
14 files changed, 0 insertions, 604 deletions
diff --git a/Master/bin/win32/deweb.exe b/Master/bin/win32/deweb.exe
new file mode 100755
index 00000000000..5777d90a17a
--- /dev/null
+++ b/Master/bin/win32/deweb.exe
Binary files differ
diff --git a/Master/bin/win32/extractres.bat b/Master/bin/win32/extractres.bat
deleted file mode 100755
index 5be2c5671dc..00000000000
--- a/Master/bin/win32/extractres.bat
+++ /dev/null
@@ -1,103 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# extractres: extract resources from PostScript file
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$prog = ($0 =~ s=.*/==);
-
-%resources = (); # list of resources included
-%merge = (); # list of resources extracted this time
-%extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns
- "pattern", ".pat", "form", ".frm", "encoding", ".enc");
-%type = ("%%BeginFile:", "file", "%%BeginProcSet:", "procset",
- "%%BeginFont:", "font"); # resource types
-
-while (@ARGV) {
- $_ = shift;
- if (/^-m(erge)?$/) { $merge = 1; }
- elsif (/^-/) {
- print STDERR "Usage: $prog [-merge] [file]\n";
- exit 1;
- } else {
- unshift(@ARGV, $_);
- last;
- }
-}
-
-if (defined($ENV{TEMP})) { # set body file name
- $body = "$ENV{TEMP}/body$$.ps";
-} else {
- $body = "body$$.ps";
-}
-
-open(BODY, $body) && die "Temporary file $body already exists";
-open(BODY, ">$body") || die "Can't write file $body";
-
-sub filename { # make filename for resource in @_
- local($name);
- foreach (@_) { # sanitise name
- s/[!()\$\#*&\\\|\`\'\"\~\{\}\[\]\<\>\?]//g;
- $name .= $_;
- }
- $name =~ s@.*/@@; # drop directories
- die "Filename not found for resource ", join(" ", @_), "\n"
- if $name =~ /^$/;
- $name;
-}
-
-$output = STDOUT; # start writing header out
-while (<>) {
- if (/^%%BeginResource:/ || /^%%BeginFont:/ || /^%%BeginProcSet:/) {
- local($comment, @res) = split(/\s+/); # look at resource type
- local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res);
- local($name) = &filename(@res, $extn{$type}); # make file name
- $saveout = $output;
- if (!$resources{$name}) {
- print "%%IncludeResource: $type ", join(" ", @res), "\n";
- if (!open(RES, $name)) {
- open(RES, ">$name") || die "Can't write file $name";
- $resources{$name} = $name;
- $merge{$name} = $merge;
- $output = RES;
- } else { # resource already exists
- close(RES);
- undef $output;
- }
- } elsif ($merge{$name}) {
- open(RES, ">>$name") || die "Can't append to file $name";
- $output = RES;
- } else { # resource already included
- undef $output;
- }
- } elsif (/^%%EndResource/ || /^%%EndFont/ || /^%%EndProcSet/) {
- if (defined $output) {
- print $output $_;
- close($output);
- }
- $output = $saveout;
- next;
- } elsif ((/^%%EndProlog/ || /^%%BeginSetup/ || /^%%Page:/)) {
- $output = BODY;
- }
- print $output $_
- if defined $output;
-}
-
-close(BODY); # close body output file
-
-open(BODY, $body); # reopen body for input
-while (<BODY>) { # print it all
- print $_;
-}
-close(BODY);
-
-unlink($body); # dispose of body file
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixdlsrps.bat b/Master/bin/win32/fixdlsrps.bat
deleted file mode 100755
index 338481e78a2..00000000000
--- a/Master/bin/win32/fixdlsrps.bat
+++ /dev/null
@@ -1,61 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# fixdlsrps: fix DviLaser/PS document to work with PSUtils
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$nesting = 0;
-$page = 1;
-$infont = 0;
-
-@fonts = ();
-@body = ();
-$header = 1;
-
-while (<>) {
- if (/^XP/) {
- $infont++;
- push(@fonts, $_);
- $infont-- if /PXL.*RP/ || /DN?F.*RP/;
- } elsif ($infont) {
- push(@fonts, $_);
- $infont-- if /PXL.*RP/ || /DN?F.*RP/;
- } elsif ((/^%%EndSetup/ || /^%%Page:/) && $header) {
- print @body;
- @body = ("%%EndSetup\n");
- $header = 0;
- } elsif (/^%%EndProlog/ && !$nesting) {
- push(@body,
- "\$DviLaser begin/GlobalMode{}bdef/LocalMode{}bdef/XP{}def/RP{}def",
- "/DoInitialScaling{72.0 Resolution div dup scale}bdef end\n", $_);
- } elsif (/^%%BeginPageSetup/ && !$nesting) {
- push(@body, "%%Page: $page $page\n", $_,
- "Resolution 72 div dup scale Magnification 1000 div dup scale\n",
- "/DocumentInitState where {\n",
- "/DocumentInitState [ matrix currentmatrix currentlinewidth",
- " currentlinecap currentlinejoin currentdash currentgray",
- " currentmiterlimit] cvx put}if\n");
- $page++;
- } elsif (/^%%BeginDocument:/ || /^%%BeginBinary:/ || /^%%BeginFile:/) {
- push(@body, $_);
- $nesting++;
- } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) {
- push(@body, $_);
- $nesting--;
- } elsif (!/^%%PageBoundingBox:/ && !/^%%Page:/) {
- push(@body, $_);
- }
-}
-
-print @fonts;
-print @body;
-
-exit 0;
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixfmps.bat b/Master/bin/win32/fixfmps.bat
deleted file mode 100755
index a1d16903dc8..00000000000
--- a/Master/bin/win32/fixfmps.bat
+++ /dev/null
@@ -1,28 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# fixfmps: get conforming PostScript out of FrameMaker version 2 file
-# move all FMDEFINEFONTs to start of pages
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-%fonts=();
-
-while (<>) {
- if (/^([0-9]+) [0-9]+ .* FMDEFINEFONT$/) {
- $fonts{$1} = $_;
- } elsif (/^[0-9.]+ [0-9.]+ [0-9]+ FMBEGINPAGE$/) {
- print $_, join('',values(%fonts));
- } elsif (m%(.*/PageSize \[paperwidth paperheight\]put )setpagedevice(.*)%) {
- print "$1pop$2\n";
- } else {
- print $_;
- }
-}
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixpsditps.bat b/Master/bin/win32/fixpsditps.bat
deleted file mode 100755
index 6150e9be83d..00000000000
--- a/Master/bin/win32/fixpsditps.bat
+++ /dev/null
@@ -1,32 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# fixpsditps: fix psdit output for use in psutils
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$nesting = 0;
-
-while (<>) {
- if (/^\/p{pop showpage pagesave restore \/pagesave save def}def$/) {
- print "/p{pop showpage pagesave restore}def\n";
- } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/ ) {
- print $_;
- $nesting++;
- } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) {
- print $_;
- $nesting--;
- } elsif (/^%%Page:/ && $nesting == 0) {
- print $_;
- print "xi\n";
- } elsif (! /^xi$/) {
- print $_;
- }
-}
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixpspps.bat b/Master/bin/win32/fixpspps.bat
deleted file mode 100755
index d9703397fe6..00000000000
--- a/Master/bin/win32/fixpspps.bat
+++ /dev/null
@@ -1,65 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# mangle PostScript produced by PSPrint to make it almost conforming
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$header = 1; $ignore = 0;
-$verbose = 0;
-@body = ();
-%fonts = (); $font = "";
-$inchar = 0; @char = ();
-
-while (<>) {
- if (/^\@end$/) {
- $ignore = 1;
- } elsif (/^[0-9]+ \@bop0$/) {
- $ignore = 0;
- $header = 1;
- } elsif ($header) {
- if (/^\/([a-z.0-9]+) \@newfont$/) {
- if (! defined($fonts{$1})) {
- $fonts{$1} = 1;
- print;
- } elsif ($verbose) {
- print STDERR "$font already defined\n";
- }
- } elsif (/^([a-z.0-9]+) sf$/) {
- $font = $1;
- print;
- } elsif (/^\[</) {
- $inchar = 1;
- push (@char, $_);
- } elsif ($inchar) {
- push (@char, $_);
- if (/.*\] ([0-9]+) dc$/) {
- if (! defined($fonts{$font,$1})) {
- $fonts{$font,$1} = 1;
- print (@char);
- } elsif ($verbose) {
- print STDERR "$font character $1 already defined\n";
- }
- $inchar = 0;
- @char = ();
- }
- } elsif (/^([0-9]+) \@bop1$/) {
- $header = 0;
- push (@body, "%%Page: ? $1\n");
- push (@body, $_);
- } else {
- print;
- }
- } elsif (! $ignore) {
- push (@body, $_);
- }
-}
-print (@body);
-print ("\@end\n");
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixscribeps.bat b/Master/bin/win32/fixscribeps.bat
deleted file mode 100755
index 774c7381f2a..00000000000
--- a/Master/bin/win32/fixscribeps.bat
+++ /dev/null
@@ -1,26 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# 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__
-:endofperl
-
diff --git a/Master/bin/win32/fixtpps.bat b/Master/bin/win32/fixtpps.bat
deleted file mode 100755
index 1b58ff8f88e..00000000000
--- a/Master/bin/win32/fixtpps.bat
+++ /dev/null
@@ -1,35 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# 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 $_;
- }
-}
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixwfwps.bat b/Master/bin/win32/fixwfwps.bat
deleted file mode 100755
index 17a210ac4e9..00000000000
--- a/Master/bin/win32/fixwfwps.bat
+++ /dev/null
@@ -1,40 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# fixwfwps: fix Word for windows PostScript for printing.
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$nesting = 0;
-while (<>) {
- tr/\000-\010\012-\014\016-\037//d;
- foreach (grep($_ ne "", split("\015"))) {
- s!/SVDoc\s+save\s+def!!g;
- s!SVDoc\s+restore!!g;
- if (/^(%!PS-Adobe-\d*\.\d*) EPSF-/ && !$nesting) {
- print "$1\n";
- $wfwepsf = 1;
- } elsif (/^SS\s*$/ && $wfwepsf) {
- print "%%Page: $wfwepsf $wfwepsf\n";
- $wfwepsf++;
- print "$_\n";
- } elsif (/^%MSEPS Preamble/) {
- print "%%BeginDocument: (Included EPSF)\n";
- print "$_\n";
- $nesting++;
- } elsif (/^%MSEPS Trailer/) {
- $nesting--;
- print "$_\n";
- print "%%EndDocument\n";
- } elsif (! /^%%BoundingBox/) {
- print "$_\n";
- }
- }
-}
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixwpps.bat b/Master/bin/win32/fixwpps.bat
deleted file mode 100755
index 10c9606e678..00000000000
--- a/Master/bin/win32/fixwpps.bat
+++ /dev/null
@@ -1,38 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# fixwpps: get semi-conforming PostScript out of WordPerfect 5.0 file
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$page = 1;
-$nesting = 0;
-
-while (<>) {
- s/([^\/]_t)([0-9]+)/\1 \2/g; # fix wp 5.0 bug
- if (m!/_[be][dp]! || m!_bp \d+ \d+ roll!) {
- print $_;
- } elsif (/^(.*)(_bp.*)$/) {
- print "$1\n" if $1 ne "";
- print "%%Page: $page $page\n";
- print "$2\n";
- $page++;
- $nesting++;
- } elsif (/_ep$/) {
- print $_;
- $nesting--;
- } elsif (/^(.*)(_ed.*)/) {
- print "$1\n" if $1 ne "";
- print "%%Trailer:\n";
- print "$2\n";
- } else {
- print $_;
- }
-}
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/fixwwps.bat b/Master/bin/win32/fixwwps.bat
deleted file mode 100755
index 480560a1d8b..00000000000
--- a/Master/bin/win32/fixwwps.bat
+++ /dev/null
@@ -1,27 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# fixwwps: get semi-conforming PostScript out of Windows Write file
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$page = 1;
-
-while (<>) {
- if (/^(%!.*) EPSF-\d.\d/) {
- print $1, "\n";
- } elsif (/^SS/) {
- print "%%Page: $page $page\n";
- print $_;
- $page++;
- } else {
- print $_;
- }
-}
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/includeres.bat b/Master/bin/win32/includeres.bat
deleted file mode 100755
index 06eaf661600..00000000000
--- a/Master/bin/win32/includeres.bat
+++ /dev/null
@@ -1,57 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# includeres: include resources in PostScript file
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$prog = ($0 =~ s=.*/==);
-
-%extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns
- "pattern", ".pat", "form", ".frm", "encoding", ".enc");
-%type = ("%%BeginFile:", "file", "%%BeginProcSet:", "procset",
- "%%BeginFont:", "font"); # resource types
-
-$sysdir = `kpsewhich --progname=dvips --format="other text files" md71_0.ps` ;
-chomp($sysdir) ;
-$sysdir =~ s/\/md71_0\.ps// ;
-
-sub filename { # make filename for resource in @_
- local($name);
- foreach (@_) { # sanitise name
- s/[!()\$\#*&\\\|\`\'\"\~\{\}\[\]\<\>\?]//g;
- $name .= $_;
- }
- $name =~ s@.*/@@; # drop directories
- die "Filename not found for resource ", join(" ", @_), "\n"
- if $name =~ /^$/;
- $name;
-}
-
-while (<>) {
- if (/^%%IncludeResource:/ || /^%%IncludeFont:/ || /^%%IncludeProcSet:/) {
- local($comment, @res) = split(/\s+/);
- local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res);
- local($name) = &filename(@res);
- local($inc) = $sysdir ; # system include directory
- if (open(RES, $name) || open(RES, "$name$extn{$type}") ||
- open(RES, "$inc/$name") || open(RES, "$inc/$name$extn{$type}")) {
- while (<RES>) {
- print $_;
- }
- close(RES);
- } else {
- print "%%IncludeResource: ", join(" ", $type, @res), "\n";
- print STDERR "Resource $name not found\n";
- }
- } else {
- print $_;
- }
-}
-__END__
-:endofperl
-
diff --git a/Master/bin/win32/ps2eps.exe b/Master/bin/win32/ps2eps.exe
new file mode 100755
index 00000000000..5777d90a17a
--- /dev/null
+++ b/Master/bin/win32/ps2eps.exe
Binary files differ
diff --git a/Master/bin/win32/psmerge.bat b/Master/bin/win32/psmerge.bat
deleted file mode 100755
index 5e363e2d743..00000000000
--- a/Master/bin/win32/psmerge.bat
+++ /dev/null
@@ -1,92 +0,0 @@
-@rem = '-*- Perl -*-
-@echo off
-perl -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto endofperl
-';
-
-# psmerge: merge PostScript files produced by same application and setup
-# usage: psmerge [-oout.ps] [-thorough] file1.ps file2.ps ...
-#
-# Copyright (C) Angus J. C. Duggan 1991-1995
-# See file LICENSE for details.
-
-$prog = ($0 =~ s=.*/==);
-
-while ($ARGV[0] =~ /^-/) {
- $_ = shift;
- if (/^-o(.+)/) {
- if (!close(STDOUT) || !open(STDOUT, ">$1")) {
- print STDERR "$prog: can't open $1 for output\n";
- exit 1;
- }
- } elsif (/^-t(horough)?$/) {
- $thorough = 1;
- } else {
- print STDERR "Usage: $prog [-oout] [-thorough] file...\n";
- exit 1;
- }
-}
-
-$page = 0;
-$first = 1;
-$nesting = 0;
-
-@header = ();
-$header = 1;
-
-@trailer = ();
-$trailer = 0;
-
-@pages = ();
-@body = ();
-
-@resources = ();
-$inresource = 0;
-
-while (<>) {
- if (/^%%BeginFont:/ || /^%%BeginResource:/ || /^%%BeginProcSet:/) {
- $inresource = 1;
- push(@resources, $_);
- } elsif ($inresource) {
- push(@resources, $_);
- $inresource = 0 if /^%%EndFont/ || /^%%EndResource/ || /^%%EndProcSet/;
- } elsif (/^%%Page:/ && $nesting == 0) {
- $header = $trailer = 0;
- push(@pages, join("", @body)) if @body;
- $page++;
- @body = ("%%Page: ($page) $page\n");
- } elsif (/^%%Trailer/ && $nesting == 0) {
- push(@trailer, $_);
- push(@pages, join("", @body)) if @body;
- @body = ();
- $trailer = 1;
- $header = 0;
- } elsif ($header) {
- push(@trailer, $_);
- push(@pages, join("", @body)) if @body;
- @body = ();
- $trailer = 1;
- $header = 0;
- } elsif ($trailer) {
- if (/^%!/ || /%%EOF/) {
- $trailer = $first = 0;
- } elsif ($first) {
- push(@trailer, $_);
- }
- } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) {
- push(@body, $_);
- $nesting++;
- } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) {
- push(@body, $_);
- $nesting--;
- } else {
- print $_ if $print;
- }
-}
-
-print @trailer;
-
-exit 0;
-__END__
-:endofperl
-