|
From: | Bruno Haible |
Subject: | new modules 'c32isalnum', ..., 'c32isxdigit' |
Date: | Sun, 26 Jan 2020 00:33:20 +0100 |
User-agent: | KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) |
While mbrtoc32 converts a multibyte character to a 32-bit wide character, without being impacted by the 16-bit limitation of wchar_t on some platforms, you also need at least simple classification functions for these wide characters - like iswalnum, ... iswxdigit, but applicable to a 32-bit wide character. The ISO C standard does not specify such functions. So I made up the naming scheme: isw<class> -> c32is<class> Here are implementations of these functions. The test suite files (e.g. test-c32isalnum.c) look awful. But this gives a certain feeling which assumptions about particular characters are more or less portable, and which aren't. For example, is the INVERTED QUESTION MARK a punctuation character or not? Implementations disagree. Good implementations, like glibc, of course treat INVERTED QUESTION MARK as a punctuation character. Only the c32isdigit and c32isxdigit functions behave the same across platforms - because they are designed to mimic iswdigit and iswxdigit, which have a behaviour firmly specified by ISO C 99. 2020-01-25 Bruno Haible <address@hidden> c32isxdigit: Add tests. * tests/test-c32isxdigit.c: New file, based on tests/test-iswxdigit.c. * tests/test-c32isxdigit.sh: New file. * modules/c32isxdigit-tests: New file. c32isxdigit: New module. * lib/c32isxdigit.c: New file. * modules/c32isxdigit: New file. * doc/posix-functions/iswxdigit.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isupper: Add tests. * tests/test-c32isupper.c: New file. * tests/test-c32isupper.sh: New file. * modules/c32isupper-tests: New file. c32isupper: New module. * lib/c32isupper.c: New file. * modules/c32isupper: New file. * doc/posix-functions/iswupper.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isspace: Add tests. * tests/test-c32isspace.c: New file. * tests/test-c32isspace.sh: New file. * modules/c32isspace-tests: New file. c32isspace: New module. * lib/c32isspace.c: New file. * modules/c32isspace: New file. * doc/posix-functions/iswspace.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32ispunct: Add tests. * tests/test-c32ispunct.c: New file. * tests/test-c32ispunct.sh: New file. * modules/c32ispunct-tests: New file. c32ispunct: New module. * lib/c32ispunct.c: New file. * modules/c32ispunct: New file. * doc/posix-functions/iswpunct.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isprint: Add tests. * tests/test-c32isprint.c: New file. * tests/test-c32isprint.sh: New file. * modules/c32isprint-tests: New file. c32isprint: New module. * lib/c32isprint.c: New file. * modules/c32isprint: New file. * doc/posix-functions/iswprint.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32islower: Add tests. * tests/test-c32islower.c: New file. * tests/test-c32islower.sh: New file. * modules/c32islower-tests: New file. c32islower: New module. * lib/c32islower.c: New file. * modules/c32islower: New file. * doc/posix-functions/iswlower.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isgraph: Add tests. * tests/test-c32isgraph.c: New file. * tests/test-c32isgraph.sh: New file. * modules/c32isgraph-tests: New file. c32isgraph: New module. * lib/c32isgraph.c: New file. * modules/c32isgraph: New file. * doc/posix-functions/iswgraph.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isdigit: Add tests. * tests/test-c32isdigit.c: New file, based on tests/test-iswdigit.c. * tests/test-c32isdigit.sh: New file. * modules/c32isdigit-tests: New file. c32isdigit: New module. * lib/c32isdigit.c: New file. * modules/c32isdigit: New file. * doc/posix-functions/iswdigit.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32iscntrl: Add tests. * tests/test-c32iscntrl.c: New file. * tests/test-c32iscntrl.sh: New file. * modules/c32iscntrl-tests: New file. c32iscntrl: New module. * lib/c32iscntrl.c: New file. * modules/c32iscntrl: New file. * doc/posix-functions/iswcntrl.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isblank: Add tests. * tests/test-c32isblank.c: New file. * tests/test-c32isblank.sh: New file. * modules/c32isblank-tests: New file. c32isblank: New module. * lib/c32isblank.c: New file. * modules/c32isblank: New file. * doc/posix-functions/iswblank.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isalpha: Add tests. * tests/test-c32isalpha.c: New file. * tests/test-c32isalpha.sh: New file. * modules/c32isalpha-tests: New file. c32isalpha: New module. * lib/c32isalpha.c: New file. * modules/c32isalpha: New file. * doc/posix-functions/iswalpha.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> c32isalnum: Add tests. * tests/test-c32isalnum.c: New file. * tests/test-c32isalnum.sh: New file. * modules/c32isalnum-tests: New file. c32isalnum: New module. * lib/c32isalnum.c: New file. * lib/c32is-impl.h: New file. * modules/c32isalnum: New file. * doc/posix-functions/iswalnum.texi: Mention the new module. 2020-01-25 Bruno Haible <address@hidden> uchar: Preparations for modules c32isalnum, ..., c32isxdigit. * lib/uchar.in.h (c32isalnum, c32isalpha, c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace, c32isupper, c32isxdigit): New declarations. * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32ISALNUM, GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL, GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER, GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE, GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT. * modules/uchar (Makefile.am): Substitute GNULIB_C32ISALNUM, GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL, GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER, GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE, GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT. * tests/test-uchar-c++.cc: Test the signature of c32isalnum, c32isalpha, c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace, c32isupper, c32isxdigit.
0001-uchar-Preparations-for-modules-c32isalnum-.-c32isxdi.patch
Description: Text Data
0002-c32isalnum-New-module.patch
Description: Text Data
0003-c32isalnum-Add-tests.patch
Description: Text Data
0004-c32isalpha-New-module.patch
Description: Text Data
0005-c32isalpha-Add-tests.patch
Description: Text Data
0006-c32isblank-New-module.patch
Description: Text Data
0007-c32isblank-Add-tests.patch
Description: Text Data
0008-c32iscntrl-New-module.patch
Description: Text Data
0009-c32iscntrl-Add-tests.patch
Description: Text Data
0010-c32isdigit-New-module.patch
Description: Text Data
0011-c32isdigit-Add-tests.patch
Description: Text Data
0012-c32isgraph-New-module.patch
Description: Text Data
0013-c32isgraph-Add-tests.patch
Description: Text Data
0014-c32islower-New-module.patch
Description: Text Data
0015-c32islower-Add-tests.patch
Description: Text Data
0016-c32isprint-New-module.patch
Description: Text Data
0017-c32isprint-Add-tests.patch
Description: Text Data
0018-c32ispunct-New-module.patch
Description: Text Data
0019-c32ispunct-Add-tests.patch
Description: Text Data
0020-c32isspace-New-module.patch
Description: Text Data
0021-c32isspace-Add-tests.patch
Description: Text Data
0022-c32isupper-New-module.patch
Description: Text Data
0023-c32isupper-Add-tests.patch
Description: Text Data
0024-c32isxdigit-New-module.patch
Description: Text Data
0025-c32isxdigit-Add-tests.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |