Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ccivax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!rochester!ritcv!ccivax!crp From: crp@ccivax.UUCP (Chuck Privitera) Newsgroups: net.bugs.4bsd Subject: Re: 4.2BSD lpd indentation bug Message-ID: <205@ccivax.UUCP> Date: Fri, 26-Oct-84 09:34:23 EST Article-I.D.: ccivax.205 Posted: Fri Oct 26 09:34:23 1984 Date-Received: Sun, 28-Oct-84 06:37:07 EST References: <1892@vax4.fluke.UUCP> Organization: CCI Telephony Systems Group, Rochester NY Lines: 37 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 */