diff options
author | tjr <tjr@FreeBSD.org> | 2002-08-03 04:18:40 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-08-03 04:18:40 +0000 |
commit | 2ddf585cade5416ac291172579ad3c3b3f5a38a3 (patch) | |
tree | 2ae8f05b347bfb78175d1e7470f3233c5c8d4092 /include | |
parent | 1d09617e8112714b60586d5e36869a247409dfea (diff) | |
download | FreeBSD-src-2ddf585cade5416ac291172579ad3c3b3f5a38a3.zip FreeBSD-src-2ddf585cade5416ac291172579ad3c3b3f5a38a3.tar.gz |
Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions.
Diffstat (limited to 'include')
-rw-r--r-- | include/wchar.h | 5 | ||||
-rw-r--r-- | include/wctype.h | 17 |
2 files changed, 19 insertions, 3 deletions
diff --git a/include/wchar.h b/include/wchar.h index df77b41..0c174bd 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -95,6 +95,11 @@ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif +#ifndef _WCTYPE_T +typedef long wctype_t; +#define _WCTYPE_T +#endif + #ifndef WEOF #define WEOF ((wint_t)-1) #endif diff --git a/include/wctype.h b/include/wctype.h index 366dbdb..ab763ca 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -28,24 +28,33 @@ * $FreeBSD$ */ -#if 0 -/* XXX: not implemented */ #ifndef _WCTYPE_H_ #define _WCTYPE_H_ #include <sys/cdefs.h> #include <machine/ansi.h> +#include <ctype.h> + #ifdef _BSD_WINT_T_ typedef _BSD_WINT_T_ wint_t; #undef _BSD_WINT_T_ #endif +#ifndef _WCTYPE_T +typedef long wctype_t; +#define _WCTYPE_T +#endif + #ifndef WEOF #define WEOF ((wint_t)-1) #endif __BEGIN_DECLS +int iswctype(wint_t, wctype_t); +wctype_t wctype(const char *); +#if 0 +/* XXX: not implemented */ int iswalnum(wint_t); int iswalpha(wint_t); int iswblank(wint_t); @@ -60,7 +69,9 @@ int iswupper(wint_t); int iswxdigit(wint_t); wint_t towlower(wint_t); wint_t towupper(wint_t); +#endif __END_DECLS +#define iswctype(wc, charclass) __istype((wc), (charclass)) + #endif /* _WCTYPE_H_ */ -#endif |