[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in pr?
From: |
Paul Eggert |
Subject: |
Re: Bug in pr? |
Date: |
Tue, 03 Jul 2007 11:34:38 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> Richard Stallman <address@hidden> wrote:
>> The pr program has what may arguably be a bug: when used with -F, it
>> ends the last line on a page with a newline. With the printer
>> here (and maybe all printers nowadays), that causes a blank page
>> after each real page.
I looked into this. GNU 'pr' differs from BSD 'pr' here, and I think
the difference explains the problem. With BSD 'pr', the -F option
affects only whether formfeeds or newlines are used to separate pages.
With GNU 'pr', -F also shrinks the header and omits the trailer of 5
blank lines. Omitting the trailer causes GNU pr to try to print on
the very last line of the output page, which is a portability hassle:
some printers and printer emulators ignore newline before formfeed on
the last line of a page, while others don't.
The simplest fix is to change GNU pr to behave like BSD pr. I'll
submit a patch along those lines shortly, to bug-coreutils. This is
an incompatible change, since it will output 7 fewer lines per page
when you specify -F; but it does make sense for -F to affect only
whether formfeeds are used, not the layout of the header and the
footer. I suspect GNU pr behaves the way that it does for
compatibility with Solaris /bin/pr, but that's less of a factor
nowadays.