NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Strange formatting of literal block in bc(1) man page




I just happened to notice the following discrepancy.  The literal
block in the man-page source reads as

	For example, consider the following session.
	.Bd -literal -offset indent
	define py (y) { print "--->", y, "<---", "\n"; }
	define void px (x) { print "--->", x, "<---", "\n"; }
	py(1)
	--->1<---
	0
	px(1)
	--->1<---
	.Ed

Note that the two function definitions have a "\n" at the end of the
line.  When formatted by man(1) command we find it rendered as

     ...
     name.  For example, consider the following session.

           define py (y) { print "--->", y, "<---", "0; }
           define void px (x) { print "--->", x, "<---", "0; }
           py(1)
           --->1<---
           0
           px(1)
           --->1<---
     ...

Now the \n in the function definition is shown as "0 and attempting
to use what is shown as an example results in bc syntax error!  :-)

Is there some misssing additional quoting needed in the .1 file?  We
should at least strive to ensure examples actually work!

:)

+--------------------+--------------------------+----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:    |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost    |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost  |
| & Network Engineer |                          | pgoyette99%gmail.com@localhost |
+--------------------+--------------------------+----------------------+


Home | Main Index | Thread Index | Old Index