4ed9e16f7ec0ea9964c09ffbe496af465c61ee30
[samba.git] / packaging / SGI / psfixes.pl
1 #!/usr/bin/perl
2
3 $found_vm = 0;
4
5 while (<>) {
6   if (not $found_vm) {
7     if (not /^\e%/) {
8         if (/^%%Title:/) {
9             s/.\r$/\r/;
10             print;
11         }
12         elsif (/^\/VM?/) {
13             print "/VM? { pop } bind def\r\n";
14             $found_vm = 1;
15         }
16         else {
17             print;
18         }
19     }
20   }
21   else {
22     if (/def\r/) {
23         $found_vm = 0;
24     }
25   }
26 }