]> Savannah Git Hosting - gnulib.git/log
gnulib.git
21 months agowctype: Work around wctype+iswctype bug on MSVC.
Bruno Haible [Wed, 26 Jul 2023 13:12:47 +0000 (15:12 +0200)]
wctype: Work around wctype+iswctype bug on MSVC.

* m4/wctype.m4 (gl_FUNC_WCTYPE): In the test program, test also for the
MSVC bug. Update cross-compilation guess.
* doc/posix-functions/wctype.texi: Mention the MSVC bug.

21 months agowctype: Work around wctype bug on mingw.
Bruno Haible [Wed, 26 Jul 2023 12:50:00 +0000 (14:50 +0200)]
wctype: Work around wctype bug on mingw.

* lib/wctype.in.h (rpl_wctype_t, wctype_t, GNULIB_defined_wctype_t):
Define if REPLACE_WCTYPE is 1.
(wctype): Consider REPLACE_WCTYPE.
(iswctype): Override also if REPLACE_WCTYPE is 1.
* lib/iswctype.c: If GNULIB_defined_wctype_t is defined, use the
function-pointer based implementation.
* m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTYPE.
* m4/wctype.m4 (gl_FUNC_WCTYPE): Define through AC_DEFUN_ONCE. Test
whether wctype supports the "blank" character class. Set REPLACE_WCTYPE
if not.
* m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Require gl_FUNC_WCTYPE.
* modules/wctype (Status, Notice): Remove.
(Depends-on): Add iswctype. Consider REPLACE_WCTYPE.
(configure.ac): Consider REPLACE_WCTYPE.
* modules/iswctype (Status, Notice): Remove.
(Files): Add m4/wctype.m4.
(configure.ac): Override also if REPLACE_WCTYPE is 1.
* modules/wctype-h (Makefile.am): Substitute REPLACE_WCTYPE.
* doc/posix-functions/wctype.texi: Mention the mingw bug.

21 months agowctype-h: Work around iswprint bug on mingw.
Bruno Haible [Wed, 26 Jul 2023 12:13:48 +0000 (14:13 +0200)]
wctype-h: Work around iswprint bug on mingw.

* lib/wctype.in.h (rpl_iswprint): On mingw, don't use the system's
iswprint function.
* tests/test-wctype-h.c (main): Verify that this character class
contains the ASCII space but not tab and newline.
* tests/test-c32isprint.c (main): For tab, \v, \f, expect the same value
on native Windows as on other platforms.
* doc/posix-functions/iswprint.texi: Mention the mingw bug.

21 months agoiswblank tests: Add more tests.
Bruno Haible [Wed, 26 Jul 2023 11:48:25 +0000 (13:48 +0200)]
iswblank tests: Add more tests.

* tests/test-iswblank.c (main): Verify that this character class
contains the ASCII space and tab, but not newline.

21 months agowctype, wctrans: Require a non-NULL argument.
Bruno Haible [Wed, 26 Jul 2023 11:40:06 +0000 (13:40 +0200)]
wctype, wctrans: Require a non-NULL argument.

* lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL.
(wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)).
* modules/wctype-h (Depends-on): Add snippet/arg-nonnull.
(Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.

21 months agoiswctype: Add tests.
Bruno Haible [Tue, 25 Jul 2023 21:39:15 +0000 (23:39 +0200)]
iswctype: Add tests.

* tests/test-iswctype.c: New file, based on
tests/test-c32_apply_type_test.c.
* tests/test-c32_apply_type_test.c (main): Update accordingly.
* modules/iswctype-tests: New file.

21 months agowctype: Add tests.
Bruno Haible [Tue, 25 Jul 2023 21:38:03 +0000 (23:38 +0200)]
wctype: Add tests.

* tests/test-wctype.c: New file, based on
tests/test-c32_get_type_test.c.
* modules/wctype-tests: New file.

21 months agoCompile benchmark programs without assertions.
Bruno Haible [Tue, 25 Jul 2023 20:56:19 +0000 (22:56 +0200)]
Compile benchmark programs without assertions.

* modules/mbiter-bench-tests (Makefile.am): Compile bench-mbiter with
-DNDEBUG.
* modules/mbiterf-bench-tests (Makefile.am): Compile bench-mbiterf with
-DNDEBUG.
* modules/mbuiter-bench-tests (Makefile.am): Compile bench-mbuiter with
-DNDEBUG.
* modules/mbuiterf-bench-tests (Makefile.am): Compile bench-mbuiterf
with -DNDEBUG.
* modules/mbswidth-bench-tests (Makefile.am): Compile bench-mbswidth
with -DNDEBUG.
* modules/crypto/md5-buffer-tests (Makefile.am): Compile bench-md5 with
-DNDEBUG.
* modules/crypto/sha1-buffer-tests (Makefile.am): Compile bench-sha1
with -DNDEBUG.
* modules/crypto/sha256-buffer-tests (Makefile.am): Compile bench-sha224
and bench-sha256 with -DNDEBUG.
* modules/crypto/sha512-buffer-tests (Makefile.am): Compile bench-sha384
and bench-sha512 with -DNDEBUG.

21 months agounistr/u8-*: Make Unicode decoder more Unicode Standard compliant.
Bruno Haible [Tue, 25 Jul 2023 20:20:51 +0000 (22:20 +0200)]
unistr/u8-*: Make Unicode decoder more Unicode Standard compliant.

Based on a remark by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00120.html>.

* tests/unistr/test-u8-mbtouc.c (test_safe_function): Change expected
results for "non-shortest form" or out-of-range byte sequences. Add new
test cases of incomplete well-formed byte sequences.
* tests/unistr/test-u8-mbsnlen.c (main): Likewise.
* lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Reject a first byte in the
range 0xF5..0xF7 as invalid. Distinguish incomplete from invalid byte
sequences correctly. For the former, return only the number of bytes in
the maximal well-formed subpart.
* lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
* lib/unistr/u8-check.c (u8_check): Reject a first byte in the range
0xF5..0xF7 as invalid.
* lib/unistr/u8-mblen.c (u8_mblen): Likewise.
* lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
* lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
* lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
* lib/unistr/u8-prev.c (u8_prev): Likewise.

21 months agofnmatch: Overcome wchar_t limitations.
Bruno Haible [Mon, 24 Jul 2023 10:08:23 +0000 (12:08 +0200)]
fnmatch: Overcome wchar_t limitations.

* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on
AIX in 32-bit mode.
* lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h.
(UCHAR_TO_WCHAR): Renamed from BTOWC.
(WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR,
TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros.
(IS_CHAR_CLASS): Use WCTYPE instead of wctype.
(UCHAR_TO_WCHAR): Use BTOWC instead of btowc.
(FOLD): Use TOWLOWER instead of towlower.
(CHAR): Use WCHAR_T instead of wchar_t.
(UCHAR, INT): Use WINT_T instead of wint_t.
(STRLEN): Use WCSLEN instead of wcslen.
(STRCAT): Use WCSCAT instead of wcscat.
(MEMPCPY): Use WMEMPCPY instead of wmempcpy.
(MEMCHR): Use WMEMCHR instead of wmemchr.
(is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of
wchar_t, WCTYPE instead of wctype.
(fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of
mbsrtowcs.
* lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE
instead of iswctype. Update for renamed BTOWC.
* modules/fnmatch (Depends-on): Add btoc32, c32tolower,
c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr,
unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen.
(Link): Add $(LIBUNISTRING).
* modules/fnmatch-tests (Makefile.am): Link test-fnmatch with
$(LIBUNISTRING).
* doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX
bug descriptions to the "fixed by Gnulib" section.

21 months agofnmatch: Update doc regarding Solaris 10.
Bruno Haible [Mon, 24 Jul 2023 09:10:15 +0000 (11:10 +0200)]
fnmatch: Update doc regarding Solaris 10.

* doc/posix-functions/fnmatch.texi: Move the Solaris 10 bug description
to the "fixed by Gnulib" section.

21 months agotimespec_get: port to Ubuntu 23.04
Paul Eggert [Mon, 24 Jul 2023 00:58:03 +0000 (17:58 -0700)]
timespec_get: port to Ubuntu 23.04

* m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET):
Default REPLACE_TIMESPEC_GET to 0, fixing a typo.

21 months agounistr/u32-strcat: Relicense under LGPLv2+.
Bruno Haible [Mon, 24 Jul 2023 00:00:42 +0000 (02:00 +0200)]
unistr/u32-strcat: Relicense under LGPLv2+.

* modules/unistr/u32-strcat (License): Change to LGPLv2+.
* lib/unistr/u32-strcat.c: Update license notice.
* lib/unistr/u-strcat.h: Likewise.

21 months agounistr/u32-strlen: Relicense under LGPLv2+.
Bruno Haible [Mon, 24 Jul 2023 00:00:37 +0000 (02:00 +0200)]
unistr/u32-strlen: Relicense under LGPLv2+.

* modules/unistr/u32-strlen (License): Change to LGPLv2+.
* lib/unistr/u32-strlen.c: Update license notice.

21 months agounistr/u32-chr: Relicense under LGPLv2+.
Bruno Haible [Mon, 24 Jul 2023 00:00:13 +0000 (02:00 +0200)]
unistr/u32-chr: Relicense under LGPLv2+.

* modules/unistr/u32-chr (License): Change to LGPLv2+.
* lib/unistr/u32-chr.c: Update license notice.

21 months agoutimecmp: clean up old spare1 cruft
Paul Eggert [Sun, 23 Jul 2023 18:35:10 +0000 (11:35 -0700)]
utimecmp: clean up old spare1 cruft

* lib/utimecmp.c: Remove a ‘defined HAVE_STRUCT_STAT_ST_SPARE1’
that has been false since 2007.

21 months agofnmatch tests: Avoid a test failure on FreeBSD.
Bruno Haible [Sun, 23 Jul 2023 14:49:22 +0000 (16:49 +0200)]
fnmatch tests: Avoid a test failure on FreeBSD.

* tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper()
mapping of 'ö', not of 'ü'.

21 months agofnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
Bruno Haible [Sun, 23 Jul 2023 13:26:28 +0000 (15:26 +0200)]
fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.

* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Add three more test cases to
the test program. Reorganize its return values.
* tests/test-fnmatch.c (main): Reflect the changes done in fnmatch.m4.
* doc/posix-functions/fnmatch.texi: Move the corresponding bug
descriptions to the "fixed by Gnulib" section.

21 months agofnmatch, fnmatch-gnu: Document known bugs.
Bruno Haible [Sun, 23 Jul 2023 12:04:59 +0000 (14:04 +0200)]
fnmatch, fnmatch-gnu: Document known bugs.

* doc/posix-headers/fnmatch.texi: Mention the macros FNM_LEADING_DIR,
FNM_CASEFOLD, FNM_EXTMATCH, FNM_FILE_NAME.
* doc/posix-functions/fnmatch.texi: Reference the glibc documentation
and the Linux man page. Document the effects of the two modules and all
the known bugs in detail.

21 months agofnmatch tests: Add many more test cases.
Bruno Haible [Sat, 22 Jul 2023 23:43:43 +0000 (01:43 +0200)]
fnmatch tests: Add many more test cases.

* lib/fnmatch.in.h (GNULIB_defined_fnmatch_function): New macro.
* tests/test-fnmatch.c: Add many more test cases.
* tests/test-fnmatch-1.sh: New file, based on tests/test-mbrtoc32-5.sh.
* tests/test-fnmatch-2.sh: New file, based on tests/test-mbrtoc32-1.sh.
* tests/test-fnmatch-3.sh: New file, based on tests/test-mbrtoc32-2.sh.
* tests/test-fnmatch-4.sh: New file, based on tests/test-mbrtoc32-3.sh.
* tests/test-fnmatch-5.sh: New file, based on tests/test-mbrtoc32-4.sh.
* tests/test-fnmatch-w32.c: New file, based on tests/test-mbrtoc32-w32.c
and tests/test-fnmatch.c.
* tests/test-fnmatch-w32-1.sh: New file, based on
tests/test-mbrtoc32-w32-1.sh.
* tests/test-fnmatch-w32-2.sh: New file, based on
tests/test-mbrtoc32-w32-2.sh.
* tests/test-fnmatch-w32-3.sh: New file, based on
tests/test-mbrtoc32-w32-3.sh.
* tests/test-fnmatch-w32-4.sh: New file, based on
tests/test-mbrtoc32-w32-4.sh.
* tests/test-fnmatch-w32-5.sh: New file, based on
tests/test-mbrtoc32-w32-5.sh.
* tests/test-fnmatch-w32-6.sh: New file, based on
tests/test-mbrtoc32-w32-6.sh.
* tests/test-fnmatch-w32-7.sh: New file, based on
tests/test-mbrtoc32-w32-7.sh.
* modules/fnmatch-tests: Add the new program and shell scripts.

21 months agodoc: Mention a wctype bug.
Bruno Haible [Sat, 22 Jul 2023 22:32:47 +0000 (00:32 +0200)]
doc: Mention a wctype bug.

* doc/posix-functions/wctype.texi: Mention a bug on mingw.

21 months agoautoupdate
Karl Berry [Fri, 21 Jul 2023 14:43:18 +0000 (07:43 -0700)]
autoupdate

21 months agounistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: Add tests.
Bruno Haible [Fri, 21 Jul 2023 09:22:27 +0000 (11:22 +0200)]
unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: Add tests.

* tests/unistr/test-pcpy.h: New file, based on tests/unistr/test-cpy.h.
* tests/unistr/test-u8-pcpy.c: New file, based on
tests/unistr/test-u8-cpy.c.
* tests/unistr/test-u16-pcpy.c: New file, based on
tests/unistr/test-u16-cpy.c.
* tests/unistr/test-u32-pcpy.c: New file, based on
tests/unistr/test-u32-cpy.c.
* modules/unistr/u8-pcpy-tests: New file, based on
modules/unistr/u8-cpy-tests.
* modules/unistr/u16-pcpy-tests: New file, based on
modules/unistr/u16-cpy-tests.
* modules/unistr/u32-pcpy-tests: New file, based on
modules/unistr/u32-cpy-tests.

21 months agounistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: New modules.
Bruno Haible [Fri, 21 Jul 2023 09:16:04 +0000 (11:16 +0200)]
unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: New modules.

* lib/unistr.in.h (u8_pcpy, u16_pcpy, u32_pcpy): New declarations.
* lib/unistr/u-pcpy.h: New file, based on lib/wmempcpy.c.
* lib/unistr/u8-pcpy.c: New file, based on lib/unistr/u8-cpy.c.
* lib/unistr/u16-pcpy.c: New file, based on lib/unistr/u16-cpy.c.
* lib/unistr/u32-pcpy.c: New file, based on lib/unistr/u32-cpy.c.
* modules/unistr/u8-pcpy: New file, based on modules/unistr/u8-cpy.
* modules/unistr/u16-pcpy: New file, based on modules/unistr/u16-cpy.
* modules/unistr/u32-pcpy: New file, based on modules/unistr/u32-cpy.

21 months agoerror-h: Fix dependencies.
Bruno Haible [Thu, 20 Jul 2023 14:33:31 +0000 (16:33 +0200)]
error-h: Fix dependencies.

Reported by <cbh34680@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00111.html>.

* modules/error-h (Depends-on): Add include_next.

21 months agofts: fix compilation errors with fts_cross_check()
Pádraig Brady [Thu, 20 Jul 2023 14:08:27 +0000 (15:08 +0100)]
fts: fix compilation errors with fts_cross_check()

* lib/fts.c: Fix printf format chars.
* lib/fts_.h: Provide a declaration for users.

21 months agoDocument migration path for obsolescent functions.
Bruno Haible [Wed, 19 Jul 2023 23:35:10 +0000 (01:35 +0200)]
Document migration path for obsolescent functions.

* doc/glibc-functions/timespec_get.texi: Add reference to ISO C.
* doc/posix-functions/_tolower.texi: Recommend use of tolower.
* doc/posix-functions/_toupper.texi: Recommend use of toupper.
* doc/posix-functions/asctime.texi: Recommend use of strftime.
* doc/posix-functions/asctime_r.texi: Likewise.
* doc/posix-functions/ctime.texi: Recommend use of localtime_r and
strftime.
* doc/posix-functions/ctime_r.texi: Likewise.
* doc/posix-functions/ftw.texi: Recommend use of fts.
* doc/posix-functions/getitimer.texi: Recommend use of timer_gettime.
* doc/posix-functions/gets.texi: Recommend use of fgets.
* doc/posix-functions/gettimeofday.texi: Recommend use of gettime or
timespec_get.
* doc/posix-functions/inet_addr.texi: Recommend use of inet_pton.
* doc/posix-functions/inet_ntoa.texi: Recommend use of inet_ntop.
* doc/posix-functions/pthread_getconcurrency.texi: Recommend no-op.
* doc/posix-functions/pthread_setconcurrency.texi: Recommend no-op.
* doc/posix-functions/rand_r.texi: Recommend use of random_r.
* doc/posix-functions/setitimer.texi: Recommend use of timer_create and
timer_settime.
* doc/posix-functions/setpgrp.texi: Recommend use of setpgid or setsid.
* doc/posix-functions/sighold.texi: Recommend use of sigprocmask.
* doc/posix-functions/sigignore.texi: Recommend use of sigaction.
* doc/posix-functions/siginterrupt.texi: Recommend use of sigaction.
* doc/posix-functions/sigpause.texi: Recommend use of sigsuspend.
* doc/posix-functions/sigrelse.texi: Recommend use of sigprocmask.
* doc/posix-functions/sigset.texi: Recommend use of sigaction.
* doc/posix-functions/tempnam.texi: Recommend use of mkstemp.
* doc/posix-functions/ulimit.texi: Recommend use of getrlimit and
setrlimit.
* doc/posix-functions/utime.texi: Recommend use of utimens.

21 months agoDocument POSIX obsolescence
Paul Eggert [Wed, 19 Jul 2023 20:51:55 +0000 (13:51 -0700)]
Document POSIX obsolescence

* doc/posix-functions/_longjmp.texi, doc/posix-functions/_setjmp.texi:
* doc/posix-functions/_tolower.texi, doc/posix-functions/_toupper.texi:
* doc/posix-functions/asctime.texi, doc/posix-functions/asctime_r.texi:
* doc/posix-functions/ctime.texi, doc/posix-functions/ctime_r.texi:
* doc/posix-functions/encrypt.texi, doc/posix-functions/ftw.texi:
* doc/posix-functions/getitimer.texi, doc/posix-functions/gets.texi:
* doc/posix-functions/gettimeofday.texi:
* doc/posix-functions/inet_addr.texi:
* doc/posix-functions/inet_ntoa.texi, doc/posix-functions/isascii.texi:
* doc/posix-functions/pthread_getconcurrency.texi:
* doc/posix-functions/pthread_setconcurrency.texi:
* doc/posix-functions/rand_r.texi, doc/posix-functions/setitimer.texi:
* doc/posix-functions/setkey.texi, doc/posix-functions/setpgrp.texi:
* doc/posix-functions/sighold.texi, doc/posix-functions/sigignore.texi:
* doc/posix-functions/siginterrupt.texi:
* doc/posix-functions/sigpause.texi, doc/posix-functions/sigrelse.texi:
* doc/posix-functions/sigset.texi, doc/posix-functions/tempnam.texi:
* doc/posix-functions/toascii.texi, doc/posix-functions/ulimit.texi:
* doc/posix-functions/utime.texi:
Update as per draft 3 of POSIX 10003.1-202x.

21 months agoDon’t worry about Version 7 tolower
Paul Eggert [Wed, 19 Jul 2023 20:51:55 +0000 (13:51 -0700)]
Don’t worry about Version 7 tolower

Some code ported back to pre-C89 libraries where tolower (C) had
undefined behavior if C is not an upper case character.
Nowadays that function is _tolower which is itself obsolete,
and much Gnulib code already assumes this part of C89 anyway.
Assume C89 or better tolower, which simplifies the code
and should improve performance slightly.
* lib/mbmemcasecmp.c, lib/mbmemcasecoll.c, lib/mbscasecmp.c:
* lib/mbscasestr.c, lib/mbsncasecmp.c, lib/mbspcasecmp.c:
* lib/strcasecmp.c, lib/strcasestr.c, lib/strncasecmp.c:
(TOLOWER): Remove.  All uses replaced by tolower.

21 months agoc32swidth, mbszero: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:43:50 +0000 (22:43 +0200)]
c32swidth, mbszero: Fix file list.

* modules/c32swidth (Files): Add locale-ja.m4, locale-zh.m4, codeset.m4.
* modules/mbszero (Files): Likewise.

21 months agowcsnrtombs: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:25:30 +0000 (22:25 +0200)]
wcsnrtombs: Fix file list.

* modules/wcsnrtombs (Files): Add locale-fr.m4.

21 months agombsnrtowcs: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:24:27 +0000 (22:24 +0200)]
mbsnrtowcs: Fix file list.

* modules/mbsnrtowcs (Files): Add locale-fr.m4, codeset.m4.

21 months agombrtoc16: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:23:23 +0000 (22:23 +0200)]
mbrtoc16: Fix file list.

* modules/mbrtoc16 (Files): Add locale-zh.m4.

21 months agombrlen: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:21:47 +0000 (22:21 +0200)]
mbrlen: Fix file list.

* modules/mbrlen (Files): Add locale-fr.m4, locale-ja.m4, locale-zh.m4,
codeset.m4.

21 months agombiterf, mbuiterf: port to strict C17
Paul Eggert [Wed, 19 Jul 2023 03:33:41 +0000 (20:33 -0700)]
mbiterf, mbuiterf: port to strict C17

I ran into this problem on NetBSD 9.3.
* lib/mbiterf.h (mbiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
* lib/mbuiterf.h (mbuiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
Don’t label a declaration.

21 months agombiter, mbiterf, mbuiter, mbuiterf: Force inlining with clang.
Bruno Haible [Tue, 18 Jul 2023 12:10:33 +0000 (14:10 +0200)]
mbiter, mbiterf, mbuiter, mbuiterf: Force inlining with clang.

* lib/mbiter.h (MBITER_INLINE): Use _GL_ATTRIBUTE_ALWAYS_INLINE.
* lib/mbiterf.h (MBITERF_INLINE): Likewise.
* lib/mbuiter.h (MBUITER_INLINE): Likewise.
* lib/mbuiterf.h (MBUITERF_INLINE): Likewise.

21 months agombsspn: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:46:29 +0000 (13:46 +0200)]
mbsspn: Optimize.

* lib/mbsspn.c: Include mbuiterf.h instead of mbuiter.h.
(mbsspn): Use mbuif_* macros instead of mbui_* macros.
* modules/mbsspn (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombscspn: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:44:39 +0000 (13:44 +0200)]
mbscspn: Optimize.

* lib/mbscspn.c: Include mbuiterf.h instead of mbuiter.h.
(mbscspn): Use mbuif_* macros instead of mbui_* macros.
* modules/mbscspn (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombspbrk: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:43:38 +0000 (13:43 +0200)]
mbspbrk: Optimize.

* lib/mbspbrk.c: Include mbuiterf.h instead of mbuiter.h.
(mbspbrk): Use mbuif_* macros instead of mbui_* macros.
* modules/mbspbrk (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombspcasecmp: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:40:11 +0000 (13:40 +0200)]
mbspcasecmp: Optimize.

* lib/mbspcasecmp.c: Include mbuiterf.h instead of mbuiter.h.
(mbspcasecmp): Use mbuif_* macros instead of mbui_* macros.
* modules/mbspcasecmp (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombsncasecmp: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:36:00 +0000 (13:36 +0200)]
mbsncasecmp: Optimize.

* lib/mbsncasecmp.c: Include mbuiterf.h instead of mbuiter.h.
(mbsncasecmp): Use mbuif_* macros instead of mbui_* macros.
* modules/mbsncasecmp (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombscasecmp: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:35:10 +0000 (13:35 +0200)]
mbscasecmp: Optimize.

* lib/mbscasecmp.c: Include mbuiterf.h instead of mbuiter.h.
(mbscasecmp): Use mbuif_* macros instead of mbui_* macros.
* modules/mbscasecmp (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombssep: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:33:08 +0000 (13:33 +0200)]
mbssep: Optimize.

* lib/mbssep.c: Include mbuiterf.h instead of mbuiter.h.
(mbssep): Use mbuif_* macros instead of mbui_* macros.
* modules/mbssep (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombsrchr: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:30:18 +0000 (13:30 +0200)]
mbsrchr: Optimize.

* lib/mbsrchr.c: Include mbuiterf.h instead of mbuiter.h.
(mbsrchr): Use mbuif_* macros instead of mbui_* macros.
* modules/mbsrchr (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombschr: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:29:14 +0000 (13:29 +0200)]
mbschr: Optimize.

* lib/mbschr.c: Include mbuiterf.h instead of mbuiter.h.
(mbschr): Use mbuif_* macros instead of mbui_* macros.
* modules/mbschr (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombslen: Optimize.
Bruno Haible [Tue, 18 Jul 2023 11:27:44 +0000 (13:27 +0200)]
mbslen: Optimize.

* lib/mbslen.c: Include mbuiterf.h instead of mbuiter.h.
(mbslen): Use mbuif_* macros instead of mbui_* macros.
* modules/mbslen (Depends-on): Add mbuiterf. Remove mbuiter.

21 months agombuiterf: Add a benchmark.
Bruno Haible [Tue, 18 Jul 2023 11:25:43 +0000 (13:25 +0200)]
mbuiterf: Add a benchmark.

* tests/bench-mbuiterf.c: New file, based on tests/bench-mbuiter.c.
* modules/mbuiterf-bench-tests: New file, based on
modules/mbuiter-bench-tests.

21 months agombuiterf: New module.
Bruno Haible [Tue, 18 Jul 2023 11:24:35 +0000 (13:24 +0200)]
mbuiterf: New module.

* lib/mbuiterf.h: New file, based on lib/mbuiter.h.
* lib/mbuiterf.c: New file, based on lib/mbuiter.c.
* modules/mbuiterf: New file, based on modules/mbuiter.

21 months agombiterf: Fix compiler warnings.
Bruno Haible [Tue, 18 Jul 2023 11:04:04 +0000 (13:04 +0200)]
mbiterf: Fix compiler warnings.

* lib/mbiterf.h (mbiterf_next): Use C99 designated initializer syntax.
* tests/bench-mbiterf.c (do_test): Use a 'const char *' pointer.

21 months agotrim: Optimize.
Bruno Haible [Tue, 18 Jul 2023 10:23:12 +0000 (12:23 +0200)]
trim: Optimize.

* lib/trim.c: Include mbiterf.h instead of mbiter.h.
(trim2): Use mbif_* macros instead of mbi_* macros.
* modules/trim (Depends-on): Add mbiterf. Remove mbiter.

21 months agombmemcasecmp: Optimize.
Bruno Haible [Tue, 18 Jul 2023 10:21:46 +0000 (12:21 +0200)]
mbmemcasecmp: Optimize.

* lib/mbmemcasecmp.c: Include mbiterf.h instead of mbiter.h.
(mbmemcasecmp): Use mbif_* macros instead of mbi_* macros.
* modules/mbmemcasecmp (Depends-on): Add mbiterf. Remove mbiter.

21 months agombsnlen: Optimize.
Bruno Haible [Tue, 18 Jul 2023 10:19:58 +0000 (12:19 +0200)]
mbsnlen: Optimize.

* lib/mbsnlen.c: Include mbiterf.h instead of mbiter.h.
(mbsnlen): Use mbif_* macros instead of mbi_* macros.
* modules/mbsnlen (Depends-on): Add mbiterf. Remove mbiter.

21 months agombiterf: Add a benchmark.
Bruno Haible [Tue, 18 Jul 2023 10:15:59 +0000 (12:15 +0200)]
mbiterf: Add a benchmark.

* tests/bench-mbiterf.c: New file, based on tests/bench-mbiter.c.
* modules/mbiterf-bench-tests: New file, based on
modules/mbiter-bench-tests.

21 months agombiterf: New module.
Bruno Haible [Tue, 18 Jul 2023 10:13:57 +0000 (12:13 +0200)]
mbiterf: New module.

* lib/mbiterf.h: New file, based on lib/mbiter.h.
* lib/mbiterf.c: New file, based on lib/mbiter.c.
* modules/mbiterf: New file, based on modules/mbiter.

21 months agombstok_r: Simplify dependencies.
Bruno Haible [Tue, 18 Jul 2023 09:43:00 +0000 (11:43 +0200)]
mbstok_r: Simplify dependencies.

* lib/mbstok_r.c: Include <stdlib.h> instead of mbuiter.h.
* modules/mbstok_r (Depends-on): Remove mbuiter.

21 months agoannounce-gen: Allow using local git user.name.
Simon Josefsson [Mon, 17 Jul 2023 20:07:57 +0000 (22:07 +0200)]
announce-gen: Allow using local git user.name.

* build-aux/announce-gen (readable_interval): Remove --global
parameter to 'git config' call.

21 months agombuiter: Optimize.
Bruno Haible [Mon, 17 Jul 2023 18:50:30 +0000 (20:50 +0200)]
mbuiter: Optimize.

* lib/mbuiter.h (struct mbuiter_multi): Add cur_max field.
(mbui_init): Initialize it.
(mbuiter_multi_next): Use it instead of MB_CUR_MAX.
(mbuiter_multi_copy): Update.

21 months agombchar: Reduce size of 'struct mbchar'. Part 2.
Bruno Haible [Mon, 17 Jul 2023 17:50:27 +0000 (19:50 +0200)]
mbchar: Reduce size of 'struct mbchar'. Part 2.

* lib/mbchar.h (mb_setascii): Disable if the module 'mbfile' is not in use.
(mb_copy): Update.

21 months agombchar: Reduce size of 'struct mbchar'.
Bruno Haible [Mon, 17 Jul 2023 17:11:38 +0000 (19:11 +0200)]
mbchar: Reduce size of 'struct mbchar'.

* modules/mbfile (configure.ac): Define GNULIB_MBFILE as an indicator.
* lib/mbchar.h (MBCHAR_BUF_SIZE): Set to 4.
(struct mbchar): Disable member 'buf' if the module 'mbfile' is not in
use.

21 months agombszero: Fix for Minix.
Bruno Haible [Mon, 17 Jul 2023 16:56:19 +0000 (18:56 +0200)]
mbszero: Fix for Minix.

* lib/wchar.in.h: (_GL_MBSTATE_INIT_SIZE): Don't define on Minix.
(_GL_MBSTATE_ZERO_SIZE): Define to 4 on Minix.

21 months agombszero: Source code tweaks.
Bruno Haible [Mon, 17 Jul 2023 16:00:24 +0000 (18:00 +0200)]
mbszero: Source code tweaks.

Suggested by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00084.html>.

* lib/wchar.in.h: Comment changes.
(_GL_MBSTATE_INIT_SIZE): Don't define on NetBSD, Solaris, native
Windows. Use a safe default at the end.
(_GL_MBSTATE_ZERO_SIZE): Don't define on AIX, IRIX, Solaris, native
Windows. Use a safe default at the end.
* lib/mbrtoc16.c: Update comments accordingly.

21 months agodfa: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:31:02 +0000 (07:31 +0200)]
dfa: Optimize clearing an mbstate_t.

* lib/dfa.c (mbszero) [GAWK]: Add fallback definition.
(mbs_to_wchar, lex, addtok_wc, dfaexec_main): Use mbszero.
* modules/dfa (Depends-on): Add mbszero.

21 months agouchar-c23: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:59 +0000 (07:30 +0200)]
uchar-c23: Optimize clearing an mbstate_t.

