summaryrefslogtreecommitdiff
path: root/packaging/SGI/psfixes.pl
blob: 13e9bdb0a8b338c1b283a27c34e19bd0628d5aeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl

while (<>) {
# strip any ctrl-d's
    $_ =~ s/^//;
# get rid of any non-postscript commands
    if (/^%/) {
	do {
	    $_ = <>;
	} until ( /^%/ ) || eof() ;
	if (! eof()) {
	    print;
	}
    }
# fix bug in long titles from MS Word
    elsif (/^%%Title:/) {
	    s/.
$/
/;
	    print;
    }
# remove VM test
    elsif (/^\/VM\?/) {
	print "/VM? { pop } bind def
\n";
	do {
	    $_ = <>;
	} until (/def
/) || eof() ;
    }
    else {
	print;
    }
}