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

$found_vm = 0;

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