diff options
Diffstat (limited to 'Master/texmf-dist/source/metapost/mpattern/mpp')
-rw-r--r-- | Master/texmf-dist/source/metapost/mpattern/mpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/Master/texmf-dist/source/metapost/mpattern/mpp b/Master/texmf-dist/source/metapost/mpattern/mpp deleted file mode 100644 index d5d81c5be59..00000000000 --- a/Master/texmf-dist/source/metapost/mpattern/mpp +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/perl -i -########################################################################### -# This file is part of the MPATTERN package -# -# mpp: Postprocessing MetaPost output files in which patterns were used -# -# Author: Piotr Bolek -# version: 0.2 (Sep 25, 1998) -# -# $Id: mpp,v 1.3 1998/09/25 10:49:30 piotrek Exp $ -########################################################################### - -$file=shift; -($logfile = $file . ".log") =~ s/\.mp\.log/.log/; -$file =~ s/\.mp$//; - -system("mpost $file"); - -open LOG, $logfile; -while(<LOG>) { - if (/Pattern:(\d+)/) { - push @pictures, $1; - } -} - -print STDERR "Postprocessing patterns"; - -for $i (@pictures) { - $newfile="$file.$i"; print STDERR "."; - $oldfile="$file.p!!"; - rename($newfile,$oldfile); - - open IN, $oldfile; - open OUT, ">$newfile"; - $output = $fonts = ""; - LINE: - while(<IN>){ - if((/^%%EndProlog\s*$/../^%%EOF\s*$/) && /%*Font:/) { - $fonts .= $_; - next LINE; - } - if(/^% Pattern:(0\.[0-9]+):(.*)/) { - $pattern{$1}=$2; -# print STDERR "\$pattern{$1}=$2\n"; - } - if(/^ (0\.[0-9]+) setgray/ && (defined $pattern{$1})) { - s"^ (0\.[0-9]+).*"%$&\n$pattern{$1} setpattern"; - } - $output .= $_; - } - $output =~ s/%%EndProlog/$fonts$&/; - print OUT $output; - unlink $oldfile; -} -print STDERR "\n"; |