jtkohl@athena.mit.edu (John T Kohl) (12/20/88)
Subject: 4.3BSD-tahoe: lpd gives bogus width fields to input filters Index: usr.lib 4.3BSD-tahoe Description: As distributed, the lpd code which forks off input filters will usually pass a bogus zero width as an argument to the filter. Repeat-By: Create a filter which displays its arguments onto some file or terminal, set up a printer with :pw#xxx: in the printcap, and notice that the page width specified becomes zero before being passed to the filter. Note that user-specified widths (lpr -wxxx) still work properly. Fix: printjob.c has a bogus strcpy() which fills in "0" for the width field, overwriting the values specified in the printcap file. *** /paris/u3/4.3tahoe/usr.lib/lpr/printjob.c Thu Jun 30 21:00:26 1988 --- printjob.c Tue Dec 20 09:47:31 1988 *************** *** 248,254 **** */ for (i = 0; i < 4; i++) strcpy(fonts[i], ifonts[i]); - strcpy(width+2, "0"); strcpy(indent+2, "0"); /* --- 248,253 ---- John Kohl <jtkohl@ATHENA.MIT.EDU> Digital Equipment Corporation/MIT Project Athena (As usual, the opinions expressed above do not necessarily reflect the opinions of my employer. :-)