[comp.unix.questions] Strange pagination...

dab@msudoc.UUCP (02/24/87)

On my MicroPort System V/AT system, I am getting strange pagination from
the "lp" system.  I have a printer that has a very simple interface
definition - it is simply a "cat -" command.  However, a form feed is
getting inserted into my text every 66 lines.  Since my printer has a
cut-sheet feeder and only allows 53 lines per page, this is really
messing up my print jobs.  Can anyone tell me where that silly FF is
coming from?  

Thanks.

dab@msudoc.UUCP (02/24/87)

Sorry about this, but Pnews rejected my .signature file on my last
message.  Please use the info below for sending replies.  Thanks.

A reminder:  On my MicroPort System V/AT, I get form feeds inserted by
the "lp" system every 66 lines.  I don't put them there, neither does my
interface program.  Where do they come from?

-- 
David A. Bright
Michigan State University Computer Laboratory Systems Development Group
...!ihnp4!msudoc!dab   		(work)
...!ihnp4!msudoc!dab!dab	(home)

dan@prairie.UUCP (02/27/87)

In article <1208@msudoc.UUCP> dab@msudoc.UUCP (David A. Bright) writes:
>On my MicroPort System V/AT system, I am getting strange pagination from
>the "lp" system ...  Can anyone tell me where that silly FF is
>coming from?  

   It's being inserted by the lp driver.  I believe that 1.3.8 has a
reasonably elegant solution to this (i.e. a "raw" lp minor device), but
here's something to put into your model script that should fix the 
problem:

-----------------------------------------------------------------

#include <sys/lprio.h>

struct lprio lparms = {0, 140, 32767} ;

/* lpraw sets the lp driver up so that it doesn't do page breaks,
 * most of the time.  There really should be a raw driver, but ...
 */

main() 
{
    ioctl(1, LPRSET, &lparms) ;
}

---------------------------------------------------------------

   Save as lpraw.c, compile it, stick it somewhere, and invoke it
from your lp script.  Since the script is invoked by the spooler
with stdout already set to the lpdriver, the ioctl(1,...) is
appropriate.

-- 
      Dan Frank (w9nk)
	ARPA: dan@db.wisc.edu			ATT: (608) 255-0002 (home)
	UUCP: ... uwvax!prairie!dan		     (608) 262-4196 (office)
	SNAILMAIL: 1802 Keyes Ave. Madison, WI 53711-2006