diff --text -r -N -u oki4linux-2.0/src/README.oki4daemon oki4linux-2.0-hacked/src/README.oki4daemon --- oki4linux-2.0/src/README.oki4daemon Wed Dec 31 19:00:00 1969 +++ oki4linux-2.0-hacked/src/README.oki4daemon Sun Oct 29 19:00:08 2000 @@ -0,0 +1,37 @@ +Oki4drv daemon +============== + +I've written a little Perl program which runs as a daemon and +eliminates some of the awkwardness of this driver. + +Basically, you twiddle oki4daemon to know about the proper paths, then +run it. It will background itself, then create and monitor a named +pipe called /dev/oki4drv (or whatever you told it). + +Once oki4daemon is running, /dev/oki4drv accepts Postscript. In LPD, +for example, you could set lp=/dev/oki4drv and be all set... + + +Option setting +-------------- + +You can prepend lines of the form + +%FAKEOKI foo=bar + +to the job to control the various options. I've configured oki4drv in +Foomatic to know about these option values, so between this and +Foomatic, you can use oki4drv cleanly under CUPS, LPD, or PDQ. Or at +least that's the theory ;) + + +Also included in this patch are fixes to oki4drv itself; it was not +invoking Ghostscript with -dSAFER, and it didn't call getopt properly +for its own -w (paperweight) option. + +http://www.linuxprinting.org/download/printing/ +http://www.linuxprinting.org/show_driver.cgi?driver=oki4drv + +-- +Grant Taylor <gtaylor@picante.com> +http://www.linuxprinting.org/ \ No newline at end of file diff --text -r -N -u oki4linux-2.0/src/main.c oki4linux-2.0-hacked/src/main.c --- oki4linux-2.0/src/main.c Mon Jul 31 19:23:16 2000 +++ oki4linux-2.0-hacked/src/main.c Sun Oct 29 18:43:33 2000 @@ -465,7 +465,7 @@ */ static char *compose_gs_command(char *name, int size_index) { - char *chunk1 = "/usr/bin/gs -q -dNOPAUSE -dBATCH -sDEVICE=bit -r600x600 -sPAPERSIZE="; + char *chunk1 = "/usr/bin/gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bit -r600x600 -sPAPERSIZE="; char *chunk2 = " -sOutputFile=- -q "; char *result; @@ -538,7 +538,7 @@ /* Parse command line options. */ - while ((c = getopt(argc, argv, "gmd:s:vVo:")) != -1) + while ((c = getopt(argc, argv, "gmw:d:s:vVo:")) != -1) switch (c) { case 'v': puts("This is oki4drv, version " VERSION "."); diff --text -r -N -u oki4linux-2.0/src/oki4daemon oki4linux-2.0-hacked/src/oki4daemon --- oki4linux-2.0/src/oki4daemon Wed Dec 31 19:00:00 1969 +++ oki4linux-2.0-hacked/src/oki4daemon Sun Oct 29 18:46:45 2000 @@ -0,0 +1,187 @@ +#! /usr/bin/perl + +# Simple named pipe daemon for oki4drv. + +# The idea: we read jobs from a named pipe in the filesystem. We +# simply pipe them into oki4drv. We define a job format like this: + +# %FAKEOKI option=foo +# %FAKEOKI option=bar +# %! +# .... + +# This is handy in that I can put the %FAKEOKI clauses in as ps/gs +# args in Foomatic, or anyone else can trivially handle this in any +# other system. + +# Available options are not really documented; just read the code +# below... + +# If not in path +my $oki4drv = '/usr/local/sbin/oki4drv'; + +# contents of 8min.rip from distribution. You could use immediate.rip. +my $sleepstring = '%-98765XBb