uchar.h revision 250883
1250883Sed/*- 2250883Sed * Copyright (c) 2013 Ed Schouten <ed@FreeBSD.org> 3250883Sed * All rights reserved. 4250883Sed * 5250883Sed * Redistribution and use in source and binary forms, with or without 6250883Sed * modification, are permitted provided that the following conditions 7250883Sed * are met: 8250883Sed * 1. Redistributions of source code must retain the above copyright 9250883Sed * notice, this list of conditions and the following disclaimer. 10250883Sed * 2. Redistributions in binary form must reproduce the above copyright 11250883Sed * notice, this list of conditions and the following disclaimer in the 12250883Sed * documentation and/or other materials provided with the distribution. 13250883Sed * 14250883Sed * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15250883Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16250883Sed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17250883Sed * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18250883Sed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19250883Sed * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20250883Sed * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21250883Sed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22250883Sed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23250883Sed * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24250883Sed * SUCH DAMAGE. 25250883Sed * 26250883Sed * $FreeBSD: head/include/uchar.h 250883 2013-05-21 19:59:37Z ed $ 27250883Sed */ 28250883Sed 29250883Sed#ifndef _UCHAR_H_ 30250883Sed#define _UCHAR_H_ 31250883Sed 32250883Sed#include <sys/cdefs.h> 33250883Sed#include <sys/_types.h> 34250883Sed 35250883Sed#ifndef _MBSTATE_T_DECLARED 36250883Sedtypedef __mbstate_t mbstate_t; 37250883Sed#define _MBSTATE_T_DECLARED 38250883Sed#endif 39250883Sed 40250883Sed#ifndef _SIZE_T_DECLARED 41250883Sedtypedef __size_t size_t; 42250883Sed#define _SIZE_T_DECLARED 43250883Sed#endif 44250883Sed 45250883Sedtypedef __char16_t char16_t; 46250883Sedtypedef __char32_t char32_t; 47250883Sed 48250883Sed__BEGIN_DECLS 49250883Sedsize_t c16rtomb(char * __restrict, char16_t, mbstate_t * __restrict); 50250883Sedsize_t c32rtomb(char * __restrict, char32_t, mbstate_t * __restrict); 51250883Sedsize_t mbrtoc16(char16_t * __restrict, const char * __restrict, size_t, 52250883Sed mbstate_t * __restrict); 53250883Sedsize_t mbrtoc32(char32_t * __restrict, const char * __restrict, size_t, 54250883Sed mbstate_t * __restrict); 55250883Sed#if __BSD_VISIBLE || defined(_XLOCALE_H_) 56250883Sed#include <xlocale/_uchar.h> 57250883Sed#endif 58250883Sed__END_DECLS 59250883Sed 60250883Sed#endif /* !_UCHAR_H_ */ 61