diff options
author | Herb Lewis <herb@samba.org> | 1998-01-02 04:26:39 +0000 |
---|---|---|
committer | Herb Lewis <herb@samba.org> | 1998-01-02 04:26:39 +0000 |
commit | 5b724c6551c963454fe4ce27cfc8756e0c76712d (patch) | |
tree | b526cc86e54d5baae37a9d76d5ac89dc00b0f90d /packaging | |
parent | 52e275c4ccc1b7f0c2ef8d12d28065898a1c89c9 (diff) | |
download | samba-5b724c6551c963454fe4ce27cfc8756e0c76712d.tar.gz samba-5b724c6551c963454fe4ce27cfc8756e0c76712d.tar.xz samba-5b724c6551c963454fe4ce27cfc8756e0c76712d.zip |
fix up perl script so it is a little cleaner and also works with perl 4
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/SGI/psfixes.pl | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/packaging/SGI/psfixes.pl b/packaging/SGI/psfixes.pl index 4ed9e16f7ec..c5269b9142e 100755 --- a/packaging/SGI/psfixes.pl +++ b/packaging/SGI/psfixes.pl @@ -1,26 +1,30 @@ #!/usr/bin/perl -$found_vm = 0; - while (<>) { - if (not $found_vm) { - if (not /^%/) { - if (/^%%Title:/) { - s/.
$/
/; +# strip any ctrl-d's + $_ =~ s/^//; +# get rid of any non-postscript commands + if (/^%/) { + do { + $_ = <>; + } until ( /^%/ ) || eof() ; + if (! eof()) { print; } - elsif (/^\/VM?/) { - print "/VM? { pop } bind def
\n"; - $found_vm = 1; - } - else { + } +# fix bug in long titles from MS Word + elsif (/^%%Title:/) { + s/.
$/
/; print; - } } - } - else { - if (/def
/) { - $found_vm = 0; +# remove VM test + elsif (/^\/VM?/) { + print "/VM? { pop } bind def
\n"; + do { + $_ = <>; + } until (/def
/) || eof() ; + } + else { + print; } - } } |