* lib/lc-charset-unicode.c (locale_encoding_to_unicode,
unicode_to_locale_encoding): Use mbszero.
* modules/uchar-c23 (Depends-on): Add mbszero.

21 months agoquotearg: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:57 +0000 (07:30 +0200)]
quotearg: Optimize clearing an mbstate_t.

* lib/quotearg.c: Include <wchar.h>.
(quotearg_buffer_restyled): Use mbszero.
* modules/quotearg (Depends-on): Add mbszero.

21 months agovasnprintf, vasnwprintf: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:55 +0000 (07:30 +0200)]
vasnprintf, vasnwprintf: Optimize clearing an mbstate_t.

* lib/vasnprintf.c (VASNPRINTF): Use mbszero.
* modules/vasnprintf (Depends-on): Add mbszero.
* modules/vasnwprintf (Depends-on): Likewise.
* modules/c-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.

21 months agombmemcasecoll: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:52 +0000 (07:30 +0200)]
mbmemcasecoll: Optimize clearing an mbstate_t.

* lib/mbmemcasecoll.c (apply_c32tolower): Use mbszero.
* modules/mbmemcasecoll (Depends-on): Add mbszero.

21 months agombswidth: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:50 +0000 (07:30 +0200)]
mbswidth: Optimize clearing an mbstate_t.

* lib/mbswidth.c (mbsnwidth): Use mbszero.
* modules/mbswidth (Depends-on): Add mbszero.

21 months agombfile: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:48 +0000 (07:30 +0200)]
mbfile: Optimize clearing an mbstate_t.

* lib/mbfile.h (mbfile_multi_getc, mbf_init): Use mbszero.
* modules/mbfile (Depends-on): Add mbszero.

21 months agombuiter: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:46 +0000 (07:30 +0200)]
mbuiter: Optimize clearing an mbstate_t.

* lib/mbuiter.h: Include <wchar.h>.
(mbuiter_multi_next, mbuiter_multi_copy, mbui_init): Use mbszero.
* modules/mbuiter (Depends-on): Add mbszero.

21 months agombiter: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:43 +0000 (07:30 +0200)]
mbiter: Optimize clearing an mbstate_t.

* lib/mbiter.h: Include <wchar.h>.
(mbiter_multi_next, mbiter_multi_copy, mbi_init): Use mbszero.
* modules/mbiter (Depends-on): Add mbszero.

21 months agoc32stombs: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:41 +0000 (07:30 +0200)]
c32stombs: Optimize clearing an mbstate_t.

* lib/c32stombs.c (c32stombs): Use mbszero.
* lib/uchar.in.h (c32stombs): Likewise.
* modules/c32stombs (Depends-on): Add mbszero.

21 months agombstoc32s: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:37 +0000 (07:30 +0200)]
mbstoc32s: Optimize clearing an mbstate_t.

* lib/mbstoc32s.c (mbstoc32s): Use mbszero.
* lib/uchar.in.h (mbstoc32s): Likewise.
* modules/mbstoc32s (Depends-on): Add mbszero.

21 months agombstowcs: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:35 +0000 (07:30 +0200)]
mbstowcs: Optimize clearing an mbstate_t.

* lib/mbstowcs.c (mbstowcs): Use mbszero.
* modules/mbstowcs (Depends-on): Add mbszero.

21 months agoc32tob: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:33 +0000 (07:30 +0200)]
c32tob: Optimize clearing an mbstate_t.

* lib/c32tob.c (c32tob): Use mbszero.
* modules/c32tob (Depends-on): Add mbszero.

21 months agowctomb: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:30 +0000 (07:30 +0200)]
wctomb: Optimize clearing an mbstate_t.

* lib/wctomb-impl.h (wctomb): Use mbszero.
* modules/wctomb (Depends-on): Add mbszero.

21 months agobtoc32: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:27 +0000 (07:30 +0200)]
btoc32: Optimize clearing an mbstate_t.

* lib/btoc32.c: Include <wchar.h>.
(btoc32): Use mbszero.
* modules/btoc32 (Depends-on): Add mbszero.

