From tomdean@ix.netcom.com  Wed Apr 26 08:18:49 2000
Return-Path: <tomdean@ix.netcom.com>
Received: from smtp10.atl.mindspring.net (smtp10.atl.mindspring.net [207.69.200.246])
	by hub.freebsd.org (Postfix) with ESMTP id 8018F37BDC8
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Apr 2000 08:18:45 -0700 (PDT)
	(envelope-from tomdean@ix.netcom.com)
Received: from ix.netcom.com (sil-wa15-33.ix.netcom.com [207.93.148.33])
	by smtp10.atl.mindspring.net (8.9.3/8.8.5) with ESMTP id LAA09224
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Apr 2000 11:18:42 -0400 (EDT)
Received: (from tomdean@localhost)
	by ix.netcom.com (8.9.3/8.9.3) id IAA10736;
	Wed, 26 Apr 2000 08:18:33 -0700 (PDT)
	(envelope-from tomdean)
Message-Id: <200004261518.IAA10736@ix.netcom.com>
Date: Wed, 26 Apr 2000 08:18:33 -0700 (PDT)
From: "Thomas D. Dean" <tomdean@ix.netcom.com>
Reply-To: tomdean@ix.netcom.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: man and nroff -mdoc produce extra blank lines.
X-Send-Pr-Version: 3.2

>Number:         18233
>Category:       docs
>Synopsis:       man and nroff -mdoc produce extra blank lines.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    asmodai
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 26 08:20:01 PDT 2000
>Closed-Date:    Mon Oct 30 05:48:45 PST 2000
>Last-Modified:  Mon Oct 30 05:49:13 PST 2000
>Originator:     Thomas D. Dean
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:

	

>Description:
'man make' has extra (doubled) blank lines in it.  Several other
man pages have extra blank lines in them.  The template man page
with only .Sh and .Pp plus pain text [A-Za-z]* in it will contain
extra blank lines.  'nroff -man' and 'nroff -mdoc' both exhibit
the problem.


>How-To-Repeat:

The following script will produce a nroff source file that will
duplicate the problem.  'xx.sh > xx.1' followed by 'nroff -mdoc xx.1'
The output will have an extra blank line at line number 66.  Pipe
the output of nroff into 'grep -n ".*"' to see line numbers.
If the number of sections is increased from 10 to 30, lines
66, 132, 198, etc will be extra blank lines.  If xx.1 is placed in
the MANPATH, 'man xx' will produce the problem.

#! /bin/sh
# generate a man page which will have an extra blank line
cat <<EOF
.Dd DATE
.Os
.Dt XX 1
.Sh NAME
.Nm xx
.Nd This will produce blank line errors.
EOF
section=0
paragraph=0
while [ $section -lt 10 ]; do
    echo ".Sh Section Number ${section}"
    section=`expr ${section} + 1`
    n=0
    while [ $n -lt 3 ]; do
	echo "This is paragraph ${paragraph}."
	echo ".Pp"
	paragraph=`expr ${paragraph} + 1`
	n=`expr $n + 1`
    done
done

>Fix:

	


>Release-Note:
>Audit-Trail:

From: Mike Pritchard <mpp@mppsystems.com>
To: "Thomas D. Dean" <tomdean@ix.netcom.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: docs/18233: man and nroff -mdoc produce extra blank lines.
Date: Wed, 26 Apr 2000 12:17:48 -0500

 On Wed, Apr 26, 2000 at 08:18:33AM -0700, Thomas D. Dean wrote:
 > >Synopsis:       man and nroff -mdoc produce extra blank lines.
 > >Description:
 > 'man make' has extra (doubled) blank lines in it.  Several other
 > man pages have extra blank lines in them.  The template man page
 > with only .Sh and .Pp plus pain text [A-Za-z]* in it will contain
 > extra blank lines.  'nroff -man' and 'nroff -mdoc' both exhibit
 > the problem.
 > 
 > >How-To-Repeat:
 > 
 > The following script will produce a nroff source file that will
 > duplicate the problem.  'xx.sh > xx.1' followed by 'nroff -mdoc xx.1'
 > The output will have an extra blank line at line number 66.  Pipe
 > the output of nroff into 'grep -n ".*"' to see line numbers.
 > If the number of sections is increased from 10 to 30, lines
 > 66, 132, 198, etc will be extra blank lines.  If xx.1 is placed in
 > the MANPATH, 'man xx' will produce the problem.
 
 The extra blank lines are at page breaks within the man page.
 66 lines of text is one printed page of output.  132 lines of text
 is two pages of text, etc.  
 
 -Mike
 -- 
 Mike Pritchard
 mpp@FreeBSD.org or mpp@mppsystems.com
 
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Sat May 13 07:45:22 PDT 2000 
State-Changed-Why:  
As per mpp's explanation: the blank lines are occurring at page 
breaks by intention. 

