Viewing the clang(1) man page shows spurious floating point numbers, either "0.0", "3.5" or "7.0", scattered throughout the page:
These appear to be generated by the ".RS" line within a macro, as in the decompressed clang.1.bz2 man page source:
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
where the macro parameter to .INDENT is the spurious floating point number that appears.
When the .RS is seen in the REQ_RS case in scan_request(), if there are arguments scan_expression() is called to read the first argument. Unfortunately, scan_expression() simply sees the "\\$1" text and does not attempt to expand it as a macro argument. Since this string does not match any of the syntax known to scan_expression() the argument is ignored, the scan pointer is not advanced and the argument is output as if it were normal text.
This change recognises the "\\$1" syntax in scan_expression() and uses scan_escape_direct() to parse it. The string value is then converted to a number. It is only possible to return an integer (rounded) because scan_expression() only handles integers, but at least something approximate is returned and the argument is skipped and not output.