Fix typos: Cory Doctorow / Human Readable
[ccbib.git] / psutils / fixfmps.pl
blobf09a3c04b40806038951b9cf1fea0ebfdf4fd433
1 @PERL@
2 # fixfmps: get conforming PostScript out of FrameMaker version 2 file
3 # move all FMDEFINEFONTs to start of pages
5 # Copyright (C) Angus J. C. Duggan 1991-1995
6 # See file LICENSE for details.
8 %fonts=();
10 while (<>) {
11 if (/^([0-9]+) [0-9]+ .* FMDEFINEFONT$/) {
12 $fonts{$1} = $_;
13 } elsif (/^[0-9.]+ [0-9.]+ [0-9]+ FMBEGINPAGE$/) {
14 print $_, join('',values(%fonts));
15 } elsif (m%(.*/PageSize \[paperwidth paperheight\]put )setpagedevice(.*)%) {
16 print "$1pop$2\n";
17 } else {
18 print $_;
21 @END@