Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!hubcap!ncrcae!sauron!wescott From: wescott@sauron.Columbia.NCR.COM (Mike Wescott) Newsgroups: comp.bugs.sys5 Subject: bug in pr(1) - with fix Message-ID: <1534@sauron.Columbia.NCR.COM> Date: 6 Feb 89 18:57:53 GMT Reply-To: wescott@sauron.Columbia.NCR.COM (Mike Wescott) Organization: Entry Level Systems Development, NCR Corp., Columbia, SC Lines: 26 If pr is used with an odd page length and double space is specified, only the first page will get printed. Fix: *** /tmp/pr.c.orig Mon Feb 6 10:44:14 1989 --- /tmp/pr.c Mon Feb 6 10:46:06 1989 *************** *** 376,382 **** p->c_ptr0 = p->c_ptr = s; if (p == &Colpts[Ncols]) return; (p++)->c_lno = Lnumb + bline; ! for (j = (Length - Margin)/Dblspace; --j >= 0; ++bline) for (Inpos = 0; ; ) { if ((c = getc(Files->f_f)) == EOF) { for (*s = EOF; p <= &Colpts[Ncols]; ++p) --- 376,382 ---- p->c_ptr0 = p->c_ptr = s; if (p == &Colpts[Ncols]) return; (p++)->c_lno = Lnumb + bline; ! for (j = (Length - Margin + Dblspace - 1)/Dblspace; --j >= 0; ++bline) for (Inpos = 0; ; ) { if ((c = getc(Files->f_f)) == EOF) { for (*s = EOF; p <= &Colpts[Ncols]; ++p) -- -Mike Wescott mike.wescott@ncrcae.Columbia.NCR.COM