From e5a7f14c818a622ea7fbbc981657eb0c47ce3c00 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 6 Feb 2012 21:29:31 -0500 Subject: [PATCH] add more of the locale_t interfaces, all dummied out to ignore the locale --- include/wctype.h | 5 +++++ src/locale/iswalnum_l.c | 6 ++++++ src/locale/iswalpha_l.c | 6 ++++++ src/locale/iswblank_l.c | 6 ++++++ src/locale/iswcntrl_l.c | 6 ++++++ src/locale/iswctype_l.c | 6 ++++++ src/locale/iswdigit_l.c | 6 ++++++ src/locale/iswgraph_l.c | 6 ++++++ src/locale/iswlower_l.c | 6 ++++++ src/locale/iswprint_l.c | 6 ++++++ src/locale/iswpunct_l.c | 6 ++++++ src/locale/iswspace_l.c | 6 ++++++ src/locale/iswupper_l.c | 6 ++++++ src/locale/iswxdigit_l.c | 6 ++++++ src/locale/towctrans_l.c | 6 ++++++ src/locale/towlower_l.c | 6 ++++++ src/locale/towupper_l.c | 6 ++++++ src/locale/wctrans_l.c | 6 ++++++ src/locale/wctype_l.c | 6 ++++++ 19 files changed, 113 insertions(+) create mode 100644 src/locale/iswalnum_l.c create mode 100644 src/locale/iswalpha_l.c create mode 100644 src/locale/iswblank_l.c create mode 100644 src/locale/iswcntrl_l.c create mode 100644 src/locale/iswctype_l.c create mode 100644 src/locale/iswdigit_l.c create mode 100644 src/locale/iswgraph_l.c create mode 100644 src/locale/iswlower_l.c create mode 100644 src/locale/iswprint_l.c create mode 100644 src/locale/iswpunct_l.c create mode 100644 src/locale/iswspace_l.c create mode 100644 src/locale/iswupper_l.c create mode 100644 src/locale/iswxdigit_l.c create mode 100644 src/locale/towctrans_l.c create mode 100644 src/locale/towlower_l.c create mode 100644 src/locale/towupper_l.c create mode 100644 src/locale/wctrans_l.c create mode 100644 src/locale/wctype_l.c diff --git a/include/wctype.h b/include/wctype.h index 3a5af6e7..ee5be7c6 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -9,6 +9,11 @@ extern "C" { #define __NEED_wctrans_t #define __NEED_wctype_t +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +#define __NEED_locale_t +#endif + #include #undef WEOF diff --git a/src/locale/iswalnum_l.c b/src/locale/iswalnum_l.c new file mode 100644 index 00000000..8aaf1be6 --- /dev/null +++ b/src/locale/iswalnum_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswalnum_l(wint_t c, locale_t l) +{ + return iswalnum(c); +} diff --git a/src/locale/iswalpha_l.c b/src/locale/iswalpha_l.c new file mode 100644 index 00000000..ebe5a05e --- /dev/null +++ b/src/locale/iswalpha_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswalpha_l(wint_t c, locale_t l) +{ + return iswalpha(c); +} diff --git a/src/locale/iswblank_l.c b/src/locale/iswblank_l.c new file mode 100644 index 00000000..180a8f43 --- /dev/null +++ b/src/locale/iswblank_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswblank_l(wint_t c, locale_t l) +{ + return iswblank(c); +} diff --git a/src/locale/iswcntrl_l.c b/src/locale/iswcntrl_l.c new file mode 100644 index 00000000..50e97c5a --- /dev/null +++ b/src/locale/iswcntrl_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswcntrl_l(wint_t c, locale_t l) +{ + return iswcntrl(c); +} diff --git a/src/locale/iswctype_l.c b/src/locale/iswctype_l.c new file mode 100644 index 00000000..be222d36 --- /dev/null +++ b/src/locale/iswctype_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswctype_l(wint_t c, wctype_t t, locale_t l) +{ + return iswctype(c, t); +} diff --git a/src/locale/iswdigit_l.c b/src/locale/iswdigit_l.c new file mode 100644 index 00000000..3f567fc1 --- /dev/null +++ b/src/locale/iswdigit_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswdigit_l(wint_t c, locale_t l) +{ + return iswdigit(c); +} diff --git a/src/locale/iswgraph_l.c b/src/locale/iswgraph_l.c new file mode 100644 index 00000000..4a8f787c --- /dev/null +++ b/src/locale/iswgraph_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswgraph_l(wint_t c, locale_t l) +{ + return iswgraph(c); +} diff --git a/src/locale/iswlower_l.c b/src/locale/iswlower_l.c new file mode 100644 index 00000000..51e07f35 --- /dev/null +++ b/src/locale/iswlower_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswlower_l(wint_t c, locale_t l) +{ + return iswlower(c); +} diff --git a/src/locale/iswprint_l.c b/src/locale/iswprint_l.c new file mode 100644 index 00000000..eeacb94e --- /dev/null +++ b/src/locale/iswprint_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswprint_l(wint_t c, locale_t l) +{ + return iswprint(c); +} diff --git a/src/locale/iswpunct_l.c b/src/locale/iswpunct_l.c new file mode 100644 index 00000000..60e2ccf6 --- /dev/null +++ b/src/locale/iswpunct_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswpunct_l(wint_t c, locale_t l) +{ + return iswpunct(c); +} diff --git a/src/locale/iswspace_l.c b/src/locale/iswspace_l.c new file mode 100644 index 00000000..befccc8f --- /dev/null +++ b/src/locale/iswspace_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswspace_l(wint_t c, locale_t l) +{ + return iswspace(c); +} diff --git a/src/locale/iswupper_l.c b/src/locale/iswupper_l.c new file mode 100644 index 00000000..867edc63 --- /dev/null +++ b/src/locale/iswupper_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswupper_l(wint_t c, locale_t l) +{ + return iswupper(c); +} diff --git a/src/locale/iswxdigit_l.c b/src/locale/iswxdigit_l.c new file mode 100644 index 00000000..8df3f738 --- /dev/null +++ b/src/locale/iswxdigit_l.c @@ -0,0 +1,6 @@ +#include + +wint_t iswxdigit_l(wint_t c, locale_t l) +{ + return iswxdigit(c); +} diff --git a/src/locale/towctrans_l.c b/src/locale/towctrans_l.c new file mode 100644 index 00000000..6222058c --- /dev/null +++ b/src/locale/towctrans_l.c @@ -0,0 +1,6 @@ +#include + +wint_t towctrans_l(wint_t c, wctrans_t t, locale_t l) +{ + return towctrans(c, t); +} diff --git a/src/locale/towlower_l.c b/src/locale/towlower_l.c new file mode 100644 index 00000000..05fcde53 --- /dev/null +++ b/src/locale/towlower_l.c @@ -0,0 +1,6 @@ +#include + +wint_t towlower_l(wint_t c, locale_t l) +{ + return towlower(c); +} diff --git a/src/locale/towupper_l.c b/src/locale/towupper_l.c new file mode 100644 index 00000000..aa861ae6 --- /dev/null +++ b/src/locale/towupper_l.c @@ -0,0 +1,6 @@ +#include + +wint_t towupper_l(wint_t c, locale_t l) +{ + return towupper(c); +} diff --git a/src/locale/wctrans_l.c b/src/locale/wctrans_l.c new file mode 100644 index 00000000..dae3381e --- /dev/null +++ b/src/locale/wctrans_l.c @@ -0,0 +1,6 @@ +#include + +wctrans_t wctrans_l(const char *s, locale_t l) +{ + return wctrans(s); +} diff --git a/src/locale/wctype_l.c b/src/locale/wctype_l.c new file mode 100644 index 00000000..01f9c67f --- /dev/null +++ b/src/locale/wctype_l.c @@ -0,0 +1,6 @@ +#include + +wctype_t wctype_l(const char *s, locale_t l) +{ + return wctype(s); +} -- 2.25.1