Harry G. McGavran found an interesting interaction between Berkeley lpd and magicfilter, where both magicfilter and lpd want to reap magicfilter’s children, and sometimes magicfilter doesn’t win. In particular, when magicfilter couldn’t reap the m4 process, it would fail with a complaint about m4 terminating abnormally. In the case of executing m4, the program would have already failed with a message about m4 not being there, so reaping the return value wasn’t necessary.
As a little something extra, the --srcdir feature now works so
you can untar magicfilter into directory A and build it
in directory B by simply cding into B and doing
A/configure.sh. At least it works on Linux and FreeBSD.
Harry G. McGavran, Jr. of LANL
reported a bunch of bugs with the
m4 part of magicfilter; The first one was that I had forgotten to
quote a defn() in
magic.m4.in, so
printers that wanted to pass GS_OPTIONS to ghostscript weren’t
actually doing that. While fixing that (a trivial fix) he then pointed
out (indirectly)
that I wasn’t properly quoting a large bunch of ifdef()s either.
He then suggested that I modify
magicfilter could it could be used as a filter to remote printers
when the line printer daemon didn’t support filters on them, so I added
a PRINTER capacity to the .def files (this is a command to pipe
printer-ready output to instead of simply piping it to stdout. With
this and a front-end printer daemon that tries to print to /dev/null,
even dumb lpds can be magicfiltered.
After I finished this, I added better support for printing PDF
files both on postscript and non-postscript files, plus I now
check for hp2pcl or lj2ps during configuration so
that PCL files at least have a chance of being printable on
non-PCL printers (hp2pcl and lj2ps only support
pcl 4, so you need to give configure.sh the
--with-pcl flag to enable this feature.)
ksh--version option. 2.2.d added that
option, and 2.2.e makes that option actually work under LPRng,
as well as fixing a bug that makes magicfilter dump core when
it’s called without any arguments or a bogus printer filter
under LPRng./usr/libexec/filters, but in
the progress a small collection of buglets were discovered and squished,
plus the configuration script now detects LPRng and builds a version of
magicfilter that does not process options passed in to the filter
(LPRng passes a LOT of options, which seem to change over
time. magicfilter doesn’t use them, so we just ignore them now.)${foo:+"bar"} to build a string, which
works fine on my main development platforms
Mastodon Linux and
FreeBSD) but not quite so well
on Irix. So, with a heavy sigh, a new Monday creates a new
magicfilter release.--with-papersize= option to configure.sh allows you to
build a version of magicfilter that supports A4 and
US Letter pagesizes (this is a restriction of
nenscript; the versions of nenscript I have on
Mastodon and FreeBSD only support those two pagesizes.reject() function now returns error status 2 instead
of 1, because Berkeley lpd interprets error status 1 as a
request to try and reprint the job. ${FILE}, output from that
filter will be directed through a named pipe to avoid diagnostic
messages cluttering it up. Old versions of
Ghostscript
may suffer from this problem (though I’ve never seen it.)