summaryrefslogtreecommitdiff
path: root/packaging/SGI/psfixes.pl
blob: 4ed9e16f7ec0ea9964c09ffbe496af465c61ee30 (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
#!/usr/bin/perl

$found_vm = 0;

while (<>) {
  if (not $found_vm) {
    if (not /^%/) {
	if (/^%%Title:/) {
	    s/.
$/
/;
	    print;
	}
	elsif (/^\/VM?/) {
	    print "/VM? { pop } bind def
\n";
	    $found_vm = 1;
	}
	else {
	    print;
	}
    }
  }
  else {
    if (/def
/) {
	$found_vm = 0;
    }
  }
}