| 1 | /** | 
 
 
 
 
 | 2 | * This file has no copyright assigned and is placed in the Public Domain. | 
 
 
 
 
 | 3 | * This file is part of the mingw-w64 runtime package. | 
 
 
 
 
 | 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | 
 
 
 
 
 | 5 | */ | 
 
 
 
 
 | 6 |  | 
 
 
 
 
 | 7 | /* ISO C1x Unicode utilities | 
 
 
 
 
 | 8 | * Based on ISO/IEC SC22/WG14 9899 TR 19769 (SC22 N1326) | 
 
 
 
 
 | 9 | * | 
 
 
 
 
 | 10 | *  THIS SOFTWARE IS NOT COPYRIGHTED | 
 
 
 
 
 | 11 | * | 
 
 
 
 
 | 12 | *  This source code is offered for use in the public domain. You may | 
 
 
 
 
 | 13 | *  use, modify or distribute it freely. | 
 
 
 
 
 | 14 | * | 
 
 
 
 
 | 15 | *  This code is distributed in the hope that it will be useful but | 
 
 
 
 
 | 16 | *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | 
 
 
 
 
 | 17 | *  DISCLAIMED. This includes but is not limited to warranties of | 
 
 
 
 
 | 18 | *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 
 
 
 
 
 | 19 | * | 
 
 
 
 
 | 20 | *  Date: 2011-09-27 | 
 
 
 
 
 | 21 | */ | 
 
 
 
 
 | 22 |  | 
 
 
 
 
 | 23 | #ifndef __UCHAR_H | 
 
 
 
 
 | 24 | #define __UCHAR_H | 
 
 
 
 
 | 25 |  | 
 
 
 
 
 | 26 | #include <stddef.h>     /* size_t */ | 
 
 
 
 
 | 27 | #include <stdint.h>     /* uint_leastXX_t */ | 
 
 
 
 
 | 28 | #include <wchar.h>      /* mbstate_t */ | 
 
 
 
 
 | 29 |  | 
 
 
 
 
 | 30 | /* Remember that g++ >= 4.4 defines these types only in c++0x mode */ | 
 
 
 
 
 | 31 | #if !(defined(__cplusplus) && defined(__GXX_EXPERIMENTAL_CXX0X__)) ||   \ | 
 
 
 
 
 | 32 | !defined(__GNUC__) ||                                               \ | 
 
 
 
 
 | 33 | (!defined(__clang__) && (__GNUC__ < 4 || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))) | 
 
 
 
 
 | 34 | typedef uint_least16_t char16_t; | 
 
 
 
 
 | 35 | typedef uint_least32_t char32_t; | 
 
 
 
 
 | 36 | #endif | 
 
 
 
 
 | 37 |  | 
 
 
 
 
 | 38 | #ifndef __STDC_UTF_16__ | 
 
 
 
 
 | 39 | #define __STDC_UTF_16__ 1 | 
 
 
 
 
 | 40 | #endif | 
 
 
 
 
 | 41 |  | 
 
 
 
 
 | 42 | #ifndef __STDC_UTF_32__ | 
 
 
 
 
 | 43 | #define __STDC_UTF_32__ 1 | 
 
 
 
 
 | 44 | #endif | 
 
 
 
 
 | 45 |  | 
 
 
 
 
 | 46 | #ifdef __cplusplus | 
 
 
 
 
 | 47 | extern "C" { | 
 
 
 
 
 | 48 | #endif | 
 
 
 
 
 | 49 |  | 
 
 
 
 
 | 50 | size_t mbrtoc16 (char16_t *__restrict__ pc16, | 
 
 
 
 
 | 51 | const char *__restrict__ s, | 
 
 
 
 
 | 52 | size_t n, | 
 
 
 
 
 | 53 | mbstate_t *__restrict__ ps); | 
 
 
 
 
 | 54 |  | 
 
 
 
 
 | 55 | size_t c16rtomb (char *__restrict__ s, | 
 
 
 
 
 | 56 | char16_t c16, | 
 
 
 
 
 | 57 | mbstate_t *__restrict__ ps); | 
 
 
 
 
 | 58 |  | 
 
 
 
 
 | 59 | size_t mbrtoc32 (char32_t *__restrict__ pc32, | 
 
 
 
 
 | 60 | const char *__restrict__ s, | 
 
 
 
 
 | 61 | size_t n, | 
 
 
 
 
 | 62 | mbstate_t *__restrict__ ps); | 
 
 
 
 
 | 63 |  | 
 
 
 
 
 | 64 | size_t c32rtomb (char *__restrict__ s, | 
 
 
 
 
 | 65 | char32_t c32, | 
 
 
 
 
 | 66 | mbstate_t *__restrict__ ps); | 
 
 
 
 
 | 67 |  | 
 
 
 
 
 | 68 | #ifdef __cplusplus | 
 
 
 
 
 | 69 | } | 
 
 
 
 
 | 70 | #endif | 
 
 
 
 
 | 71 |  | 
 
 
 
 
 | 72 | #endif /* __UCHAR_H */ | 
 
 
 
 
 | 73 |  |