[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new module 'mbrtoc16'
From: |
Bruno Haible |
Subject: |
new module 'mbrtoc16' |
Date: |
Wed, 28 Jun 2023 19:20:24 +0200 |
These two patches add a module 'mbrtoc16', that implements the ISO C 23
function 'mbrtoc16'. This function is not particularly useful for GNU
programs, as it returns UTF-16 code points. Instead, I'm adding it in order
to understand the (size_t)(-3) return value of mbrtoc32, mbrtoc16, mbrtoc8.
It turns out that glibc, musl libc, and Windows implement this return value
convention as described in the standard, whereas Android implements just the
wrong way around. So, I'm now pretty confident to have understood this part
of ISO C 23 correctly :)
2023-06-28 Bruno Haible <bruno@clisp.org>
mbrtoc16: Add tests.
* tests/test-mbrtoc16.c: New file, based on tests/test-mbrtoc32.c.
* tests/test-mbrtoc16-1.sh: New file, based on tests/test-mbrtoc32-1.sh.
* tests/test-mbrtoc16-2.sh: New file, based on tests/test-mbrtoc32-2.sh.
* tests/test-mbrtoc16-3.sh: New file, based on tests/test-mbrtoc32-3.sh.
* tests/test-mbrtoc16-4.sh: New file, based on tests/test-mbrtoc32-4.sh.
* tests/test-mbrtoc16-5.sh: New file, based on tests/test-mbrtoc32-5.sh.
* tests/test-mbrtoc16-w32.c: New file, based on
tests/test-mbrtoc32-w32.c.
* tests/test-mbrtoc16-w32-1.sh: New file, based on
tests/test-mbrtoc32-w32-1.sh.
* tests/test-mbrtoc16-w32-2.sh: New file, based on
tests/test-mbrtoc32-w32-2.sh.
* tests/test-mbrtoc16-w32-3.sh: New file, based on
tests/test-mbrtoc32-w32-3.sh.
* tests/test-mbrtoc16-w32-4.sh: New file, based on
tests/test-mbrtoc32-w32-4.sh.
* tests/test-mbrtoc16-w32-5.sh: New file, based on
tests/test-mbrtoc32-w32-5.sh.
* tests/test-mbrtoc16-w32-6.sh: New file, based on
tests/test-mbrtoc32-w32-6.sh.
* tests/test-mbrtoc16-w32-7.sh: New file, based on
tests/test-mbrtoc32-w32-7.sh.
* modules/mbrtoc16-tests: New file, based on modules/mbrtoc32-tests.
mbrtoc16: New module.
* lib/uchar.in.h (mbrtoc16): New declaration.
* lib/mbrtoc16.c: New file.
* m4/mbrtoc16.m4: New file, based on m4/mbrtoc32.m4.
* modules/mbrtoc16: New file.
* m4/uchar_h.m4 (gl_UCHAR_H): Test whether mbrtoc16 is declared.
(gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBRTOC16.
(gl_UCHAR_H_DEFAULTS): Initialize HAVE_MBRTOC16, REPLACE_MBRTOC16.
* modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC16,
HAVE_MBRTOC16, REPLACE_MBRTOC16.
* doc/posix-functions/mbrtoc16.texi: Mention the mbrtoc16 module and the
mbsinit related limitation.
* doc/posix-functions/mbsinit.texi: Mention the mbrtoc16 related
limitation.
0001-mbrtoc16-New-module.patch
Description: Text Data
0002-mbrtoc16-Add-tests.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- new module 'mbrtoc16',
Bruno Haible <=