public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: Radisson <Radisson97@gmx.de>
Cc: Bruno Haible <bruno@clisp.org>,
	linux-man@vger.kernel.org, libc-alpha@sourceware.org,
	"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Subject: Re: new:mbrtoc32.3: convert from to c32
Date: Tue, 6 Jul 2021 13:06:10 +0200	[thread overview]
Message-ID: <a4c7ced6-8e28-3120-438c-af4ef0271c31@gmail.com> (raw)
In-Reply-To: <306efb49-83ee-bd23-7e98-33e38ae77634@gmx.de>

Hi,

On 7/5/21 11:09 PM, Radisson wrote:
> 
> 
> Am 05.07.21 um 21:07 schrieb Alejandro Colomar (man-pages):
>> Hello Bruno,
>>
>> On 7/4/21 12:26 PM, Bruno Haible wrote:
>>>> 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.
>>
>> Okay.  Indeed, the *wc* functions are documented separately.
> 
> I beg your pardon,
> we do not write a program, for the understanding of the function i found
> it much helpful to see the from-to connection.

No pardon needed :)
I don't have any strong feelings about how it should be organized in 
files.  There are 3 ways I see:

a) mbrtoc32 & mbrtowc together;  c32tombr & wctombr together
b) each one in a separate page
c) mbrtoc32 & c32tombr together;  mbrtowc separate from wctombr (as is now)

If you think any one is especially better than the rest, do it.


What I would like to especially make clear is the similarities and 
differences between those 2 sets of functions.  And not rewrite 
everything from scratch, because that causes 2 main problems:

* Maintainability: maintatining different pages that say the same in 
different ways is not a good thing, IMO.
* Confusion: Readers of the page may get the impression that the 2 sets 
of functions are considerably different if they are documented differently.

Thanks,

Alex

> 
>>
>>>
>>>> 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.
>>
>> Thanks for those details!
>>
>> Regards,
>>
>> Alex
>>
>>


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

  reply	other threads:[~2021-07-06 11:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 10:26 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) [this message]
     [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)

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=a4c7ced6-8e28-3120-438c-af4ef0271c31@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=Radisson97@gmx.de \
    --cc=bruno@clisp.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).