4.2BSD lpd indentation bug
Jeff Stearns
jeff at fluke.UUCP
Tue Oct 23 10:16:43 AEST 1984
Index: usr.lib/lpd/printjob.c 4.2BSD
Description:
If a job is queued to a printer with a request that it be indented,
subsequent printouts within the same queue run will be given the
same indentation.
The problem exists because the instantiation of /usr/lib/lpd which
processes the queue doesn't reset all its variables after printing
each job. Specifically, it doesn't reset the indent amount to zero.
Repeat-By:
Queue two files to a printer, asking that only the first be indented:
% lpr -i8 /tmp/foo; lpr /tmp/foo
Note that BOTH printouts will be indented.
Fix:
In the file usr.lib/lpd/printjob.c, find the function printit().
Add the one new line shown below in context.
==========================================================================
/*
* Reset troff fonts.
*/
for (i = 0; i < 4; i++)
strcpy(fonts[i], ifonts[i]);
ADD--> strcpy(indent, "-i0"); /* BUG FIX - reset indent amount to zero */
/*
* read the control file for work to do
* .....
*/
==========================================================================
Jeff Stearns (206) 356-5064
John Fluke Mfg. Co.
P.O. Box C9090 Everett WA 98043
{uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!jeff
--
Jeff Stearns (206) 356-5064
John Fluke Mfg. Co.
P.O. Box C9090 Everett WA 98043
{uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!jeff
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list