groff
[Top][All Lists]
Advanced

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

Re: pic anomalies


From: Steffen Nurpmeso
Subject: Re: pic anomalies
Date: Fri, 27 Dec 2019 22:50:23 +0100
User-agent: s-nail v14.9.15-262-g449d711c

Ingo Schwarze wrote in <address@hidden>:
 |Hi Doug,
 |
 |Steffen Nurpmeso wrote on Fri, Dec 27, 2019 at 06:45:23PM +0100:
 |
 |> Should be handled by [...]
 |
 |I believe the first patch that got sent to the list is incorrect.
 |
 |The parser in src/pre-pic/pic.y already parses '%%' correctly, so

The parser is total crap and uses two string searches.  It will
not stay that way here.

 |there is no need to change the parsing.  Only the assignment to
 |one_format needs to be corrected.  Besides, the "continue;" that
 |was inserted feels premature; i think appending to "result" at the
 |end of the while loop is still needed.

The patch was correct i would say, and especially avoids going
over a snprintf() call when there is only an escaped format
trigger to handle.  But, despite that, you are absolutely right
about the wording issue.

 |The existing text in doc/pic.ms uses the term "format string"
 |incorrectly.  That's the complete first argument to sprintf(3).
 |Saying that the format string must be "%e" would mean that the
 |argument cannot contain any additional characters.  The correct
 |term for something like "%e" according to the C standard is
 |"conversion specification".  Note that according to the C standard,
 |"%%" is also a conversion specification, so there is no need to
 |describe it using more words.
 |
 |With respect to src/preproc/pic/pic.1.man, "0123456789." are not
 |flags, so let's use a better wording.
 |
 |Doug, thank you for your report.  Could you please test and confirm
 |that this patch fixes all the issues you found?

Thanks.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]