[comp.bugs.sys5] bug in "pr".

root@merk.UUCP (Rich Brennan) (03/28/89)

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