Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!mcvax!ukc!stc!root44!miduet!steve
From: steve@gec-mi-at.co.uk (Steve Lademann)
Newsgroups: comp.bugs.4bsd
Subject: 4.3BSD lpd Bug
Message-ID: <629@gec-mi-at.co.uk>
Date: Wed, 8-Jul-87 11:32:25 EDT
Article-I.D.: gec-mi-a.629
Posted: Wed Jul  8 11:32:25 1987
Date-Received: Sun, 12-Jul-87 11:31:05 EDT
Sender: news@gec-mi-at.co.uk
Organization: Marconi Instruments Ltd., St. Albans, UK
Lines: 46

Having spent the last couple of months upgrading two 11/750s to 4.3BSD, I
have encountered a few minor bugs which I have fixes for. Here's one in lpd.

Problem:
	We have an lpd filter which uses the 'width' setting passed to it
	which is set up from the '/etc/printcap' database. However, lpd
	sets the width to 0 unless it is expicitly set in the lpr command
	line. This is different behaviour from 4.2, which set the width to
	the PW setting in /etc/printcap, unless overwridden in the lpr
	command line.

Fix:	Apply the following patch:

*** printjob.c.old	Sat Jan 11 19:42:25 1986
--- printjob.c	Wed Jul  8 11:01:02 1987
***************
*** 237,245 ****
  	 */
  	for (i = 0; i < 4; i++)
  		strcpy(fonts[i], ifonts[i]);
- 	strcpy(width+2, "0");
- 	strcpy(indent+2, "0");
  
  	/*
  	 *      read the control file for work to do
  	 *
--- 237,250 ----
  	 */
  	for (i = 0; i < 4; i++)
  		strcpy(fonts[i], ifonts[i]);
  
+ /*
+  * Should reset width to setting of PW  steve@gec-mi-at.co.uk
+  *	strcpy(width+2, "0");
+  */
+ 	sprintf(&width[2], "%d", PW);
+  	strcpy(indent+2, "0");
+  
  	/*
  	 *      read the control file for work to do
  	 *

|Steve Lademann		|Phone: 44 727 59292 x326		|
|Marconi Instruments Ltd|UUCP : ...mcvax!ukc!hrc63!miduet!steve	|
|St. Albans    AL4 0JN	|NRS  : steve@uk.co.gec-mi-at		|
|Herts.   UK		|	"disclaimers.all"