summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>1998-01-02 04:26:39 +0000
committerHerb Lewis <herb@samba.org>1998-01-02 04:26:39 +0000
commit32b1501b1e026d85b8d50b4a923424eeeed230e2 (patch)
tree21c69e60931a61e4d0956f0452eddd26305e7182 /packaging
parent0a5073e985847acac11979771bdc04308a903107 (diff)
downloadsamba-32b1501b1e026d85b8d50b4a923424eeeed230e2.tar.gz
samba-32b1501b1e026d85b8d50b4a923424eeeed230e2.tar.xz
samba-32b1501b1e026d85b8d50b4a923424eeeed230e2.zip
fix up perl script so it is a little cleaner and also works with perl 4
(This used to be commit 5b724c6551c963454fe4ce27cfc8756e0c76712d)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/SGI/psfixes.pl38
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;
}
- }
}