xref: /openbsd/include/wctype.h (revision 3a628b46)
1*3a628b46Sschwarze /*	$OpenBSD: wctype.h,v 1.6 2017/09/05 03:16:13 schwarze Exp $	*/
2bc92a556Sespie /*	$NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $	*/
3bc92a556Sespie 
4bc92a556Sespie /*-
5bc92a556Sespie  * Copyright (c)1999 Citrus Project,
6bc92a556Sespie  * All rights reserved.
7bc92a556Sespie  *
8bc92a556Sespie  * Redistribution and use in source and binary forms, with or without
9bc92a556Sespie  * modification, are permitted provided that the following conditions
10bc92a556Sespie  * are met:
11bc92a556Sespie  * 1. Redistributions of source code must retain the above copyright
12bc92a556Sespie  *    notice, this list of conditions and the following disclaimer.
13bc92a556Sespie  * 2. Redistributions in binary form must reproduce the above copyright
14bc92a556Sespie  *    notice, this list of conditions and the following disclaimer in the
15bc92a556Sespie  *    documentation and/or other materials provided with the distribution.
16bc92a556Sespie  *
17bc92a556Sespie  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18bc92a556Sespie  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19bc92a556Sespie  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20bc92a556Sespie  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21bc92a556Sespie  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22bc92a556Sespie  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23bc92a556Sespie  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24bc92a556Sespie  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25bc92a556Sespie  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26bc92a556Sespie  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27bc92a556Sespie  * SUCH DAMAGE.
28bc92a556Sespie  *
29bc92a556Sespie  *	citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp
30bc92a556Sespie  */
31bc92a556Sespie 
32bc92a556Sespie #ifndef _WCTYPE_H_
33bc92a556Sespie #define	_WCTYPE_H_
34bc92a556Sespie 
35bc92a556Sespie #include <sys/cdefs.h>
36c916d948Smillert #include <machine/_types.h>
37bc92a556Sespie 
38c916d948Smillert #ifndef	_WINT_T_DEFINED_
39c916d948Smillert #define	_WINT_T_DEFINED_
40c916d948Smillert typedef	__wint_t    wint_t;
41bc92a556Sespie #endif
42bc92a556Sespie 
43c916d948Smillert #ifndef	_WCTRANS_T_DEFINED_
44c916d948Smillert #define	_WCTRANS_T_DEFINED_
45c916d948Smillert typedef	__wctrans_t	wctrans_t;
46bc92a556Sespie #endif
47bc92a556Sespie 
48c916d948Smillert #ifndef	_WCTYPE_T_DEFINED_
49c916d948Smillert #define	_WCTYPE_T_DEFINED_
50c916d948Smillert typedef	__wctype_t	wctype_t;
51bc92a556Sespie #endif
52bc92a556Sespie 
53bc92a556Sespie #ifndef WEOF
54bc92a556Sespie #define	WEOF	((wint_t)-1)
55bc92a556Sespie #endif
56bc92a556Sespie 
57*3a628b46Sschwarze #if __POSIX_VISIBLE >= 200809
58*3a628b46Sschwarze #ifndef	_LOCALE_T_DEFINED_
59*3a628b46Sschwarze #define	_LOCALE_T_DEFINED_
60*3a628b46Sschwarze typedef void	*locale_t;
61*3a628b46Sschwarze #endif
62*3a628b46Sschwarze #endif
63*3a628b46Sschwarze 
645c0c174aSespie __BEGIN_DECLS
655c0c174aSespie int	iswalnum(wint_t);
665c0c174aSespie int	iswalpha(wint_t);
675c0c174aSespie int	iswblank(wint_t);
685c0c174aSespie int	iswcntrl(wint_t);
695c0c174aSespie int	iswdigit(wint_t);
705c0c174aSespie int	iswgraph(wint_t);
715c0c174aSespie int	iswlower(wint_t);
725c0c174aSespie int	iswprint(wint_t);
735c0c174aSespie int	iswpunct(wint_t);
745c0c174aSespie int	iswspace(wint_t);
755c0c174aSespie int	iswupper(wint_t);
765c0c174aSespie int	iswxdigit(wint_t);
7738311d31Sespie int	iswctype(wint_t, wctype_t);
7838311d31Sespie wint_t	towctrans(wint_t, wctrans_t);
795c0c174aSespie wint_t	towlower(wint_t);
805c0c174aSespie wint_t	towupper(wint_t);
8138311d31Sespie wctrans_t wctrans(const char *);
82561d433dSespie wctype_t wctype(const char *);
83*3a628b46Sschwarze 
84*3a628b46Sschwarze #if __POSIX_VISIBLE >= 200809
85*3a628b46Sschwarze int	iswalnum_l(wint_t, locale_t);
86*3a628b46Sschwarze int	iswalpha_l(wint_t, locale_t);
87*3a628b46Sschwarze int	iswblank_l(wint_t, locale_t);
88*3a628b46Sschwarze int	iswcntrl_l(wint_t, locale_t);
89*3a628b46Sschwarze int	iswdigit_l(wint_t, locale_t);
90*3a628b46Sschwarze int	iswgraph_l(wint_t, locale_t);
91*3a628b46Sschwarze int	iswlower_l(wint_t, locale_t);
92*3a628b46Sschwarze int	iswprint_l(wint_t, locale_t);
93*3a628b46Sschwarze int	iswpunct_l(wint_t, locale_t);
94*3a628b46Sschwarze int	iswspace_l(wint_t, locale_t);
95*3a628b46Sschwarze int	iswupper_l(wint_t, locale_t);
96*3a628b46Sschwarze int	iswxdigit_l(wint_t, locale_t);
97*3a628b46Sschwarze int	iswctype_l(wint_t, wctype_t, locale_t);
98*3a628b46Sschwarze wint_t	towctrans_l(wint_t, wctrans_t, locale_t);
99*3a628b46Sschwarze wint_t	towlower_l(wint_t, locale_t);
100*3a628b46Sschwarze wint_t	towupper_l(wint_t, locale_t);
101*3a628b46Sschwarze wctrans_t wctrans_l(const char *, locale_t);
102*3a628b46Sschwarze wctype_t wctype_l(const char *, locale_t);
103*3a628b46Sschwarze #endif
104*3a628b46Sschwarze 
1055c0c174aSespie __END_DECLS
1065c0c174aSespie 
107bc92a556Sespie #endif		/* _WCTYPE_H_ */
108