From jeremyp@gsmx07.alcatel.com.au Mon Oct 25 22:22:26 1999
Return-Path: <jeremyp@gsmx07.alcatel.com.au>
Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10])
	by hub.freebsd.org (Postfix) with ESMTP id 8DF9B152F1
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Oct 1999 22:22:23 -0700 (PDT)
	(envelope-from jeremyp@gsmx07.alcatel.com.au)
Received: by border.alcanet.com.au id <40382>; Tue, 26 Oct 1999 15:17:24 +1000
Message-Id: <99Oct26.151724est.40382@border.alcanet.com.au>
Date: Tue, 26 Oct 1999 15:22:12 +1000
From: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
Reply-To: peter.jeremy@alcatel.com.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: Formatting man pages gives numeric expression expected error
X-Send-Pr-Version: 3.2

>Number:         14534
>Category:       bin
>Synopsis:       Formatting man pages gives numeric expression expected error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mpp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 25 22:30:00 PDT 1999
>Closed-Date:    Thu May 4 18:59:30 PDT 2000
>Last-Modified:  Thu May  4 18:59:50 PDT 2000
>Originator:     Peter Jeremy
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Alcatel Australia Limited
>Environment:

	cvs-cur 5781

>Description:

	Documents using the `-offset string' function in mdoc will report
	errors and fail to format in troff mode.  The mdoc macro tries
	to interpret `string' as a number to see if it matches the
	`-offset xxn' variant.  If the first character of string is not
	numeric, groff reports an error.

>How-To-Repeat:

	groff -man /usr/src/sbin/camcontrol/camcontrol.8 > /dev/null
	
	reports:

/usr/src/sbin/camcontrol/camcontrol.8:549: warning: numeric expression expected (got `f')
/usr/src/sbin/camcontrol/camcontrol.8:561: warning: numeric expression expected (got `f')
/usr/src/sbin/camcontrol/camcontrol.8:570: warning: numeric expression expected (got `f')
/usr/src/sbin/camcontrol/camcontrol.8:580: warning: numeric expression expected (got `f')
/usr/src/sbin/camcontrol/camcontrol.8:601: warning: numeric expression expected (got `f')
/usr/src/sbin/camcontrol/camcontrol.8:607: warning: numeric expression expected (got `f')
/usr/src/sbin/camcontrol/camcontrol.8:614: warning: numeric expression expected (got `f')
/usr/src/sbin/camcontrol/camcontrol.8:672: warning: numeric expression expected (got `f')

>Fix:

	Inserting a zero before the interpolated string silences the
	error and appears to generate correct output.

Index: tmac.doc
===================================================================
RCS file: /home/CVSROOT/src/contrib/groff/tmac/tmac.doc,v
retrieving revision 1.4
diff -u -r1.4 tmac.doc
--- tmac.doc	1999/09/22 22:36:16	1.4
+++ tmac.doc	1999/10/26 05:14:38
@@ -1661,8 +1661,8 @@
 .		nr iD \\n(iD+1
 .		sW "\\*(bY"
 .		ie \\n(sW>2 \{\
-.			ie ((\\*(bY>9n)&(\\*(bY<100n)) \{\
-.				nr O\\n(dP \\*(bY
+.			ie ((0\\*(bY>9n)&(0\\*(bY<100n)) \{\
+.				nr O\\n(dP 0\\*(bY
 .			\}
 .			el .nr O\\n(dP (\\n(sW)*\\n(fWu
 .		\}

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mpp 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Tue Oct 26 02:46:59 PDT 1999 
Responsible-Changed-Why:  
Over to Mr. Mdoc. 
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Thu May 4 18:59:30 PDT 2000 
State-Changed-Why:  
Fixed in rev 1.20 of camcontrol.8. 
>Unformatted:
