bug-gnulib
[Top][All Lists]
Advanced

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

Re: From wchar_t to char32_t


From: Bruno Haible
Subject: Re: From wchar_t to char32_t
Date: Sun, 02 Jul 2023 16:52:58 +0200

I wrote:
> In mbrtoc32:
> 
>        Return value       Consumed bytes
>        ------------       --------------
>        small n > 0        n
>        0                  1
>        (size_t)(-3)       0
> 
> The patch below thus fixes the uses of mbrtoc32.

More of the same kind:


2023-07-02  Bruno Haible  <bruno@clisp.org>

        mbsrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
        * lib/mbsrtoc32s.c (USES_C32): New macro.
        * lib/mbsrtowcs.c (USES_C32): New macro.
        * lib/mbsrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
        (size_t)(-3), don't increment the pointer.

2023-07-02  Bruno Haible  <bruno@clisp.org>

        mbsnrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
        * lib/mbsnrtoc32s.c (USES_C32): New macro.
        * lib/mbsnrtowcs.c (USES_C32): New macro.
        * lib/mbsnrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
        (size_t)(-3), don't increment the pointer.

Attachment: 0001-mbsnrtoc32s-Accommodate-a-difference-between-mbrtowc.patch
Description: Text Data

Attachment: 0002-mbsrtoc32s-Accommodate-a-difference-between-mbrtowc-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]