Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 1999 15:22:12 +1000
From:      Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/14534: Formatting man pages gives numeric expression expected error
Message-ID:  <99Oct26.151724est.40382@border.alcanet.com.au>

next in thread | raw e-mail | index | archive | help

>Number:         14534
>Category:       bin
>Synopsis:       Formatting man pages gives numeric expression expected error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 25 22: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

>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Oct26.151724est.40382>