3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
8 #ifndef _PDCLIB_UCHAR_H
9 #define _PDCLIB_UCHAR_H
10 #include <_PDCLIB_int.h>
11 _PDCLIB_BEGIN_EXTERN_C
13 /* This is mostly a placeholder. for now. This header will be completed by the
14 * release of 0.6, but at present merely exposes types needed by the rest of the
18 #ifndef _PDCLIB_SIZE_T_DEFINED
19 #define _PDCLIB_SIZE_T_DEFINED _PDCLIB_SIZE_T_DEFINED
20 typedef _PDCLIB_size_t size_t;
23 #ifndef _PDCLIB_MBSTATE_T_DEFINED
24 #define _PDCLIB_MBSTATE_T_DEFINED _PDCLIB_MBSTATE_T_DEFINED
25 typedef _PDCLIB_mbstate_t mbstate_t;
29 #ifndef _PDCLIB_CHAR16_T_DEFINED
30 #define _PDCLIB_CHAR16_T_DEFINED _PDCLIB_CHAR16_T_DEFINED
31 typedef _PDCLIB_char16_t char16_t;
34 #ifndef _PDCLIB_CHAR32_T_DEFINED
35 #define _PDCLIB_CHAR32_T_DEFINED _PDCLIB_CHAR32_T_DEFINED
36 typedef _PDCLIB_char32_t char32_t;
41 char16_t *_PDCLIB_restrict pc16,
42 const char *_PDCLIB_restrict s,
44 mbstate_t *_PDCLIB_restrict ps);
47 char *_PDCLIB_restrict s,
49 mbstate_t *_PDCLIB_restrict ps);
52 char32_t *_PDCLIB_restrict pc32,
53 const char *_PDCLIB_restrict s,
55 mbstate_t *_PDCLIB_restrict ps);
58 char *_PDCLIB_restrict s,
60 mbstate_t *_PDCLIB_restrict ps);
62 #if defined(_PDCLIB_EXTENSIONS)
63 /* Analogous to strlen/wcslen */
64 size_t _PDCLIB_c16slen(const char16_t * str);
65 size_t _PDCLIB_c32slen(const char32_t * str);
67 /* String generalizations of the above functions */
68 size_t _PDCLIB_mbsrtoc16s(
69 char16_t *_PDCLIB_restrict dst,
70 const char **_PDCLIB_restrict src,
72 mbstate_t *_PDCLIB_restrict ps);
74 size_t _PDCLIB_mbsrtoc32s(
75 char32_t *_PDCLIB_restrict dst,
76 const char **_PDCLIB_restrict src,
78 mbstate_t *_PDCLIB_restrict ps);
80 size_t _PDCLIB_c16srtombs(
81 char *_PDCLIB_restrict dst,
82 const char16_t **_PDCLIB_restrict src,
84 mbstate_t *_PDCLIB_restrict ps);
86 size_t _PDCLIB_c32srtombs(
87 char *_PDCLIB_restrict dst,
88 const char32_t **_PDCLIB_restrict src,
90 mbstate_t *_PDCLIB_restrict ps);