wctype.h revision 101253
176633Stshiozak/*-
276633Stshiozak * Copyright (c)1999 Citrus Project,
376633Stshiozak * All rights reserved.
476633Stshiozak *
576633Stshiozak * Redistribution and use in source and binary forms, with or without
676633Stshiozak * modification, are permitted provided that the following conditions
776633Stshiozak * are met:
876633Stshiozak * 1. Redistributions of source code must retain the above copyright
976633Stshiozak *    notice, this list of conditions and the following disclaimer.
1076633Stshiozak * 2. Redistributions in binary form must reproduce the above copyright
1176633Stshiozak *    notice, this list of conditions and the following disclaimer in the
1276633Stshiozak *    documentation and/or other materials provided with the distribution.
1376633Stshiozak *
1476633Stshiozak * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1576633Stshiozak * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1676633Stshiozak * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1776633Stshiozak * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1876633Stshiozak * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1976633Stshiozak * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2076633Stshiozak * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2176633Stshiozak * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2276633Stshiozak * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2376633Stshiozak * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2476633Stshiozak * SUCH DAMAGE.
2576633Stshiozak *
2676633Stshiozak *	citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp
2779555Sobrien *	$NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $
2876633Stshiozak * $FreeBSD: head/include/wctype.h 101253 2002-08-03 04:18:40Z tjr $
2976633Stshiozak */
3076633Stshiozak
3176633Stshiozak#ifndef _WCTYPE_H_
3276633Stshiozak#define	_WCTYPE_H_
3376633Stshiozak
3476633Stshiozak#include <sys/cdefs.h>
3576633Stshiozak#include <machine/ansi.h>
3676633Stshiozak
37101253Stjr#include <ctype.h>
38101253Stjr
3976633Stshiozak#ifdef	_BSD_WINT_T_
4076633Stshiozaktypedef	_BSD_WINT_T_    wint_t;
4176633Stshiozak#undef	_BSD_WINT_T_
4276633Stshiozak#endif
4376633Stshiozak
44101253Stjr#ifndef _WCTYPE_T
45101253Stjrtypedef long	wctype_t;
46101253Stjr#define _WCTYPE_T
47101253Stjr#endif
48101253Stjr
4976633Stshiozak#ifndef WEOF
5076633Stshiozak#define	WEOF	((wint_t)-1)
5176633Stshiozak#endif
5276633Stshiozak
5376633Stshiozak__BEGIN_DECLS
54101253Stjrint	iswctype(wint_t, wctype_t);
55101253Stjrwctype_t wctype(const char *);
56101253Stjr#if 0
57101253Stjr/* XXX: not implemented */
5893032Simpint	iswalnum(wint_t);
5993032Simpint	iswalpha(wint_t);
6093032Simpint	iswblank(wint_t);
6193032Simpint	iswcntrl(wint_t);
6293032Simpint	iswdigit(wint_t);
6393032Simpint	iswgraph(wint_t);
6493032Simpint	iswlower(wint_t);
6593032Simpint	iswprint(wint_t);
6693032Simpint	iswpunct(wint_t);
6793032Simpint	iswspace(wint_t);
6893032Simpint	iswupper(wint_t);
6993032Simpint	iswxdigit(wint_t);
7093032Simpwint_t	towlower(wint_t);
7193032Simpwint_t	towupper(wint_t);
72101253Stjr#endif
7376633Stshiozak__END_DECLS
7476633Stshiozak
75101253Stjr#define iswctype(wc, charclass) __istype((wc), (charclass))
76101253Stjr
7776633Stshiozak#endif		/* _WCTYPE_H_ */
78