2 # A filter for fixing PS generated by pstops
3 # (c) 2008 Martin Mares <mj@ucw.cz>
9 if (/^%%BeginProcSet: PStoPS/) {
11 } elsif ($seen_procset == 1) {
12 if (/^%%EndProcSet/) {
17 } elsif (/^%%BeginSetup/) {
19 if ($seen_procset == 2) {
20 print "%%BeginFeature: PStoPS\n";
21 print join("", @procset);
22 print "%%EndFeature\n";
31 $seen_setup or die "No setup section seen\n";
32 $seen_procset or die "No PStoPS procset seen\n";
33 $seen_procset >= 2 or die "PStoPS procset not terminated\n";
34 $seen_procset >= 3 or die "Setup section precedes PStoPS procset\n";