From owner-freebsd-doc Mon Oct 25 20:30: 5 1999 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 4DCDC14E1F for ; Mon, 25 Oct 1999 20:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA47813; Mon, 25 Oct 1999 20:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 54D3514DD6 for ; Mon, 25 Oct 1999 20:28:07 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40340>; Tue, 26 Oct 1999 13:23:12 +1000 Message-Id: <99Oct26.132312est.40340@border.alcanet.com.au> Date: Tue, 26 Oct 1999 13:28:01 +1000 From: Peter Jeremy Reply-To: peter.jeremy@alcatel.com.au To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/14530: Printed manual pages have extraneous blank first page Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14530 >Category: docs >Synopsis: Printed manual pages have extraneous blank first page >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 25 20:30:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 4.0-CURRENT i386 >Organization: Alcatel Australia Limited >Environment: cvs-cur 5781, but this problem also exists in -stable >Description: Printed postscript manual pages start with an extraneous blank page. >How-To-Repeat: gzcat /usr/share/man/man3/cam.3.gz | groff -man | lp (or send output to ghostscript or similar). The first page is blank except for the footer line and the actual manual page begins on page 2. >Fix: gtroff appears to generate extraneous blank output for lines like . el .ie "\\$2"3.0" \c This causes the `.Os FreeBSD 3.0' line in the above example (and similar lines in many other FreeBSD man pages) to begin a page, which is then flushed by one of the later directives (probably either .Dt or .Sh). The following patch changes the logic from if (foo1) { } else if (foo2) { } ... to if (!foo1) if (!foo2) ... avoiding the need to insert an empty `then' clause. The code for the Fx macro is similar and an equivalent patch is appended, though this latter patch hasn't been verified. A positive side-effect of the patch is to remove a number of "unbalanced .el request" warnings if -ww is enabled. Index: doc-common =================================================================== RCS file: /home/CVSROOT/src/contrib/groff/tmac/doc-common,v retrieving revision 1.17 diff -u -r1.17 doc-common --- doc-common 1999/09/22 21:38:40 1.17 +++ doc-common 1999/10/26 03:03:20 @@ -230,31 +230,31 @@ .\} .if "\\$1"FreeBSD" \{\ . if "\\$2"2" .ds oS FreeBSD 2.0 -. ie \\n(.$==1 \c -. el .ie "\\$2"1.0" \c -. el .ie "\\$2"1.1" \c -. el .ie "\\$2"1.1.5" \c -. el .ie "\\$2"1.1.5.1" \c -. el .ie "\\$2"2" \c -. el .ie "\\$2"2.0" \c -. el .ie "\\$2"2.0.5" \c -. el .ie "\\$2"2.1" \c -. el .ie "\\$2"2.1.5" \c -. el .ie "\\$2"2.1.6" \c -. el .ie "\\$2"2.1.7" \c -. el .ie "\\$2"2.2" \c -. el .ie "\\$2"2.2.1" \c -. el .ie "\\$2"2.2.2" \c -. el .ie "\\$2"2.2.5" \c -. el .ie "\\$2"2.2.6" \c -. el .ie "\\$2"2.2.7" \c -. el .ie "\\$2"2.2.8" \c -. el .ie "\\$2"3.0" \c -. el .ie "\\$2"3.1" \c -. el .ie "\\$2"3.2" \c -. el .ie "\\$2"3.3" \c -. el .ie "\\$2"4.0" \c -. el .tm Unknown FreeBSD version ``\\$2'' at line \\n(c. +. if !\\n(.$==1 \ +. if !"\\$2"1.0" \ +. if !"\\$2"1.1" \ +. if !"\\$2"1.1.5" \ +. if !"\\$2"1.1.5.1" \ +. if !"\\$2"2" \ +. if !"\\$2"2.0" \ +. if !"\\$2"2.0.5" \ +. if !"\\$2"2.1" \ +. if !"\\$2"2.1.5" \ +. if !"\\$2"2.1.6" \ +. if !"\\$2"2.1.7" \ +. if !"\\$2"2.2" \ +. if !"\\$2"2.2.1" \ +. if !"\\$2"2.2.2" \ +. if !"\\$2"2.2.5" \ +. if !"\\$2"2.2.6" \ +. if !"\\$2"2.2.7" \ +. if !"\\$2"2.2.8" \ +. if !"\\$2"3.0" \ +. if !"\\$2"3.1" \ +. if !"\\$2"3.2" \ +. if !"\\$2"3.3" \ +. if !"\\$2"4.0" \ +. tm Unknown FreeBSD version ``\\$2'' at line \\n(c. .\} .if "\\*(oS"Null" \{\ . ds oS \&\\$1 Index: doc-syms =================================================================== RCS file: /home/CVSROOT/src/contrib/groff/tmac/doc-syms,v retrieving revision 1.22 diff -u -r1.22 doc-syms --- doc-syms 1999/09/07 10:33:34 1.22 +++ doc-syms 1999/10/26 03:02:39 @@ -160,29 +160,29 @@ .ds aa \&\f\\n(cF\s\\n(cZ .ds ab \& \& . ie \\n(.$==0 .rm ab -.el .ie "\\$1"1.0" \c -.el .ie "\\$1"1.1" \c -.el .ie "\\$1"1.1.5" \c -.el .ie "\\$1"1.1.5.1" \c -.el .ie "\\$1"2.0" \c -.el .ie "\\$1"2.0.5" \c -.el .ie "\\$1"2.1" \c -.el .ie "\\$1"2.1.5" \c -.el .ie "\\$1"2.1.6" \c -.el .ie "\\$1"2.1.7" \c -.el .ie "\\$1"2.2" \c -.el .ie "\\$1"2.2.1" \c -.el .ie "\\$1"2.2.2" \c -.el .ie "\\$1"2.2.5" \c -.el .ie "\\$1"2.2.6" \c -.el .ie "\\$1"2.2.7" \c -.el .ie "\\$1"2.2.8" \c -.el .ie "\\$1"3.0" \c -.el .ie "\\$1"3.1" \c -.el .ie "\\$1"3.2" \c -.el .ie "\\$1"3.3" \c -.el .ie "\\$1"4.0" \c -.el .ie "\\$1"," .rm ab \" Allow ".Fx ," +.el .if !"\\$1"1.0" \ +. if !"\\$1"1.1" \ +. if !"\\$1"1.1.5" \ +. if !"\\$1"1.1.5.1" \ +. if !"\\$1"2.0" \ +. if !"\\$1"2.0.5" \ +. if !"\\$1"2.1" \ +. if !"\\$1"2.1.5" \ +. if !"\\$1"2.1.6" \ +. if !"\\$1"2.1.7" \ +. if !"\\$1"2.2" \ +. if !"\\$1"2.2.1" \ +. if !"\\$1"2.2.2" \ +. if !"\\$1"2.2.5" \ +. if !"\\$1"2.2.6" \ +. if !"\\$1"2.2.7" \ +. if !"\\$1"2.2.8" \ +. if !"\\$1"3.0" \ +. if !"\\$1"3.1" \ +. if !"\\$1"3.2" \ +. if !"\\$1"3.3" \ +. if !"\\$1"4.0" \ +. ie "\\$1"," .rm ab \" Allow ".Fx ," .el .ie "\\$1"." .rm ab \" Allow ".Fx ." .el .tm Unknown FreeBSD version ``\\$1'' at line \\n(c. \&\\*(tNFreeBSD\\*(aa\\*(ab\\$1\\$2 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message