public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: alx.manpages@gmail.com, libc-alpha@sourceware.org,
	linux-man@vger.kernel.org, Peter Radisson <Radisson97@gmx.de>
Subject: Re: new:mbrtoc32.3: convert from to c32
Date: Sun, 04 Jul 2021 12:26:31 +0200	[thread overview]
Message-ID: <8295983.X7ISPF4pOe@omega> (raw)

> 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


             reply	other threads:[~2021-07-04 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 10:26 Bruno Haible [this message]
2021-07-05 19:07 ` new:mbrtoc32.3: convert from to c32 Alejandro Colomar (man-pages)
2021-07-05 21:09   ` Radisson
2021-07-06 11:06     ` Alejandro Colomar (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
2021-06-20 20:29 Radisson97
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)
2021-06-20 20:28 Radisson97

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8295983.X7ISPF4pOe@omega \
    --to=bruno@clisp.org \
    --cc=Radisson97@gmx.de \
    --cc=alx.manpages@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox