diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2003-08-28 17:16:53 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2003-08-28 17:16:53 +0000 |
commit | 9c6f2391ed8dd72d9e13db459d149de7bc707567 (patch) | |
tree | 1c84d71700579e531e8c763b0271be3fbad6d776 /include | |
parent | e317054726be481c98a9ffe712a39331d0044396 (diff) |
Create a typedef for the ctype bitmask table entries.
Hack a fix for ctype support of 8-bit codeset locales.
Note: toupper/tolower mappings do not handle the special cases for the
tr_TR and az_AZ locales, since the wide versions currently handle them
either. That will be addressed when I rewrite the data generation tools
and the libc locale code.
Diffstat (limited to 'include')
-rw-r--r-- | include/ctype.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/ctype.h b/include/ctype.h index 23ff199e4..361f160f8 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -32,7 +32,7 @@ __BEGIN_DECLS #ifndef _ISbit /* These are all the characteristics of characters. If there get to be more than 16 distinct characteristics, - many things must be changed that use `__uint16_t's. */ + __ctype_mask_t will need to be adjusted. */ # define _ISbit(bit) (1 << (bit)) @@ -98,13 +98,13 @@ enum */ /* Pointers to the default C-locale data. */ -extern const __uint16_t *__C_ctype_b; +extern const __ctype_mask_t *__C_ctype_b; extern const __ctype_touplow_t *__C_ctype_toupper; extern const __ctype_touplow_t *__C_ctype_tolower; #ifdef __UCLIBC_HAS_XLOCALE__ -extern __const __uint16_t **__ctype_b_loc (void) +extern __const __ctype_mask_t **__ctype_b_loc (void) __attribute__ ((__const)); extern __const __ctype_touplow_t **__ctype_tolower_loc (void) __attribute__ ((__const)); @@ -118,7 +118,7 @@ extern __const __ctype_touplow_t **__ctype_toupper_loc (void) #else /* __UCLIBC_HAS_XLOCALE__ */ /* Pointers to the current global locale data in use. */ -extern const __uint16_t *__ctype_b; +extern const __ctype_mask_t *__ctype_b; extern const __ctype_touplow_t *__ctype_toupper; extern const __ctype_touplow_t *__ctype_tolower; @@ -129,7 +129,7 @@ extern const __ctype_touplow_t *__ctype_tolower; #endif /* __UCLIBC_HAS_XLOCALE__ */ #define __isctype(c, type) \ - ((__UCLIBC_CTYPE_B)[(int) (c)] & (__uint16_t) type) + ((__UCLIBC_CTYPE_B)[(int) (c)] & (__ctype_mask_t) type) #define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */ #define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */ @@ -292,7 +292,7 @@ toupper (int __c) __THROW /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ # define __isctype_l(c, type, locale) \ - ((locale)->__ctype_b[(int) (c)] & (__uint16_t) type) + ((locale)->__ctype_b[(int) (c)] & (__ctype_mask_t) type) # define __exctype_l(name) \ extern int name (int, __locale_t) __THROW |