diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-12 20:12:41 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-12 20:12:41 -0400 |
| commit | 0b5079b8723804889f06c6ddbeef8a45c00d7b49 (patch) | |
| tree | d76b603c190b7e04529bff99e8085718b4c0a9a8 /src/ctype | |
| parent | 0f2704eb90ef2590c75633dc7eb695a63cf2ddf8 (diff) | |
finish purging nonstd/
Diffstat (limited to 'src/ctype')
| -rw-r--r-- | src/ctype/_ctype.h | 3 | ||||
| -rw-r--r-- | src/ctype/isblank.c | 3 | ||||
| -rw-r--r-- | src/ctype/iscntrl.c | 2 | ||||
| -rw-r--r-- | src/ctype/isgraph.c | 2 | ||||
| -rw-r--r-- | src/ctype/islower.c | 2 | ||||
| -rw-r--r-- | src/ctype/isprint.c | 2 | ||||
| -rw-r--r-- | src/ctype/ispunct.c | 2 | ||||
| -rw-r--r-- | src/ctype/isspace.c | 2 | ||||
| -rw-r--r-- | src/ctype/isupper.c | 2 | ||||
| -rw-r--r-- | src/ctype/isxdigit.c | 2 | ||||
| -rw-r--r-- | src/ctype/tolower.c | 3 | ||||
| -rw-r--r-- | src/ctype/toupper.c | 3 |
12 files changed, 13 insertions, 15 deletions
diff --git a/src/ctype/_ctype.h b/src/ctype/_ctype.h index f64553c1..be3e8401 100644 --- a/src/ctype/_ctype.h +++ b/src/ctype/_ctype.h @@ -1,7 +1,8 @@ #ifndef ___CTYPE_H__ #define ___CTYPE_H__ -#include "../_nonstd.h" +#include "../_assert.h" +#include "../locale/_locale.h" typedef enum { CT_ALPHA = (1 << 0), diff --git a/src/ctype/isblank.c b/src/ctype/isblank.c index d22d2315..b71b0faa 100644 --- a/src/ctype/isblank.c +++ b/src/ctype/isblank.c @@ -2,13 +2,12 @@ #include "limits.h" #include "locale.h" #include "_ctype.h" -#include "../_assert.h" /** test whether a character is blank **/ int isblank(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, "unsigned char", EOF); diff --git a/src/ctype/iscntrl.c b/src/ctype/iscntrl.c index ef28ff20..d90803e5 100644 --- a/src/ctype/iscntrl.c +++ b/src/ctype/iscntrl.c @@ -7,7 +7,7 @@ int iscntrl(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/isgraph.c b/src/ctype/isgraph.c index a6490d8f..72be27b3 100644 --- a/src/ctype/isgraph.c +++ b/src/ctype/isgraph.c @@ -7,7 +7,7 @@ int isgraph(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/islower.c b/src/ctype/islower.c index 35c8236d..6dfedcc6 100644 --- a/src/ctype/islower.c +++ b/src/ctype/islower.c @@ -7,7 +7,7 @@ int islower(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/isprint.c b/src/ctype/isprint.c index c3deaebd..e4b5a531 100644 --- a/src/ctype/isprint.c +++ b/src/ctype/isprint.c @@ -7,7 +7,7 @@ int isprint(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/ispunct.c b/src/ctype/ispunct.c index 12d0cf16..e73461e1 100644 --- a/src/ctype/ispunct.c +++ b/src/ctype/ispunct.c @@ -7,7 +7,7 @@ int ispunct(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/isspace.c b/src/ctype/isspace.c index fb913c49..d4eeb134 100644 --- a/src/ctype/isspace.c +++ b/src/ctype/isspace.c @@ -7,7 +7,7 @@ int isspace(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/isupper.c b/src/ctype/isupper.c index ff07ff59..e0eb545e 100644 --- a/src/ctype/isupper.c +++ b/src/ctype/isupper.c @@ -7,7 +7,7 @@ int isupper(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/isxdigit.c b/src/ctype/isxdigit.c index 9f9e0b91..9d73d662 100644 --- a/src/ctype/isxdigit.c +++ b/src/ctype/isxdigit.c @@ -7,7 +7,7 @@ int isxdigit(int c) { - unsigned int *map = __libc(CTYPE); + unsigned int *map = __get_locale()->lc_ctype.ctattr; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/tolower.c b/src/ctype/tolower.c index 4512ef36..3da90645 100644 --- a/src/ctype/tolower.c +++ b/src/ctype/tolower.c @@ -1,14 +1,13 @@ #include <ctype.h> #include "stdio.h" #include "limits.h" -#include "../_assert.h" #include "_ctype.h" /** convert an uppercase letter to lowercase **/ int tolower(int c) { - unsigned char *map = __libc(TOLOWER); + unsigned char *map = __get_locale()->lc_ctype.ctolower; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); diff --git a/src/ctype/toupper.c b/src/ctype/toupper.c index 897d059e..3addcada 100644 --- a/src/ctype/toupper.c +++ b/src/ctype/toupper.c @@ -1,14 +1,13 @@ #include <ctype.h> #include "stdio.h" #include "limits.h" -#include "../_assert.h" #include "_ctype.h" /** convert a lowercase letter to uppercase **/ int toupper(int c) { - unsigned char *map = __libc(TOUPPER); + unsigned char *map = __get_locale()->lc_ctype.ctoupper; ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); |
