4.2BSD lpd indentation bug
Chuck Privitera
crp at ccivax.UUCP
Sat Oct 27 00:34:23 AEST 1984
As noted by fluke!jeff:
> 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.
We fixed this one a long time ago. Forgot to post it to the net
though. Sorry. Lpd doesn't reset the page width passed on to pr(1)
either. So in addition to Jeff's fix:
> 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
> * .....
> */
> ==========================================================================
Add this line:
sprintf(width, "-w%d", PW); /* page width in characters */
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list