Log

Author Commit Date CI Message
Bruno Haible d8fc9af5 2023-07-26T15:12:47 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.
Bruno Haible f4ad51ee 2023-07-26T14:50:00 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.
Bruno Haible 1a602613 2023-07-26T14:13:48 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.
Bruno Haible ac0d99cd 2023-07-26T13:48:25 iswblank tests: Add more tests. * tests/test-iswblank.c (main): Verify that this character class contains the ASCII space and tab, but not newline.
Bruno Haible 97978417 2023-07-26T13:40:06 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.
Bruno Haible cdfcc6d3 2023-07-25T23:39:15 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.
Bruno Haible 546ee248 2023-07-25T23:38:03 wctype: Add tests. * tests/test-wctype.c: New file, based on tests/test-c32_get_type_test.c. * modules/wctype-tests: New file.
Bruno Haible e3f3b825 2023-07-25T22:56:19 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.
Bruno Haible e5060c6e 2023-07-25T22:20:51 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.
Bruno Haible d1db7ef2 2023-07-24T12:08:23 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.
Bruno Haible dc1b379b 2023-07-24T11:10:15 fnmatch: Update doc regarding Solaris 10. * doc/posix-functions/fnmatch.texi: Move the Solaris 10 bug description to the "fixed by Gnulib" section.
Paul Eggert b70b4f0c 2023-07-23T17:58:03 timespec_get: port to Ubuntu 23.04 * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Default REPLACE_TIMESPEC_GET to 0, fixing a typo.
Bruno Haible 6b508d70 2023-07-24T02:00:42 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.
Bruno Haible 80f7a65f 2023-07-24T02:00:37 unistr/u32-strlen: Relicense under LGPLv2+. * modules/unistr/u32-strlen (License): Change to LGPLv2+. * lib/unistr/u32-strlen.c: Update license notice.
Bruno Haible c084710c 2023-07-24T02:00:13 unistr/u32-chr: Relicense under LGPLv2+. * modules/unistr/u32-chr (License): Change to LGPLv2+. * lib/unistr/u32-chr.c: Update license notice.
Paul Eggert 9ec4feb7 2023-07-23T11:35:10 utimecmp: clean up old spare1 cruft * lib/utimecmp.c: Remove a ‘defined HAVE_STRUCT_STAT_ST_SPARE1’ that has been false since 2007.
Bruno Haible 4e7e7fe4 2023-07-23T16:49:22 fnmatch tests: Avoid a test failure on FreeBSD. * tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper() mapping of 'ö', not of 'ü'.
Bruno Haible d5c86249 2023-07-23T15:26:28 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.
Bruno Haible 42473a0a 2023-07-23T14:04:59 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.
Bruno Haible d690d055 2023-07-23T01:43:43 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.
Bruno Haible 25cb1584 2023-07-23T00:32:47 doc: Mention a wctype bug. * doc/posix-functions/wctype.texi: Mention a bug on mingw.
Karl Berry 9e41f786 2023-07-21T07:43:18 autoupdate
Bruno Haible bb8dc843 2023-07-21T11:22:27 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.
Bruno Haible 07258bd5 2023-07-21T11:16:04 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.
Bruno Haible 8bd1c7b0 2023-07-20T16:33:31 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.
Pádraig Brady d1336daf 2023-07-20T15:08:27 fts: fix compilation errors with fts_cross_check() * lib/fts.c: Fix printf format chars. * lib/fts_.h: Provide a declaration for users.
Bruno Haible 031219ca 2023-07-20T01:35:10 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.
Paul Eggert ab2470cf 2023-07-19T13:51:55 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.
Paul Eggert 9452e886 2023-07-19T13:51:55 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.
Bruno Haible 46d57b5a 2023-07-19T22:43:50 c32swidth, mbszero: Fix file list. * modules/c32swidth (Files): Add locale-ja.m4, locale-zh.m4, codeset.m4. * modules/mbszero (Files): Likewise.
Bruno Haible 8dfe0534 2023-07-19T22:25:30 wcsnrtombs: Fix file list. * modules/wcsnrtombs (Files): Add locale-fr.m4.
Bruno Haible 02437a5d 2023-07-19T22:24:27 mbsnrtowcs: Fix file list. * modules/mbsnrtowcs (Files): Add locale-fr.m4, codeset.m4.
Bruno Haible 00e3e2c5 2023-07-19T22:23:23 mbrtoc16: Fix file list. * modules/mbrtoc16 (Files): Add locale-zh.m4.
Bruno Haible cbdf152d 2023-07-19T22:21:47 mbrlen: Fix file list. * modules/mbrlen (Files): Add locale-fr.m4, locale-ja.m4, locale-zh.m4, codeset.m4.
Paul Eggert a3e881de 2023-07-18T20:33:41 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.
Bruno Haible e12d0119 2023-07-18T14:10:33 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.
Bruno Haible 3c76b587 2023-07-18T13:46:29 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.
Bruno Haible eaa7397e 2023-07-18T13:44:39 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.
Bruno Haible 8d9d6ad8 2023-07-18T13:43:38 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.
Bruno Haible 056967ba 2023-07-18T13:40:11 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.
Bruno Haible d2865eb4 2023-07-18T13:36:00 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.
Bruno Haible 1ed13c54 2023-07-18T13:35:10 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.
Bruno Haible 51c2f5ac 2023-07-18T13:33:08 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.
Bruno Haible 727a6fd3 2023-07-18T13:30:18 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.
Bruno Haible f0c22a20 2023-07-18T13:29:14 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.
Bruno Haible 1a81b69f 2023-07-18T13:27:44 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.
Bruno Haible 00b03b7a 2023-07-18T13:25:43 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.
Bruno Haible a271a43e 2023-07-18T13:24:35 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.
Bruno Haible f8461b3c 2023-07-18T13:04:04 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.
Bruno Haible 201b1e7b 2023-07-18T12:23:12 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.
Bruno Haible cf7c3e9b 2023-07-18T12:21:46 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.
Bruno Haible cb55e214 2023-07-18T12:19:58 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.
Bruno Haible 43b4207d 2023-07-18T12:15:59 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.
Bruno Haible 2cc8acfd 2023-07-18T12:13:57 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.
Bruno Haible 6d5f6cf8 2023-07-18T11:43:00 mbstok_r: Simplify dependencies. * lib/mbstok_r.c: Include <stdlib.h> instead of mbuiter.h. * modules/mbstok_r (Depends-on): Remove mbuiter.
Simon Josefsson 6928b3b8 2023-07-17T22:07:57 announce-gen: Allow using local git user.name. * build-aux/announce-gen (readable_interval): Remove --global parameter to 'git config' call.
Bruno Haible 5f6d3d5f 2023-07-17T20:50:30 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.
Bruno Haible 5881dc6b 2023-07-17T19:50:27 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.
Bruno Haible 49d66352 2023-07-17T19:11:38 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.
Bruno Haible d261ea8b 2023-07-17T18:56:19 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.
Bruno Haible 47871cf9 2023-07-17T18:00:24 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.
Bruno Haible 776c52c2 2023-07-16T07:31:02 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.
Bruno Haible a85a9b34 2023-07-16T07:30:57 quotearg: Optimize clearing an mbstate_t. * lib/quotearg.c: Include <wchar.h>. (quotearg_buffer_restyled): Use mbszero. * modules/quotearg (Depends-on): Add mbszero.
Bruno Haible dad9ed27 2023-07-16T07:30:55 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.
Bruno Haible e3d567d5 2023-07-16T07:30:52 mbmemcasecoll: Optimize clearing an mbstate_t. * lib/mbmemcasecoll.c (apply_c32tolower): Use mbszero. * modules/mbmemcasecoll (Depends-on): Add mbszero.
Bruno Haible a7adefb5 2023-07-16T07:30:50 mbswidth: Optimize clearing an mbstate_t. * lib/mbswidth.c (mbsnwidth): Use mbszero. * modules/mbswidth (Depends-on): Add mbszero.
Bruno Haible 948151dc 2023-07-16T07:30:48 mbfile: Optimize clearing an mbstate_t. * lib/mbfile.h (mbfile_multi_getc, mbf_init): Use mbszero. * modules/mbfile (Depends-on): Add mbszero.
Bruno Haible 9cfa58a7 2023-07-16T07:30:46 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.
Bruno Haible 0c3084c9 2023-07-16T07:30:43 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.
Bruno Haible e568a5a3 2023-07-16T07:30:41 c32stombs: Optimize clearing an mbstate_t. * lib/c32stombs.c (c32stombs): Use mbszero. * lib/uchar.in.h (c32stombs): Likewise. * modules/c32stombs (Depends-on): Add mbszero.
Bruno Haible b1a67b98 2023-07-16T07:30:37 mbstoc32s: Optimize clearing an mbstate_t. * lib/mbstoc32s.c (mbstoc32s): Use mbszero. * lib/uchar.in.h (mbstoc32s): Likewise. * modules/mbstoc32s (Depends-on): Add mbszero.
Bruno Haible 897f2f1d 2023-07-16T07:30:35 mbstowcs: Optimize clearing an mbstate_t. * lib/mbstowcs.c (mbstowcs): Use mbszero. * modules/mbstowcs (Depends-on): Add mbszero.
Bruno Haible 5e121a71 2023-07-16T07:30:33 c32tob: Optimize clearing an mbstate_t. * lib/c32tob.c (c32tob): Use mbszero. * modules/c32tob (Depends-on): Add mbszero.
Bruno Haible e5799150 2023-07-16T07:30:30 wctomb: Optimize clearing an mbstate_t. * lib/wctomb-impl.h (wctomb): Use mbszero. * modules/wctomb (Depends-on): Add mbszero.
Bruno Haible 9ca0b47c 2023-07-16T07:30:27 btoc32: Optimize clearing an mbstate_t. * lib/btoc32.c: Include <wchar.h>. (btoc32): Use mbszero. * modules/btoc32 (Depends-on): Add mbszero.
Bruno Haible c05bdfe0 2023-07-16T07:30:25 btowc: Optimize clearing an mbstate_t. * lib/btowc.c (btowc): Use mbszero. * modules/btowc (Depends-on): Add mbszero.
Bruno Haible 13cd6eb1 2023-07-16T07:30:59 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.
Bruno Haible e00ed30c 2023-07-16T07:30:22 mbrtoc32: Optimize clearing an mbstate_t. * lib/mbrtoc32.c (mbrtoc32): Use mbszero. * modules/mbrtoc32 (Depends-on): Add mbsinit, mbszero.
Bruno Haible 4159dd50 2023-07-16T07:30:20 mbtowc: Optimize clearing an mbstate_t. * lib/mbtowc-impl.h (mbtowc): Use mbszero. * modules/mbtowc (Depends-on): Add mbszero.
Bruno Haible c96c9e2d 2023-07-16T07:30:15 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.
Bruno Haible f8f7fbce 2023-07-15T22:47:26 mbsinit: Fix module description. * modules/mbsinit (Files): Add m4/mbrtowc.m4.
Bruno Haible 62370771 2023-07-15T09:47:06 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.
Bruno Haible 1f47d96e 2023-07-13T23:23:41 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.
Bruno Haible 86019620 2023-07-13T22:59:48 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.
Bruno Haible c9368f9c 2023-07-13T13:42:08 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.
Bruno Haible ed471165 2023-07-13T13:37:01 c32_apply_mapping: Add tests. * tests/test-c32_apply_mapping.c: New file. * modules/c32_apply_mapping-tests: New file.
Bruno Haible 64be6ac8 2023-07-13T11:30:54 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.
Bruno Haible fb75d457 2023-07-13T11:19:04 c32_get_mapping: Add tests. * tests/test-c32_get_mapping.c: New file. * modules/c32_get_mapping-tests: New file.
Bruno Haible 07edc554 2023-07-13T11:15:04 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.
Bruno Haible fdcb6772 2023-07-13T11:01:22 towctrans: Relax license. * modules/towctrans (License): Change to LGPLv2+. * lib/towctrans.c: Update license notice. * lib/towctrans-impl.h: Likewise.
Bruno Haible a5854053 2023-07-13T10:58:56 wctrans: Relax license. * modules/wctrans (License): Change to LGPLv2+. * lib/wctrans.c: Update license notice. * lib/wctrans-impl.h: Likewise.
Bruno Haible 53a8c2c5 2023-07-13T00:58:13 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.
Bruno Haible 1646478e 2023-07-13T00:52:19 c32_apply_type_test: Add tests. * tests/test-c32_apply_type_test.c: New file. * modules/c32_apply_type_test-tests: New file.
Bruno Haible 2b7a3bbc 2023-07-13T00:50:29 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.
Bruno Haible 4bd4eb70 2023-07-13T00:11:20 c32_get_type_test: Add tests. * tests/test-c32_get_type_test.c: New file. * modules/c32_get_type_test-tests: New file.
Bruno Haible 43dc3f65 2023-07-12T22:44:52 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.
Bruno Haible 9ec9c96b 2023-07-12T22:25:52 iswctype: Relax license. * modules/iswctype (License): Change to LGPLv2+. * lib/iswctype.c: Update license notice. * lib/iswctype-impl.h: Likewise.
Bruno Haible 9511ac66 2023-07-12T22:25:14 wctype: Relax license. * modules/wctype (License): Change to LGPLv2+. * lib/wctype.c: Update license notice. * lib/wctype-impl.h: Likewise.
Bruno Haible 6a455aab 2023-07-12T17:33:14 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.
Gavin Smith 32fcd394 2023-07-12T16:00:40 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.