[comp.bugs.4bsd] 4.3BSD lpd Bug

steve@gec-mi-at.co.uk (Steve Lademann) (07/08/87)

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"