bug-gnulib
[Top][All Lists]
Advanced

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

new module 'iswxdigit'


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

Like for the "digit" class, POSIX provides a way to the libc implementor to
add non-ASCII characters to the "xdigit" character class. However, ISO C 99
section 7.25.2.1.12 takes that freedom away. The iswxdigit() 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 iswxdigit function.
        * modules/mbchar (Depends-on): Add iswxdigit.
        * modules/wctype (Depends-on): Likewise.

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

        iswxdigit: New module.
        * m4/iswxdigit.m4: New file.
        * lib/wctype.in.h (iswxdigit): Potentially override.
        (iswxdigit, rpl_iswxdigit): Test REPLACE_ISWXDIGIT, not
        REPLACE_ISWCNTRL. Rely on ISO C compliant definition.
        * lib/iswxdigit.c: New file.
        * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWXDIGIT,
        REPLACE_ISWXDIGIT.
        * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWXDIGIT,
        REPLACE_ISWXDIGIT.
        * modules/iswxdigit: New file.
        * doc/posix-functions/iswxdigit.texi: Mention the portability problem.

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

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

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


reply via email to

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