From: Andriy Utkin <andriy_utkin@fastmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH] mbsrtowcs.3: add a note for conversion completion
Date: Tue, 14 Nov 2023 09:47:36 +0000 [thread overview]
Message-ID: <ZVNCOHFFdSGn593o@dell> (raw)
In-Reply-To: <ZVM8Hzfw9CCRHWwR@debian>
On Tue, Nov 14, 2023 at 10:21:27AM +0100, Alejandro Colomar wrote:
> mbstowcs(3) has the following:
>
> In order to avoid the case 2 above, the programmer should make
> sure n is greater than or equal to mbstowcs(NULL,src,0)+1.
>
> We could add that.
That might have enlightened me! I like the wording, and indeed, having
it phrased the same way for these similar functions would be helpful.
> BTW, maybe you want to use mbstowcs(3), which is simpler.
Indeed I should have chosen that.
> I think we could add something saying that mbsrtowcs(3) is a
> restartable version of mbstowcs(3).
It might have helped me, and probably will help others.
Thanks Alejandro!
next prev parent reply other threads:[~2023-11-14 9:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 13:48 [PATCH] mbsrtowcs.3: add a note for conversion completion Andriy Utkin
2023-11-14 9:21 ` Alejandro Colomar
2023-11-14 9:47 ` Andriy Utkin [this message]
2023-11-14 10:04 ` Alejandro Colomar
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=ZVNCOHFFdSGn593o@dell \
--to=andriy_utkin@fastmail.com \
--cc=alx@kernel.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