Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!jtkohl From: jtkohl@athena.mit.edu (John T Kohl) Newsgroups: comp.bugs.4bsd Subject: 4.3BSD-tahoe: lpd gives bogus width fields to input filters Message-ID: <8523@bloom-beacon.MIT.EDU> Date: 20 Dec 88 14:50:47 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jtkohl@athena.mit.edu (John T Kohl) Organization: Massachusetts Institute of Technology Lines: 34 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 Digital Equipment Corporation/MIT Project Athena (As usual, the opinions expressed above do not necessarily reflect the opinions of my employer. :-)