From: "Thomas D. Dean" <tomdean@ix.netcom.com>
To: hoek@FreeBSD.org
Cc: freebsd-doc@FreeBSD.org
Subject: Re: docs/18233
Date: Mon, 15 May 2000 18:58:37 -0700 (PDT)

 The behavior of page breaks depends on context.  Adding a line to a
 man page can change the behavior, from having one extra blank line to
 not having extra blank lines.
 
 tomdean
 
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-doc" in the body of the message
 

From: "Thomas D. Dean" <tomdean@ix.netcom.com>
To: vanderh@ecf.utoronto.ca
Cc: freebsd-doc@FreeBSD.org
Subject: Re: docs/18233
Date: Mon, 15 May 2000 19:58:37 -0700 (PDT)

 I have included two examples.
 
 The first has EXTRA blank lines at page boundaries.
 
 The second has three blank lines after after the line 'bin directory':
 
 FILES
      src/Makefile              A make file that will build a project in the
                                bin directory.
 
 
 
      src/project_name.c        The main() function.
 
 tomdean
 
 ===== example 1 ==========
 #! /bin/sh
 
 # generate a man page which will have extra blank lines
 
 cat <<EOF
 .Dd DATE
 .Os
 .Dt XX_TEST 1
 .Sh NAME
 .Nm xx_test
 .Nd This will produce blank line errors.
 EOF
 
 section=0
     paragraph=0
 
 while [ $section -lt 30 ]; do
     echo ".Sh Section Number ${section}"
     section=`expr ${section} + 1`
     n=0
     while [ $n -lt 3 ]; do
         echo "This is paragraph ${paragraph}."
         echo ".Pp"
         paragraph=`expr ${paragraph} + 1`
         n=`expr $n + 1`
     done
 done
 
 ==== example 2 ============
 .\" Copyright (c)
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
 .\" 1. Redistributions of source code must retain the above copyright
 .\"    notice, this list of conditions and the following disclaimer.
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
 .\" $Id$
 .Dd April 23, 2000
 .Dt APPL_SETUP 1
 .Os FreeBSD 3.4
 .Sh NAME
 .Nm appl_setup
 .Nd An application development tree maintenance tool.
 .Sh SYNOPSIS
 .Nm
 .Op Fl a Ar component
 .Op Fl Cc
 .Op Fl f Ar file_name Ar include_file
 .Op Fl h
 .Op Fl i Ar file_name
 .Op Fl l
 .Op Fl m Ar man_section
 .Op Fl p Ar project_name
 .Sh DESCRIPTION
 .Nm
 is a perl script that aids in creating and managing application development
 trees.
 .Sh OPTIONS
 The options are as follows:
 .Bl -tag -width "-f file name include file"
 .It Fl a Ar component
 Add a component to the directory tree.
 .Bl -tag -width "library" -compact
 .It Library
 Add a library sub-directory to the project tree.
 .It Include
 Add a include sub-directory to the project tree.
 .El
 .It Fl C
 Create a
 .Sy C++
 project.  Not implemented.
 .It Fl c
 Import the project into
 .Sy CVS
 as version 0.9.0.
 .It Fl f Ar file_name Ar include_file
 .Pp
 create a new source file named
 .Pa file_name.c
 including
 .Pa include_file.h.
 The source file will have a integer function named
 .Fn file_name
 The author is the output of
 .Sy whoami.
 If specified,
 .Fl p
 will create a source file with a
 .Fn main
 function.
 .It Fl h
 Help.
 .It Fl i Ar file_name
 create a new c type include file named
 .Pa file_name.h.
 The include file will have a standard comment header and
 and the #ifdef ...  #endif brackets to prevent multiple inclusion
 .It Fl l
 create a library sub-directory
 The default is to not create the library sub-directory
 .It Fl m Ar man_section_number
 create a man page for man.number.  The default is to not create the
 man page.
 .It Fl p Ar project_name
 Create a new project named project_name.
 The project will be created at the current directory level and have a tree
 consisting of the bin, include, obj, and, src directories.
 A file containing a main function will be created, named project_name.c
 .El
 .Sh ENVIRONMENT
 The
 .Nm
 command ignores the
 .Ev APPL_SETUP
 environment variable.
 .Sh FILES
 .Bl -tag -width "include/project_name.def"
 .It Pa src/Makefile
 A make file that will build a project in the bin directory.
 .It Pa src/project_name.c
 The
 .Fn main
 function.
 .It Pa include/project_name.h
 The primary local include file.
 .It Pa include/project_name.def
 A message and return code definitio file.  See
 .Pa bin/mkError.awk
 and
 .Pa bin/mkErrorStr.awk.
 .It Pa obj/Makefile
 A link to
 .Pa src/Makefile.
 .It Pa bin/mkError.awk
 The awk script to build definitions from a definition file.
 .It Pa bin/mkErrorStr.awk
 The awk script to build error message definitions from a definition
 file.
 .El
 .Sh EXAMPLES
 .Nm
 .Fl p Ar myProject
 .Pp
 This command will create a project tree in the current directory.  The
 project tree will consist of bin, include, obj, and, src directories.
 The src directory will contain a Makefile and myProject.c main
 application.  The include directory will contain a myProject.h The
 Makefile will not allow making in the src directory.  The obj
 directory contains a Makefile, linked to
 .Pa ../src/Makefile.
 The result
 of make will produce an executable named myProject in the bin
 directory.
 .Sh DIAGNOSTICS
 Exit status is 0 on success, and negative if the command
 fails for one of the following reasons
 .Sh COMPATIBILITY
 The
 .Nm
 command has no known compatibility issues.
 .Sh SEE ALSO
 .Sh STANDARDS
 .Sh HISTORY
 .Sh AUTHORS
 This
 manual page was written by
 .An Thomas D. Dean
 .Sh BUGS
 .Nm
 is in its infancy.
 .Nm
 will create a workable application development tree.
 Maintenance functions are missing.
 .Sh TODO
 I need help in designing
 .Nm
 What functionality is needed?  Desireable?
 
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-doc" in the body of the message
 

