public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Re: new:mbrtoc32.3: convert from to c32
@ 2021-07-04 10:26 Bruno Haible
  2021-07-05 19:07 ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 8+ messages in thread
From: Bruno Haible @ 2021-07-04 10:26 UTC (permalink / raw)
  To: alx.manpages, libc-alpha, linux-man, Peter Radisson

> mbrtoc32, c32rtomb \- convert between multibyte sequence and 32-bit wide character

I would suggest two separate man pages for these functions.
Rationale:
It is rare that some code uses mbrtoc32 and c32rtomb in the same function.
(Basically, functions that do input call mbrtoc32, and functions that do
output call c32rtomb.) And the description of mbrtoc32 is a bit complex.

> Are there any important differences compared to the already-documented
> and C99-compliant mbrtowc(3) and wcrtomb(3)?  I mean, apart from the
> types of the parameters.

No for c32rtomb, but yes for mbrtoc32: mbrtowc has the special return
values (size_t)-1 and (size_t)-2, whereas mbrtoc32 also has the special
return value (size_t)-3. Although, on glibc currently this special
return value (size_t)-3 cannot occur. But IMO the man page should
mention it nevertheless, otherwise people write code that is not
future-proof.

Bruno


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <60cfa510.GHWZSa6DNoE9MWRF%Radisson97@gmx.de>]

end of thread, other threads:[~2021-07-06 11:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-04 10:26 new:mbrtoc32.3: convert from to c32 Bruno Haible
2021-07-05 19:07 ` Alejandro Colomar (man-pages)
2021-07-05 21:09   ` Radisson
2021-07-06 11:06     ` Alejandro Colomar (man-pages)
     [not found] <60cfa510.GHWZSa6DNoE9MWRF%Radisson97@gmx.de>
2021-07-03 17:40 ` Alejandro Colomar (man-pages)
2021-07-03 18:01   ` Alejandro Colomar (man-pages)
2021-07-05 20:31     ` Radisson
2021-07-06 10:57       ` Alejandro Colomar (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).