diff options
Diffstat (limited to 'ctype')
-rw-r--r-- | ctype/ctype-info.c | 14 | ||||
-rw-r--r-- | ctype/ctype.h | 12 |
2 files changed, 15 insertions, 11 deletions
diff --git a/ctype/ctype-info.c b/ctype/ctype-info.c index a1054b2d16..3a47b3460c 100644 --- a/ctype/ctype-info.c +++ b/ctype/ctype-info.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,11 +21,15 @@ Cambridge, MA 02139, USA. */ /* Defined in locale/C-ctype.c. */ extern const char _nl_C_LC_CTYPE_class[]; +extern const char _nl_C_LC_CTYPE_class32[]; extern const char _nl_C_LC_CTYPE_toupper[]; extern const char _nl_C_LC_CTYPE_tolower[]; +extern const char _nl_C_LC_CTYPE_names[]; -#define b(u,x) (((u int *) _nl_C_LC_CTYPE_##x) + 128); +#define b(u,x,o) (((const u int *) _nl_C_LC_CTYPE_##x) + o); -const unsigned short int *__ctype_b = b(unsigned short, class); -const int *__ctype_tolower = b(, tolower); -const int *__ctype_toupper = b(, toupper); +const unsigned short int *__ctype_b = b (unsigned short, class, 128); +const unsigned int *__ctype32_b = b (unsigned, class32, 0); +const int *__ctype_tolower = b (, tolower, 128); +const int *__ctype_toupper = b (, toupper, 128); +const unsigned int *__ctype_names = b (unsigned, names, 0); diff --git a/ctype/ctype.h b/ctype/ctype.h index 025373c381..af2d6a90dd 100644 --- a/ctype/ctype.h +++ b/ctype/ctype.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,6 +27,7 @@ Cambridge, MA 02139, USA. */ __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 `unsigned short int's. @@ -55,11 +56,9 @@ enum _ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */ _IScntrl = _ISbit (9), /* Control character. */ _ISpunct = _ISbit (10), /* Punctuation. */ - - /* The following are defined in POSIX.2 as being combinations of the - classes above. */ - _ISalnum = _ISalpha | _ISdigit /* Alphanumeric. */ + _ISalnum = _ISbit (11) /* Alphanumeric. */ }; +#endif /* ! _ISbit */ /* These are defined in ctype-info.c. The declarations here must match those in localeinfo.h. @@ -70,7 +69,8 @@ enum char' values and for EOF; we also support negative `signed char' values for broken old programs. The case conversion arrays are of `int's rather than `unsigned char's because tolower (EOF) must be EOF, which - doesn't fit into an `unsigned char'. */ + doesn't fit into an `unsigned char'. But today more important is that + the arrays are also used for multi-byte character sets. */ extern __const unsigned short int *__ctype_b; /* Characteristics. */ extern __const int *__ctype_tolower; /* Case conversions. */ extern __const int *__ctype_toupper; /* Case conversions. */ |