1 |
148 |
jeremybenn |
#ifndef _WCHAR_H_
|
2 |
|
|
#define _WCHAR_H_
|
3 |
|
|
|
4 |
|
|
#include <_ansi.h>
|
5 |
|
|
|
6 |
|
|
#include <sys/reent.h>
|
7 |
|
|
|
8 |
|
|
#define __need_size_t
|
9 |
|
|
#define __need_wchar_t
|
10 |
|
|
#define __need_wint_t
|
11 |
|
|
#include <stddef.h>
|
12 |
|
|
|
13 |
|
|
/* For _mbstate_t definition. */
|
14 |
|
|
#include <sys/_types.h>
|
15 |
|
|
|
16 |
|
|
#ifndef NULL
|
17 |
|
|
#define NULL 0
|
18 |
|
|
#endif
|
19 |
|
|
|
20 |
|
|
#ifndef WEOF
|
21 |
|
|
# define WEOF ((wint_t)-1)
|
22 |
|
|
#endif
|
23 |
|
|
|
24 |
|
|
#ifndef WCHAR_MIN
|
25 |
|
|
#define WCHAR_MIN 0
|
26 |
|
|
#endif
|
27 |
|
|
|
28 |
|
|
#ifndef WCHAR_MAX
|
29 |
|
|
#ifdef __WCHAR_MAX__
|
30 |
|
|
#define WCHAR_MAX __WCHAR_MAX__
|
31 |
|
|
#else
|
32 |
|
|
#define WCHAR_MAX 0x7fffffffu
|
33 |
|
|
#endif
|
34 |
|
|
#endif
|
35 |
|
|
|
36 |
|
|
_BEGIN_STD_C
|
37 |
|
|
|
38 |
|
|
#ifndef _MBSTATE_T
|
39 |
|
|
#define _MBSTATE_T
|
40 |
|
|
typedef _mbstate_t mbstate_t;
|
41 |
|
|
#endif /* _MBSTATE_T */
|
42 |
|
|
|
43 |
|
|
wint_t _EXFUN(btowc, (int));
|
44 |
|
|
int _EXFUN(wctob, (wint_t));
|
45 |
|
|
size_t _EXFUN(mbrlen, (const char * , size_t, mbstate_t *));
|
46 |
|
|
size_t _EXFUN(mbrtowc, (wchar_t * , const char * , size_t, mbstate_t *));
|
47 |
|
|
size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * ,
|
48 |
|
|
size_t, mbstate_t *));
|
49 |
|
|
int _EXFUN(mbsinit, (const mbstate_t *));
|
50 |
|
|
size_t _EXFUN(mbsrtowcs, (wchar_t * , const char ** , size_t, mbstate_t *));
|
51 |
|
|
size_t _EXFUN(_mbsrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *));
|
52 |
|
|
size_t _EXFUN(wcrtomb, (char * , wchar_t, mbstate_t *));
|
53 |
|
|
size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *));
|
54 |
|
|
size_t _EXFUN(wcsrtombs, (char * , const wchar_t ** , size_t, mbstate_t *));
|
55 |
|
|
size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** ,
|
56 |
|
|
size_t, mbstate_t *));
|
57 |
|
|
wchar_t *_EXFUN(wcscat, (wchar_t * , const wchar_t *));
|
58 |
|
|
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
|
59 |
|
|
int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *));
|
60 |
|
|
int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *));
|
61 |
|
|
wchar_t *_EXFUN(wcscpy, (wchar_t * , const wchar_t *));
|
62 |
|
|
wchar_t *_EXFUN(wcpcpy, (wchar_t * , const wchar_t *));
|
63 |
|
|
size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *));
|
64 |
|
|
size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));
|
65 |
|
|
size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t));
|
66 |
|
|
size_t _EXFUN(wcslen, (const wchar_t *));
|
67 |
|
|
wchar_t *_EXFUN(wcsncat, (wchar_t * , const wchar_t * , size_t));
|
68 |
|
|
int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t));
|
69 |
|
|
wchar_t *_EXFUN(wcsncpy, (wchar_t * , const wchar_t * , size_t));
|
70 |
|
|
wchar_t *_EXFUN(wcpncpy, (wchar_t * , const wchar_t * , size_t));
|
71 |
|
|
size_t _EXFUN(wcsnlen, (const wchar_t *, size_t));
|
72 |
|
|
wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *));
|
73 |
|
|
wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t));
|
74 |
|
|
size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *));
|
75 |
|
|
wchar_t *_EXFUN(wcsstr, (const wchar_t *, const wchar_t *));
|
76 |
|
|
wchar_t *_EXFUN(wcstok, (wchar_t *, const wchar_t *, wchar_t **));
|
77 |
|
|
int _EXFUN(wcswidth, (const wchar_t *, size_t));
|
78 |
|
|
size_t _EXFUN(wcsxfrm, (wchar_t *, const wchar_t *, size_t));
|
79 |
|
|
int _EXFUN(wcwidth, (const wchar_t));
|
80 |
|
|
wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t));
|
81 |
|
|
int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t));
|
82 |
|
|
wchar_t *_EXFUN(wmemcpy, (wchar_t * , const wchar_t * , size_t));
|
83 |
|
|
wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t));
|
84 |
|
|
wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t));
|
85 |
|
|
|
86 |
|
|
long _EXFUN(wcstol, (const wchar_t *, wchar_t **, int));
|
87 |
|
|
long long _EXFUN(wcstoll, (const wchar_t *, wchar_t **, int));
|
88 |
|
|
unsigned long _EXFUN(wcstoul, (const wchar_t *, wchar_t **, int));
|
89 |
|
|
unsigned long long _EXFUN(wcstoull, (const wchar_t *, wchar_t **, int));
|
90 |
|
|
long _EXFUN(_wcstol_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
91 |
|
|
long long _EXFUN(_wcstoll_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
92 |
|
|
unsigned long _EXFUN(_wcstoul_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
93 |
|
|
unsigned long long _EXFUN(_wcstoull_r, (struct _reent *, const wchar_t *, wchar_t **, int));
|
94 |
|
|
|
95 |
|
|
wint_t _EXFUN(fgetwc, (__FILE *));
|
96 |
|
|
wchar_t *_EXFUN(fgetws, (wchar_t *, int, __FILE *));
|
97 |
|
|
wint_t _EXFUN(fputwc, (wchar_t, __FILE *));
|
98 |
|
|
int _EXFUN(fputws, (const wchar_t *, __FILE *));
|
99 |
|
|
int _EXFUN (fwide, (__FILE *, int));
|
100 |
|
|
wint_t _EXFUN (getwc, (__FILE *));
|
101 |
|
|
wint_t _EXFUN (getwchar, (void));
|
102 |
|
|
wint_t _EXFUN(putwc, (wchar_t, __FILE *));
|
103 |
|
|
wint_t _EXFUN(putwchar, (wchar_t));
|
104 |
|
|
wint_t _EXFUN (ungetwc, (wint_t wc, __FILE *));
|
105 |
|
|
|
106 |
|
|
wint_t _EXFUN(_fgetwc_r, (struct _reent *, __FILE *));
|
107 |
|
|
wchar_t *_EXFUN(_fgetws_r, (struct _reent *, wchar_t *, int, __FILE *));
|
108 |
|
|
wint_t _EXFUN(_fputwc_r, (struct _reent *, wchar_t, __FILE *));
|
109 |
|
|
int _EXFUN(_fputws_r, (struct _reent *, const wchar_t *, __FILE *));
|
110 |
|
|
int _EXFUN (_fwide_r, (struct _reent *, __FILE *, int));
|
111 |
|
|
wint_t _EXFUN (_getwc_r, (struct _reent *, __FILE *));
|
112 |
|
|
wint_t _EXFUN (_getwchar_r, (struct _reent *ptr));
|
113 |
|
|
wint_t _EXFUN(_putwc_r, (struct _reent *, wchar_t, __FILE *));
|
114 |
|
|
wint_t _EXFUN(_putwchar_r, (struct _reent *, wchar_t));
|
115 |
|
|
wint_t _EXFUN (_ungetwc_r, (struct _reent *, wint_t wc, __FILE *));
|
116 |
|
|
|
117 |
|
|
#define getwc(fp) fgetwc(fp)
|
118 |
|
|
#define putwc(wc,fp) fputwc((wc), (fp))
|
119 |
|
|
#ifndef _REENT_ONLY
|
120 |
|
|
#define getwchar() fgetwc(_REENT->_stdin)
|
121 |
|
|
#define putwchar(wc) fputwc((wc), _REENT->_stdout)
|
122 |
|
|
#else
|
123 |
|
|
#define getwchar() fgetwc(_impure_ptr->_stdin)
|
124 |
|
|
#define putwchar(wc) fputwc((wc), _impure_ptr->_stdout)
|
125 |
|
|
#endif
|
126 |
|
|
|
127 |
|
|
_END_STD_C
|
128 |
|
|
|
129 |
|
|
#endif /* _WCHAR_H_ */
|