Article View: comp.bugs.sys5
Article #996bug in "pr".
From: Rich Brennan
Date: Tue, 28 Mar 1989 03:11
Date: Tue, 28 Mar 1989 03:11
54 lines
1668 bytes
1668 bytes
It seems "pr" has a problem with formfeeds when printing in two
columns. First, it prints the form feed line as a blank line, but
worse, it drops a line at the bottom of a column *for each form
feed* in that column!
I'm running on Xenix, and printing on an HP Laserjet in landscape mode.
The command I'm using is:
pr -2 -n -w180 -f <file> | lpr -oL -dlj
^^
This sets landscape mode on printer.
The "-w180" might be a little large, but it doesn't affect the outcome.
Compile and run the two programs, and redirect the output to two
files. Then print both files in two column mode. The file with
form feeds every 44 lines will skip lines as described above.
This problem also seems to exist on a client's 4.3BSD system which has
sys5 extensions.
--------
generate test1.out:
main()
{
int lineno;
lineno = 1;
while (lineno < 300) {
printf("This is line\t\t#%d\n", lineno);
++lineno;
}
}
------
generate test2.out:
main()
{
int lineno;
lineno = 1;
while (lineno < 300) {
if ((lineno % 44) == 0)
printf("This line has a FF\t#%d\n", lineno);
else
printf("This is line\t\t#%d\n", lineno);
++lineno;
}
}
Rrrrich
----
...!{uunet,linus!alliant}!merk!root Rich Brennan
Technical Details
Message-ID:
<393@merk.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!husc6!spdcc!merk!rootShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!husc6!spdcc!merk!root From: root@merk.UUCP (Rich Brennan) Newsgroups: comp.bugs.sys5 Subject: bug in "pr". Message-ID: <393@merk.UUCP> Date: 28 Mar 89 03:11:23 GMT Reply-To: root@merk.UUCP (Rich Brennan) Distribution: usa Organization: Technology Partners, Inc. Lines: 56