X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fwctype.h;h=4d6ed5e2427b63245d3516108bb4b799dbbc8b78;hb=3862b03514c94f37966f61693619e6483ead6045;hp=1c50bfc2810ec21c6e6f94b659456bf0e4ff8936;hpb=d7cc1957de74235bd2a84c1ef26ecab2368f57e4;p=pdclib.old diff --git a/includes/wctype.h b/includes/wctype.h index 1c50bfc..4d6ed5e 100644 --- a/includes/wctype.h +++ b/includes/wctype.h @@ -1,46 +1,47 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- -// Wide character classification and mapping utilities -// ---------------------------------------------------------------------------- - -#ifndef __WCTYPE_H -#define __WCTYPE_H __WCTYPE_H - -// TODO: Documentation - -// ---------------------------------------------------------------------------- -// TYPEDEFS - -typedef wctrans_t; // TODO - personality? -typedef wctype_t; // TODO - personality? -typedef wint_t; // TODO - personality? - -// ---------------------------------------------------------------------------- -// FUNCTIONS - -int iswalnum( wint_t c ); -int iswalpha( wint_t c ); -int iswblank( wint_t c ); -int iswcntrl( wint_t c ); -int iswctype( wint_t c, wctype_t category ); -int iswdigit( wint_t c ); -int iswgraph( wint_t c ); -int iswlower( wint_t c ); -int iswprint( wint_t c ); -int iswpunct( wint_t c ); -int iswspace( wint_t c ); -int iswupper( wint_t c ); -int iswxdigit( wint_t c ); - -wint_t towctrans( wint_t c, wctrans_t category ); -wint_t towlower( wint_t c ); -wint_t towupper( wint_t c ); - -wctrans_t wctrans( const char * property ); -wctype_t wctype( const char * property ); - -#endif // __WCTYPE_H +/* 7.30 Wide Character Classification and Mapping Utilities + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#ifndef _PDCLIB_WCTYPE_H +#define _PDCLIB_WCTYPE_H _PDCLIB_WCTYPE_H +#include <_PDCLIB_int.h> +_PDCLIB_BEGIN_EXTERN_C + +#ifndef _PDCLIB_WINT_T_DEFINED +#define _PDCLIB_WINT_T_DEFINED _PDCLIB_WINT_T_DEFINED +typedef _PDCLIB_wint_t wint_t; +#endif + +typedef int wctrans_t; +typedef int wctype_t; + +/* 7.30.2.1 Character classification functions */ +int iswalnum( wint_t _Wc ); +int iswalpha( wint_t _Wc ); +int iswblank( wint_t _Wc ); +int iswcntrl( wint_t _Wc ); +int iswdigit( wint_t _Wc ); +int iswgraph( wint_t _Wc ); +int iswlower( wint_t _Wc ); +int iswprint( wint_t _Wc ); +int iswpunct( wint_t _Wc ); +int iswspace( wint_t _Wc ); +int iswupper( wint_t _Wc ); +int iswxdigit( wint_t _Wc ); + +/* 7.30.2.2 Extensible character classification functions */ +int iswctype( wint_t _Wc, wctype_t _Desc ); +wctype_t wctype( const char * _Property ); + +/* 7.30.3 Wide character case mapping utilities */ +wint_t towlower( wint_t _Wc ); +wint_t towupper( wint_t _Wc ); + +/* 7.30.3.2 Extensible wide character case mapping functions */ +wint_t towctrans( wint_t _Wc, wctrans_t _Desc ); +wctrans_t wctrans( const char * _Property ); + +_PDCLIB_END_EXTERN_C +#endif // _PDCLIB_WCTYPE_H