bug-gnulib
[Top][All Lists]
Advanced

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

new module 'iswdigit'


From: Bruno Haible
Subject: new module 'iswdigit'
Date: Sat, 25 Jan 2020 16:15:47 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

POSIX provides a way to the libc implementor to add non-ASCII characters to the
"digit" character class. However, ISO C 99 section 7.25.2.1.5 takes that
freedom away. The iswdigit() function is not ISO C compliant on a number of
platforms. This series of patches provides the workaround.


2020-01-25  Bruno Haible  <address@hidden>

        mbchar, wctype: Use the corrected iswdigit function.
        * modules/mbchar (Depends-on): Add iswdigit.
        * modules/wctype (Depends-on): Likewise.

        iswdigit: Add tests.
        * tests/test-iswdigit.c: New file.
        * tests/test-iswdigit.sh: New file.
        * modules/iswdigit-tests: New file.

        iswdigit: New module.
        * m4/iswdigit.m4: New file.
        * lib/wctype.in.h (iswdigit): Potentially override.
        (iswdigit, rpl_iswdigit): Test REPLACE_ISWDIGIT, not REPLACE_ISWCNTRL.
        * lib/iswdigit.c: New file.
        * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWDIGIT,
        REPLACE_ISWDIGIT.
        * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWDIGIT,
        REPLACE_ISWDIGIT.
        * modules/iswdigit: New file.
        * doc/posix-functions/iswdigit.texi: Mention the portability problem.

Attachment: 0001-iswdigit-New-module.patch
Description: Text Data

Attachment: 0002-iswdigit-Add-tests.patch
Description: Text Data

Attachment: 0003-mbchar-wctype-Use-the-corrected-iswdigit-function.patch
Description: Text Data


reply via email to

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