+++ /dev/null
-#!/usr/bin/perl
-# A filter for fixing PS generated by pstops
-# (c) 2008 Martin Mares <mj@ucw.cz>
-
-my $seen_procset = 0;
-my @procset = ();
-my $seen_setup = 0;
-while (<>) {
- if (/^%%BeginProcSet: PStoPS/) {
- $seen_procset = 1;
- } elsif ($seen_procset == 1) {
- if (/^%%EndProcSet/) {
- $seen_procset = 2;
- } else {
- push @procset, $_;
- }
- } elsif (/^%%BeginSetup/) {
- print;
- if ($seen_procset == 2) {
- print "%%BeginFeature: PStoPS\n";
- print join("", @procset);
- print "%%EndFeature\n";
- $seen_procset = 3;
- }
- $seen_setup = 1;
- } else {
- print;
- }
-}
-
-$seen_setup or die "No setup section seen\n";
-$seen_procset or die "No PStoPS procset seen\n";
-$seen_procset >= 2 or die "PStoPS procset not terminated\n";
-$seen_procset >= 3 or die "Setup section precedes PStoPS procset\n";
-exit 0;