From jeremyp@gsmx07.alcatel.com.au  Thu May 30 21:51:41 2002
Return-Path: <jeremyp@gsmx07.alcatel.com.au>
Received: from alcanet.com.au (mail2.alcanet.com.au [203.62.196.17])
	by hub.freebsd.org (Postfix) with ESMTP id 0EDCA37B405
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 May 2002 21:51:39 -0700 (PDT)
Received: from mfg1.cim.alcatel.com.au (localhost.localdomain [127.0.0.1])
	by alcanet.com.au (8.12.1/8.12.1/Alcanet1.2) with ESMTP id g4V4pbs7003024
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 May 2002 14:51:37 +1000
Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au
 (PMDF V5.2-32 #37640) with ESMTP id <01KIDQRO0YTC8X8OEN@cim.alcatel.com.au>
 for FreeBSD-gnats-submit@freebsd.org; Fri, 31 May 2002 14:51:33 +1000
Received: from gsmx07.alcatel.com.au (localhost [127.0.0.1])
	by gsmx07.alcatel.com.au (8.12.3/8.12.3) with ESMTP id g4V4pR9l045344; Fri,
 31 May 2002 14:51:27 +1000
Received: (from jeremyp@localhost)
	by gsmx07.alcatel.com.au (8.12.3/8.12.3/Submit) id g4V4pP47045343; Fri,
 31 May 2002 14:51:26 +1000 (EST)
Message-Id: <200205310451.g4V4pP47045343@gsmx07.alcatel.com.au>
Date: Fri, 31 May 2002 14:51:26 +1000 (EST)
From: Peter Jeremy <peter.jeremy@alcatel.com.au>
Reply-To: Peter Jeremy <peter.jeremy@alcatel.com.au>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Shrinking text on vinum(4) man page
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38760
>Category:       kern
>Synopsis:       Shrinking text on vinum(4) man page
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    grog
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 30 22:00:06 PDT 2002
>Closed-Date:    Thu May 30 23:19:33 PDT 2002
>Last-Modified:  Thu May 30 23:19:33 PDT 2002
>Originator:     Peter Jeremy
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Alcatel Australia Limited
>Environment:
System: FreeBSD gsmx07.alcatel.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Tue May 7 08:15:34 EST 2002 root@:/usr/obj/3.0/cvs/src/sys/gsmx i386


	Problem also exists in -STABLE.
>Description:
	When formatting vinum(4) as Postscript, the text starting from
	the section "DEBUGGING PROBLEMS WITH VINUM" shrinks following
	each example, becoming illegibly small during the "Kernel
	Panics" section.  The line spacing for the two lines following
	"Configuration problems" is also smaller than it should be.

	The man page include raw groff markup to shrink the size and
	line-spacing of examples in this section by 3p.
	Unfortunately, it seems that either the .Bd or .Ed macros
	include a pointsize change so that the trailing "revert to
	previous pointsize" command actually reverts to the smaller
	point size.  The next example then shrinks that by a further
	3p.  And so on...

>How-To-Repeat:

	$ groff -mdoc /usr/src/share/man/man4/vinum.4 >/tmp/vinum.ps
	View or print /tmp/vinum.ps

>Fix:

	A cleaner and more general solution would be to extend mdoc to
	allow examples to be shown in a smaller point size.  The
	following patch just places the pointsize and spacing changes
	within the .Bd/.Ed block so that the "revert to previous
	pointsize/spacing" commands apply to the appropriate size change.

Index: vinum.4
===================================================================
RCS file: /home/CVSROOT/src/share/man/man4/vinum.4,v
retrieving revision 1.42
diff -u -r1.42 vinum.4
--- vinum.4	16 May 2002 05:21:44 -0000	1.42
+++ vinum.4	31 May 2002 04:34:41 -0000
@@ -720,36 +720,36 @@
 .Nm
 configuration.  If you do, the first thing you should do is stop configuration
 updates:
+.Bd -literal
 .if t .ps -3
 .if t .vs -3
-.Bd -literal
 # vinum setdaemon 4
-.Ed
 .if t .vs
 .if t .ps
+.Ed
 .Pp
 This will stop updates and any further corruption of the on-disk configuration.
 .Pp
 Next, look at the on-disk configuration, using a Bourne-style shell:
+.Bd -literal
 .if t .ps -3
 .if t .vs -3
-.Bd -literal
 # rm -f log
 # for i in /dev/da0s1h /dev/da1s1h /dev/da2s1h /dev/da3s1h; do
     (dd if=$i skip=8 count=6|tr -d '\e000-\e011\e200-\e377'; echo) >> log
   done
-.Ed
 .if t .vs
 .if t .ps
+.Ed
 .Pp
 The names of the devices are the names of all
 .Nm
 slices.  The file
 .Pa log
 should then contain something like this:
+.Bd -literal
 .if t .ps -3
 .if t .vs -3
-.Bd -literal
 IN VINOpanic.lemis.comdrive1}6E7~^K6T^Yfoovolume obj state up
 volume src state up
 volume raid state down
@@ -769,9 +769,9 @@
 sd name obj.p1.s1 drive drive2 plex obj.p1 state reborn len 204800b driveoffset 409865b plexoffset 128b
 sd name obj.p1.s2 drive drive3 plex obj.p1 state up len 204800b driveoffset 265b plexoffset 256b
 sd name obj.p1.s3 drive drive4 plex obj.p1 state up len 204800b driveoffset 409865b plexoffset 384b
-.Ed
 .if t .vs
 .if t .ps
+.Ed
 .Pp
 The first line contains the
 .Nm
@@ -904,9 +904,9 @@
 .Ar debug
 command of
 .Xr vinum 8 :
+.Bd -literal
 .if t .ps -3
 .if t .vs -3
-.Bd -literal
 GDB 4.16 (i386-unknown-freebsd), Copyright 1996 Free Software Foundation, Inc.
 Debugger (msg=0xf1093174 "vinum debug") at ../../i386/i386/db_interface.c:318
 318                 in_Debugger = 0;
@@ -934,21 +934,21 @@
 #9  0x804832d in ?? ()
 #10 0x80482ad in ?? ()
 #11 0x80480e9 in ?? ()
-.Ed
 .if t .vs
 .if t .ps
+.Ed
 .Pp
 When entering from the debugger, it's important that the source of frame 1
 (listed by the
 .Pa .gdbinit
 file at the top of the example) contains the text
+.Bd -literal
 .if t .ps -3
 .if t .vs -3
-.Bd -literal
 Debugger ("vinum debug");
-.Ed
 .if t .vs
 .if t .ps
+.Ed
 .Pp
 This is an indication that the address specifications are correct.  If you get
 some other output, your symbols and the kernel module are out of sync, and the
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: grog 
State-Changed-When: Thu May 30 23:17:23 PDT 2002 
State-Changed-Why:  
Problem kludged around. 


Responsible-Changed-From-To: freebsd-bugs->grog 
Responsible-Changed-By: grog 
Responsible-Changed-When: Thu May 30 23:17:23 PDT 2002 
Responsible-Changed-Why:  
grog closed this PR. 

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

Greg Lehey, 31 May 2002

Ugh.  Doesn't that look terrible?  It looks as if troff isn't
recognizing .vs and .ps without an argument.  I've put exlicit
arguments in, and it now formats almost OK.  Breaking in pathnames is
still an isssue.

PR closed.