From: Tim Vanderhoek <vanderh@ecf.utoronto.ca>
To: "Thomas D. Dean" <tomdean@ix.netcom.com>
Cc: freebsd-doc@FreeBSD.org
Subject: Re: docs/18233
Date: Mon, 15 May 2000 22:27:04 -0400

 On Mon, May 15, 2000 at 06:58:37PM -0700, Thomas D. Dean wrote:
 >
 > The behavior of page breaks depends on context.  Adding a line to a
 > man page can change the behavior, from having one extra blank line to
 > not having extra blank lines.
 
 I'll need you to give me an example where the output is incorrect.
 
 
 -- 
 Signature withheld by request of author.
 
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-doc" in the body of the message
 
State-Changed-From-To: closed->open 
State-Changed-By: hoek 
State-Changed-When: Wed May 17 14:42:12 PDT 2000 
State-Changed-Why:  
It's not clear what's going on at page breaks.  That doesn't necessarily 
mean it's a bug, but I am curious to know what's going on. 

From: Tim Vanderhoek <vanderh@ecf.utoronto.ca>
To: "Thomas D. Dean" <tomdean@ix.netcom.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: docs/18233
Date: Wed, 17 May 2000 17:42:08 -0400

 On Mon, May 15, 2000 at 07:58:37PM -0700, Thomas D. Dean wrote:
 >
 > I have included two examples.
 > 
 > The first has EXTRA blank lines at page boundaries.
 > 
 > The second has three blank lines after after the line 'bin directory':
 
 Well, I can't explain what's going on, but I'm not quite convinced
 it's a bug, either.  I played with troff a little, and have confirmed
 that their are 66 lines_per_page, which doesn't help much.  I'll
 re-open the PR, but maybe James Clark, author of groff, would be a
 better resource for this problem.
 
 
 -- 
 Signature withheld by request of author.
 
State-Changed-From-To: open->analyzed 
State-Changed-By: asmodai 
State-Changed-When: Mon May 29 14:04:23 PDT 2000 
State-Changed-Why:  
I am already on the case. 

Just for info, the blank line happens after line 66.  Does 
that ring a bell? =) 

It's the pagebreak.  Now to find where it messes that up. 


Responsible-Changed-From-To: freebsd-doc->asmodai 
Responsible-Changed-By: asmodai 
Responsible-Changed-When: Mon May 29 14:04:23 PDT 2000 
Responsible-Changed-Why:  
On the case. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18233 
State-Changed-From-To: analyzed->closed 
State-Changed-By: asmodai 
State-Changed-When: Mon Oct 30 05:48:45 PST 2000 
State-Changed-Why:  
ru or phantom committed a fix to both CURRENT and STABLE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18233 
>Unformatted:
