fix some omissions and mistakes in locale_t interface definitions

This commit is contained in:
Rich Felker 2012-02-06 21:33:40 -05:00
parent e5a7f14c81
commit c09b6f8ab6
14 changed files with 37 additions and 13 deletions

View File

@ -43,6 +43,30 @@ wctype_t wctype(const char *);
#undef iswdigit #undef iswdigit
#define iswdigit(a) (((unsigned)(a)-L'0') < 10) #define iswdigit(a) (((unsigned)(a)-L'0') < 10)
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
int iswalnum_l(wint_t, locale_t);
int iswalpha_l(wint_t, locale_t);
int iswblank_l(wint_t, locale_t);
int iswcntrl_l(wint_t, locale_t);
int iswdigit_l(wint_t, locale_t);
int iswgraph_l(wint_t, locale_t);
int iswlower_l(wint_t, locale_t);
int iswprint_l(wint_t, locale_t);
int iswpunct_l(wint_t, locale_t);
int iswspace_l(wint_t, locale_t);
int iswupper_l(wint_t, locale_t);
int iswxdigit_l(wint_t, locale_t);
int iswctype_l(wint_t, wctype_t, locale_t);
wint_t towlower_l(wint_t, locale_t);
wint_t towupper_l(wint_t, locale_t);
wint_t towctrans_l(wint_t, wctrans_t, locale_t);
wctrans_t wctrans_l(const char *, locale_t);
wctype_t wctype_l(const char *, locale_t);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswalnum_l(wint_t c, locale_t l) int iswalnum_l(wint_t c, locale_t l)
{ {
return iswalnum(c); return iswalnum(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswalpha_l(wint_t c, locale_t l) int iswalpha_l(wint_t c, locale_t l)
{ {
return iswalpha(c); return iswalpha(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswblank_l(wint_t c, locale_t l) int iswblank_l(wint_t c, locale_t l)
{ {
return iswblank(c); return iswblank(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswcntrl_l(wint_t c, locale_t l) int iswcntrl_l(wint_t c, locale_t l)
{ {
return iswcntrl(c); return iswcntrl(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswctype_l(wint_t c, wctype_t t, locale_t l) int iswctype_l(wint_t c, wctype_t t, locale_t l)
{ {
return iswctype(c, t); return iswctype(c, t);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswdigit_l(wint_t c, locale_t l) int iswdigit_l(wint_t c, locale_t l)
{ {
return iswdigit(c); return iswdigit(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswgraph_l(wint_t c, locale_t l) int iswgraph_l(wint_t c, locale_t l)
{ {
return iswgraph(c); return iswgraph(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswlower_l(wint_t c, locale_t l) int iswlower_l(wint_t c, locale_t l)
{ {
return iswlower(c); return iswlower(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswprint_l(wint_t c, locale_t l) int iswprint_l(wint_t c, locale_t l)
{ {
return iswprint(c); return iswprint(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswpunct_l(wint_t c, locale_t l) int iswpunct_l(wint_t c, locale_t l)
{ {
return iswpunct(c); return iswpunct(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswspace_l(wint_t c, locale_t l) int iswspace_l(wint_t c, locale_t l)
{ {
return iswspace(c); return iswspace(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswupper_l(wint_t c, locale_t l) int iswupper_l(wint_t c, locale_t l)
{ {
return iswupper(c); return iswupper(c);
} }

View File

@ -1,6 +1,6 @@
#include <wctype.h> #include <wctype.h>
wint_t iswxdigit_l(wint_t c, locale_t l) int iswxdigit_l(wint_t c, locale_t l)
{ {
return iswxdigit(c); return iswxdigit(c);
} }