21 months agobtowc: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:25 +0000 (07:30 +0200)]
btowc: Optimize clearing an mbstate_t.

* lib/btowc.c (btowc): Use mbszero.
* modules/btowc (Depends-on): Add mbszero.

21 months agombrtoc32: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:22 +0000 (07:30 +0200)]
mbrtoc32: Optimize clearing an mbstate_t.

* lib/mbrtoc32.c (mbrtoc32): Use mbszero.
* modules/mbrtoc32 (Depends-on): Add mbsinit, mbszero.

21 months agombtowc: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:20 +0000 (07:30 +0200)]
mbtowc: Optimize clearing an mbstate_t.

* lib/mbtowc-impl.h (mbtowc): Use mbszero.
* modules/mbtowc (Depends-on): Add mbszero.

21 months agombszero: New module.
Bruno Haible [Sun, 16 Jul 2023 05:30:15 +0000 (07:30 +0200)]
mbszero: New module.

* lib/wchar.in.h: Include <string.h>.
(_GL_MBSTATE_INIT_SIZE, _GL_MBSTATE_ZERO_SIZE): New macros.
(mbszero): New declaration.
* lib/mbrtoc16.c: Update comments.
* lib/mbszero.c: New file.
* m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_MBSZERO.
* modules/wchar (Depends-on): Add extern-inline.
(Makefile.am): Substitute GNULIB_MBSZERO.
* modules/mbszero: New file.

21 months agombsinit: Fix module description.
Bruno Haible [Sat, 15 Jul 2023 20:47:26 +0000 (22:47 +0200)]
mbsinit: Fix module description.

* modules/mbsinit (Files): Add m4/mbrtowc.m4.

21 months agoc32_apply_type_test: Fix compilation error with GCC < 9.
Bruno Haible [Sat, 15 Jul 2023 07:47:06 +0000 (09:47 +0200)]
c32_apply_type_test: Fix compilation error with GCC < 9.

* lib/uchar.in.h (c32_apply_type_test) [_GL_WCHAR_T_IS_UCS4]: Remove
_GL_ARG_NONNULL attribute.

21 months agombchar: Optimize is_basic.
Bruno Haible [Thu, 13 Jul 2023 21:23:41 +0000 (23:23 +0200)]
mbchar: Optimize is_basic.

* lib/mbchar.h (is_basic_table): Remove declaration.
(is_basic) [IS_BASIC_ASCII]: Define through a simple range test.
* lib/mbchar.c (is_basic_table): Remove array.

21 months agolocalcharset: Clean up locale encodings used by glibc.
Bruno Haible [Thu, 13 Jul 2023 20:59:48 +0000 (22:59 +0200)]
localcharset: Clean up locale encodings used by glibc.

* lib/localcharset.h: Remove VISCII from the list, since never supported
in glibc/localedata/SUPPORTED. JOHAB is not supported by glibc any more
since 2000-09-25. TCVN5712-1 is not supported by glibc any more since
2012-05-21.

21 months agodoc: Mention c32_get_mapping, c32_apply_mapping.
Bruno Haible [Thu, 13 Jul 2023 11:42:08 +0000 (13:42 +0200)]
doc: Mention c32_get_mapping, c32_apply_mapping.

* doc/posix-functions/wctrans.texi: Mention c32_get_mapping.
* doc/posix-functions/towctrans.texi: Mention c32_apply_mapping.
* doc/strings.texi (Comparison of character APIs): Mention both.

21 months agoc32_apply_mapping: Add tests.
Bruno Haible [Thu, 13 Jul 2023 11:37:01 +0000 (13:37 +0200)]
c32_apply_mapping: Add tests.

* tests/test-c32_apply_mapping.c: New file.
* modules/c32_apply_mapping-tests: New file.

21 months agoc32_apply_mapping: New module.
Bruno Haible [Thu, 13 Jul 2023 09:30:54 +0000 (11:30 +0200)]
c32_apply_mapping: New module.

* lib/uchar.in.h (c32_apply_mapping): New declaration.
* lib/c32_apply_mapping.c: New file.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_APPLY_MAPPING.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_MAPPING.
* modules/c32_apply_mapping: New file.

21 months agoc32_get_mapping: Add tests.
Bruno Haible [Thu, 13 Jul 2023 09:19:04 +0000 (11:19 +0200)]
c32_get_mapping: Add tests.

* tests/test-c32_get_mapping.c: New file.
* modules/c32_get_mapping-tests: New file.

21 months agoc32_get_mapping: New module.
Bruno Haible [Thu, 13 Jul 2023 09:15:04 +0000 (11:15 +0200)]
c32_get_mapping: New module.

* lib/uchar.in.h (c32_mapping_t): New type.
(c32_get_mapping): New declaration.
* lib/c32_get_mapping.c: New file, based on lib/wctrans-impl.h.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_GET_MAPPING.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_MAPPING.
* modules/c32_get_mapping: New file.

21 months agotowctrans: Relax license.
Bruno Haible [Thu, 13 Jul 2023 09:01:22 +0000 (11:01 +0200)]
towctrans: Relax license.

* modules/towctrans (License): Change to LGPLv2+.
* lib/towctrans.c: Update license notice.
* lib/towctrans-impl.h: Likewise.

21 months agowctrans: Relax license.
Bruno Haible [Thu, 13 Jul 2023 08:58:56 +0000 (10:58 +0200)]
wctrans: Relax license.

* modules/wctrans (License): Change to LGPLv2+.
* lib/wctrans.c: Update license notice.
* lib/wctrans-impl.h: Likewise.

21 months agodoc: Mention c32_get_type_test, c32_apply_type_test.
Bruno Haible [Wed, 12 Jul 2023 22:58:13 +0000 (00:58 +0200)]
doc: Mention c32_get_type_test, c32_apply_type_test.

* doc/posix-functions/wctype.texi: Mention c32_get_type_test.
* doc/posix-functions/iswctype.texi: Mention c32_apply_type_test.
* doc/strings.texi (Comparison of character APIs): Mention both.

21 months agoc32_apply_type_test: Add tests.
Bruno Haible [Wed, 12 Jul 2023 22:52:19 +0000 (00:52 +0200)]
c32_apply_type_test: Add tests.

* tests/test-c32_apply_type_test.c: New file.
* modules/c32_apply_type_test-tests: New file.

21 months agoc32_apply_type_test: New module.
Bruno Haible [Wed, 12 Jul 2023 22:50:29 +0000 (00:50 +0200)]
c32_apply_type_test: New module.

* lib/uchar.in.h (c32_apply_type_test): New declaration.
* lib/c32_apply_type_test.c: New file.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_APPLY_TYPE_TEST.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_TYPE_TEST.
* modules/c32_apply_type_test: New file.

21 months agoc32_get_type_test: Add tests.
Bruno Haible [Wed, 12 Jul 2023 22:11:20 +0000 (00:11 +0200)]
c32_get_type_test: Add tests.

* tests/test-c32_get_type_test.c: New file.
* modules/c32_get_type_test-tests: New file.

21 months agoc32_get_type_test: New module.
Bruno Haible [Wed, 12 Jul 2023 20:44:52 +0000 (22:44 +0200)]
c32_get_type_test: New module.

* lib/uchar.in.h (c32_type_test_t): New type.
(c32_get_type_test): New declaration.
* lib/c32_get_type_test.c: New file, based on lib/wctype-impl.h.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_GET_TYPE_TEST.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_TYPE_TEST.
* modules/c32_get_type_test: New file.

21 months agoiswctype: Relax license.
Bruno Haible [Wed, 12 Jul 2023 20:25:52 +0000 (22:25 +0200)]
iswctype: Relax license.

* modules/iswctype (License): Change to LGPLv2+.
* lib/iswctype.c: Update license notice.
* lib/iswctype-impl.h: Likewise.

21 months agowctype: Relax license.
Bruno Haible [Wed, 12 Jul 2023 20:25:14 +0000 (22:25 +0200)]
wctype: Relax license.

* modules/wctype (License): Change to LGPLv2+.
* lib/wctype.c: Update license notice.
* lib/wctype-impl.h: Likewise.

21 months agombiter, mbuiter: Small optimization.
Bruno Haible [Wed, 12 Jul 2023 15:33:14 +0000 (17:33 +0200)]
mbiter, mbuiter: Small optimization.

* lib/mbiter.h: Optimize away the in_shift field when the module
'mbrtoc32-regular' is in use.
* lib/mbuiter.h: Likewise.

21 months agogendocs: support chapter- and section-level split
Gavin Smith [Wed, 12 Jul 2023 14:00:40 +0000 (16:00 +0200)]
gendocs: support chapter- and section-level split

* doc/gendocs_template: Add lines to mark parts of file to output
only when splitting HTML by node.
Remove obsolete comment about ranges of years in copyright notice
(as per Karl).
* build-aux/gendocs.sh
[!texi2html]: Strip out parts of the template depending on --split.
[texi2html] Include all of the template as before.