[PATCH] wcwidth: adjust manpage input (Re: [PATCH] fix wcwidth to work with gcc 16 sign extension)
Jon Turney
jon.turney@dronecode.org.uk
Fri Jun 19 13:54:08 GMT 2026
On 10/06/2026 17:44, Jeff Johnston wrote:
> Patch applied. Thanks.
>
> -- Jeff J.
>
> On Wed, Jun 10, 2026 at 10:16 AM Jon Turney <jon.turney@dronecode.org.uk>
> wrote:
>
>> On 08/06/2026 22:26, Jeff Johnston wrote:
>>> Patch applied.
>> 'make info' chokes on this.
>>
>>> MAKEINFO ../../../src/newlib/libc/libc.info
>>> wcwidth.def:34: misplaced {
>>> wcwidth.def:36: misplaced }
>>> wcwidth.def:38: misplaced {
>>> wcwidth.def:40: misplaced }
>>> wcwidth.def:44: misplaced {
>>> wcwidth.def:48: misplaced {
>>> wcwidth.def:48: misplaced }
>>> wcwidth.def:49: misplaced }
>>
>> I think this is because makedoc does not correctly escape '{' or '}' for
>> texinfo, outside of a fixed-width font section (which makedoc expects to
>> be marked-up with '.' or '|'at the start of lines -- see courierize in
>> makedoc.c)
>>
>> That's definitely a shortcoming in makedoc, but since this *is* a code
>> example, courierize-ing it seems appropriate.
>>
>> Patch attached.
>>
Huh, even now I don't think this is quite what the original patch intended.
> +EXAMPLE
> + An application function to determine the width of a 21-bit
> + Unicode character may look like this:
"EXAMPLE" is defined as a command in doc.str, but there are no existing
uses of it.
It's different to e.g. DESCRIPTION, RETURNS, PORTABILITY etc. in that it
doesn't emit a subheading "EXAMPLE", which I imagine is what was
expected here.
(If you look at the currently generated info page for wcwidth, this
example is part of the "RETURNS" subsection at the moment, which doesn't
seem right.)
I'll send another patch.
More information about the Newlib
mailing list