git: libc: Redefine "number" ctype - no longer alias of "digit"

John Marino marino at
Tue Sep 1 05:45:36 PDT 2015

commit 31c9f6f21147b3a9f25ca8beda029a64af5305f1
Author: John Marino <draco at>
Date:   Tue Sep 1 13:39:38 2015 +0200

    libc: Redefine "number" ctype - no longer alias of "digit"
    FreeBSD extended ctypes to include numbers (e.g. isnumber()) but never
    actually implemented it.  The isnumber() function was equivalent to the
    isdigit() function in every case.
    Now that DragonFly's ctype source files have number definitions, the
    number ctype can finally be implemented.  It's given a new flag _CTYPE_N.
    The isalnum() and iswalnum() functions have been changed to use this
    flag rather than the _CTYPE_D digit flag.
    While isalnum(), isnumber(), and their wide equivalents now return
    different values in locale cases, the ishexnumber() and iswhexnumber()
    functions are unchanged.  They are still aliases for isxdigit() and
    Also change ctype.h for isdigit and isxdigit to use sbistype like the
    other functions.
    The "isnumber()" will not work until a full world build is made.  The
    reason is that localedef is modified, but it's a bootstrap tool, so the
    earlier version that does not support number ctype is still used in a
    quickworld build.

Summary of changes:
 include/ctype.h            |  9 +++++----
 include/wctype.h           |  6 +++---
 include/xlocale/_ctype.h   |  4 ++--
 lib/libc/locale/isctype.c  |  4 ++--
 lib/libc/locale/iswctype.c |  4 ++--
 lib/libc/locale/table.c    | 20 ++++++++++----------
 lib/libc/locale/wctype.c   |  4 +++-
 usr.bin/localedef/ctype.c  |  2 +-
 8 files changed, 28 insertions(+), 25 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list