Re: [PATCH] mbsrtowcs.3: add a note for conversion completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux