wchar.h revision 76633
176633Stshiozak/*	$NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $	*/
276633Stshiozak
376633Stshiozak/*-
476633Stshiozak * Copyright (c)1999 Citrus Project,
576633Stshiozak * All rights reserved.
676633Stshiozak *
776633Stshiozak * Redistribution and use in source and binary forms, with or without
876633Stshiozak * modification, are permitted provided that the following conditions
976633Stshiozak * are met:
1076633Stshiozak * 1. Redistributions of source code must retain the above copyright
1176633Stshiozak *    notice, this list of conditions and the following disclaimer.
1276633Stshiozak * 2. Redistributions in binary form must reproduce the above copyright
1376633Stshiozak *    notice, this list of conditions and the following disclaimer in the
1476633Stshiozak *    documentation and/or other materials provided with the distribution.
1576633Stshiozak *
1676633Stshiozak * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1776633Stshiozak * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1876633Stshiozak * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1976633Stshiozak * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2076633Stshiozak * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2176633Stshiozak * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2276633Stshiozak * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2376633Stshiozak * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2476633Stshiozak * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2576633Stshiozak * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2676633Stshiozak * SUCH DAMAGE.
2776633Stshiozak *
2876633Stshiozak * $FreeBSD: head/include/wchar.h 76633 2001-05-15 19:35:57Z tshiozak $
2976633Stshiozak */
3076633Stshiozak
3176633Stshiozak/*-
3276633Stshiozak * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
3376633Stshiozak * All rights reserved.
3476633Stshiozak *
3576633Stshiozak * This code is derived from software contributed to The NetBSD Foundation
3676633Stshiozak * by Julian Coleman.
3776633Stshiozak *
3876633Stshiozak * Redistribution and use in source and binary forms, with or without
3976633Stshiozak * modification, are permitted provided that the following conditions
4076633Stshiozak * are met:
4176633Stshiozak * 1. Redistributions of source code must retain the above copyright
4276633Stshiozak *    notice, this list of conditions and the following disclaimer.
4376633Stshiozak * 2. Redistributions in binary form must reproduce the above copyright
4476633Stshiozak *    notice, this list of conditions and the following disclaimer in the
4576633Stshiozak *    documentation and/or other materials provided with the distribution.
4676633Stshiozak * 3. All advertising materials mentioning features or use of this software
4776633Stshiozak *    must display the following acknowledgement:
4876633Stshiozak *        This product includes software developed by the NetBSD
4976633Stshiozak *        Foundation, Inc. and its contributors.
5076633Stshiozak * 4. Neither the name of The NetBSD Foundation nor the names of its
5176633Stshiozak *    contributors may be used to endorse or promote products derived
5276633Stshiozak *    from this software without specific prior written permission.
5376633Stshiozak *
5476633Stshiozak * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
5576633Stshiozak * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
5676633Stshiozak * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
5776633Stshiozak * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
5876633Stshiozak * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
5976633Stshiozak * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
6076633Stshiozak * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
6176633Stshiozak * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
6276633Stshiozak * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
6376633Stshiozak * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
6476633Stshiozak * POSSIBILITY OF SUCH DAMAGE.
6576633Stshiozak */
6676633Stshiozak
6776633Stshiozak#ifndef _WCHAR_H_
6876633Stshiozak#define _WCHAR_H_
6976633Stshiozak
7076633Stshiozak#include <sys/cdefs.h>
7176633Stshiozak#include <machine/ansi.h>
7276633Stshiozak#include <sys/null.h>
7376633Stshiozak
7476633Stshiozak#ifdef	_BSD_WCHAR_T_
7576633Stshiozaktypedef	_BSD_WCHAR_T_	wchar_t;
7676633Stshiozak#undef	_BSD_WCHAR_T_
7776633Stshiozak#endif
7876633Stshiozak
7976633Stshiozak#ifdef	_BSD_MBSTATE_T_
8076633Stshiozaktypedef	_BSD_MBSTATE_T_	mbstate_t;
8176633Stshiozak#undef	_BSD_MBSTATE_T_
8276633Stshiozak#endif
8376633Stshiozak
8476633Stshiozak#ifdef	_BSD_WINT_T_
8576633Stshiozaktypedef	_BSD_WINT_T_	wint_t;
8676633Stshiozak#undef	_BSD_WINT_T_
8776633Stshiozak#endif
8876633Stshiozak
8976633Stshiozak#ifdef	_BSD_SIZE_T_
9076633Stshiozaktypedef	_BSD_SIZE_T_	size_t;
9176633Stshiozak#undef	_BSD_SIZE_T_
9276633Stshiozak#endif
9376633Stshiozak
9476633Stshiozak#ifndef WEOF
9576633Stshiozak#define	WEOF 	((wint_t)-1)
9676633Stshiozak#endif
9776633Stshiozak
9876633Stshiozak__BEGIN_DECLS
9976633Stshiozaksize_t	mbrlen __P((const char * __restrict, size_t, mbstate_t * __restrict));
10076633Stshiozaksize_t	mbrtowc __P((wchar_t * __restrict, const char * __restrict, size_t,
10176633Stshiozak	    mbstate_t * __restrict));
10276633Stshiozakint	mbsinit __P((const mbstate_t *));
10376633Stshiozaksize_t	mbsrtowcs __P((wchar_t * __restrict, const char ** __restrict, size_t,
10476633Stshiozak	    mbstate_t * __restrict));
10576633Stshiozaksize_t	wcrtomb __P((char * __restrict, wchar_t, mbstate_t * __restrict));
10676633Stshiozakwchar_t	*wcscat __P((wchar_t * __restrict, const wchar_t * __restrict));
10776633Stshiozakwchar_t	*wcschr __P((const wchar_t *, wchar_t));
10876633Stshiozakint	wcscmp __P((const wchar_t *, const wchar_t *));
10976633Stshiozakwchar_t	*wcscpy __P((wchar_t * __restrict, const wchar_t * __restrict));
11076633Stshiozaksize_t	wcscspn __P((const wchar_t *, const wchar_t *));
11176633Stshiozaksize_t	wcslen __P((const wchar_t *));
11276633Stshiozakwchar_t	*wcsncat __P((wchar_t * __restrict, const wchar_t * __restrict,
11376633Stshiozak	    size_t));
11476633Stshiozakint	wcsncmp __P((const wchar_t *, const wchar_t *, size_t));
11576633Stshiozakwchar_t	*wcsncpy __P((wchar_t * __restrict , const wchar_t * __restrict,
11676633Stshiozak	    size_t));
11776633Stshiozakwchar_t	*wcspbrk __P((const wchar_t *, const wchar_t *));
11876633Stshiozakwchar_t	*wcsrchr __P((const wchar_t *, wchar_t));
11976633Stshiozaksize_t	wcsrtombs __P((char * __restrict, const wchar_t ** __restrict, size_t,
12076633Stshiozak	    mbstate_t * __restrict));
12176633Stshiozaksize_t	wcsspn __P((const wchar_t *, const wchar_t *));
12276633Stshiozakwchar_t	*wcsstr __P((const wchar_t *, const wchar_t *));
12376633Stshiozakwchar_t	*wmemchr __P((const wchar_t *, wchar_t, size_t));
12476633Stshiozakint	wmemcmp __P((const wchar_t *, const wchar_t *, size_t));
12576633Stshiozakwchar_t	*wmemcpy __P((wchar_t * __restrict, const wchar_t * __restrict,
12676633Stshiozak	    size_t));
12776633Stshiozakwchar_t	*wmemmove __P((wchar_t *, const wchar_t *, size_t));
12876633Stshiozakwchar_t	*wmemset __P((wchar_t *, wchar_t, size_t));
12976633Stshiozak
13076633Stshiozaksize_t	wcslcat __P((wchar_t *, const wchar_t *, size_t));
13176633Stshiozaksize_t	wcslcpy __P((wchar_t *, const wchar_t *, size_t));
13276633Stshiozakint	wcswidth __P((const wchar_t *, size_t));
13376633Stshiozakint	wcwidth __P((wchar_t));
13476633Stshiozak__END_DECLS
13576633Stshiozak
13676633Stshiozak#endif /* !_WCHAR_H_ */
137