xref: /netbsd-src/include/wctype.h (revision 89a508fbb5de6a2c0af91f92b7d76c4693ef01d5)
1*89a508fbSjoerg /*	$NetBSD: wctype.h,v 1.9 2013/04/27 21:35:25 joerg Exp $	*/
2a25075d3Sitojun 
3a25075d3Sitojun /*-
4a25075d3Sitojun  * Copyright (c)1999 Citrus Project,
5a25075d3Sitojun  * All rights reserved.
6a25075d3Sitojun  *
7a25075d3Sitojun  * Redistribution and use in source and binary forms, with or without
8a25075d3Sitojun  * modification, are permitted provided that the following conditions
9a25075d3Sitojun  * are met:
10a25075d3Sitojun  * 1. Redistributions of source code must retain the above copyright
11a25075d3Sitojun  *    notice, this list of conditions and the following disclaimer.
12a25075d3Sitojun  * 2. Redistributions in binary form must reproduce the above copyright
13a25075d3Sitojun  *    notice, this list of conditions and the following disclaimer in the
14a25075d3Sitojun  *    documentation and/or other materials provided with the distribution.
15a25075d3Sitojun  *
16a25075d3Sitojun  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17a25075d3Sitojun  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18a25075d3Sitojun  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19a25075d3Sitojun  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20a25075d3Sitojun  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21a25075d3Sitojun  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22a25075d3Sitojun  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23a25075d3Sitojun  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24a25075d3Sitojun  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25a25075d3Sitojun  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26a25075d3Sitojun  * SUCH DAMAGE.
27a25075d3Sitojun  *
28a25075d3Sitojun  *	citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp
29a25075d3Sitojun  */
30a25075d3Sitojun 
31a25075d3Sitojun #ifndef _WCTYPE_H_
32a25075d3Sitojun #define	_WCTYPE_H_
33a25075d3Sitojun 
34a25075d3Sitojun #include <sys/cdefs.h>
35*89a508fbSjoerg #include <sys/featuretest.h>
36377cb4e4Stnozaki #include <sys/ansi.h>
37a25075d3Sitojun 
38a25075d3Sitojun #ifdef	_BSD_WINT_T_
39a25075d3Sitojun typedef	_BSD_WINT_T_    wint_t;
40a25075d3Sitojun #undef	_BSD_WINT_T_
41a25075d3Sitojun #endif
42a25075d3Sitojun 
4331e2cbf0Stshiozak #ifdef	_BSD_WCTRANS_T_
4431e2cbf0Stshiozak typedef	_BSD_WCTRANS_T_	wctrans_t;
4531e2cbf0Stshiozak #undef	_BSD_WCTRANS_T_
4631e2cbf0Stshiozak #endif
4731e2cbf0Stshiozak 
4831e2cbf0Stshiozak #ifdef	_BSD_WCTYPE_T_
4931e2cbf0Stshiozak typedef	_BSD_WCTYPE_T_	wctype_t;
5031e2cbf0Stshiozak #undef	_BSD_WCTYPE_T_
5131e2cbf0Stshiozak #endif
5231e2cbf0Stshiozak 
53a25075d3Sitojun #ifndef WEOF
54a25075d3Sitojun #define	WEOF	((wint_t)-1)
55a25075d3Sitojun #endif
56a25075d3Sitojun 
57a25075d3Sitojun __BEGIN_DECLS
5819b7469aSperry int	iswalnum(wint_t);
5919b7469aSperry int	iswalpha(wint_t);
6019b7469aSperry int	iswblank(wint_t);
6119b7469aSperry int	iswcntrl(wint_t);
6219b7469aSperry int	iswdigit(wint_t);
6319b7469aSperry int	iswgraph(wint_t);
6419b7469aSperry int	iswlower(wint_t);
6519b7469aSperry int	iswprint(wint_t);
6619b7469aSperry int	iswpunct(wint_t);
6719b7469aSperry int	iswspace(wint_t);
6819b7469aSperry int	iswupper(wint_t);
6919b7469aSperry int	iswxdigit(wint_t);
7019b7469aSperry int	iswctype(wint_t, wctype_t);
7119b7469aSperry wint_t	towctrans(wint_t, wctrans_t);
7219b7469aSperry wint_t	towlower(wint_t);
7319b7469aSperry wint_t	towupper(wint_t);
7419b7469aSperry wctrans_t wctrans(const char *);
7519b7469aSperry wctype_t wctype(const char *);
76b7970e3bSjoerg 
77b7970e3bSjoerg #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
78b7970e3bSjoerg #  ifndef __LOCALE_T_DECLARED
79b7970e3bSjoerg typedef struct _locale		*locale_t;
80b7970e3bSjoerg #  define __LOCALE_T_DECLARED
81b7970e3bSjoerg #  endif
82b7970e3bSjoerg int	iswalnum_l(wint_t, locale_t);
83b7970e3bSjoerg int	iswalpha_l(wint_t, locale_t);
84b7970e3bSjoerg int	iswblank_l(wint_t, locale_t);
85b7970e3bSjoerg int	iswcntrl_l(wint_t, locale_t);
86b7970e3bSjoerg int	iswdigit_l(wint_t, locale_t);
87b7970e3bSjoerg int	iswgraph_l(wint_t, locale_t);
88b7970e3bSjoerg int	iswlower_l(wint_t, locale_t);
89b7970e3bSjoerg int	iswprint_l(wint_t, locale_t);
90b7970e3bSjoerg int	iswpunct_l(wint_t, locale_t);
91b7970e3bSjoerg int	iswspace_l(wint_t, locale_t);
92b7970e3bSjoerg int	iswupper_l(wint_t, locale_t);
93b7970e3bSjoerg int	iswxdigit_l(wint_t, locale_t);
94b7970e3bSjoerg int	iswctype_l(wint_t, wctype_t, locale_t);
95b7970e3bSjoerg wint_t	towctrans_l(wint_t, wctrans_t, locale_t);
96b7970e3bSjoerg wint_t	towlower_l(wint_t, locale_t);
97b7970e3bSjoerg wint_t	towupper_l(wint_t, locale_t);
98b7970e3bSjoerg wctrans_t wctrans_l(const char *, locale_t);
99b7970e3bSjoerg wctype_t wctype_l(const char *, locale_t);
100b7970e3bSjoerg #endif
101a25075d3Sitojun __END_DECLS
102a25075d3Sitojun 
103a25075d3Sitojun #endif		/* _WCTYPE_H_ */
104