4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
11 #include <corecrt_wctype.h>
12 #include <corecrt_wdirect.h>
13 #include <corecrt_wio.h>
14 #include <corecrt_wprocess.h>
15 #include <corecrt_wstdio.h>
16 #include <corecrt_wstdlib.h>
17 #include <corecrt_wstring.h>
18 #include <corecrt_wtime.h>
25 #ifndef WCHAR_MIN /* also in stdint.h */
27 #define WCHAR_MAX 0xffffU
30 typedef int mbstate_t;
32 #ifndef _WLOCALE_DEFINED
33 #define _WLOCALE_DEFINED
34 _ACRTIMP
wchar_t* __cdecl
_wsetlocale(int,const wchar_t*);
35 #endif /* _WLOCALE_DEFINED */
37 wchar_t __cdecl
btowc(int);
38 size_t __cdecl
mbrlen(const char *,size_t,mbstate_t*);
39 size_t __cdecl
mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);
40 size_t __cdecl
mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*);
41 size_t __cdecl
wcrtomb(char*,wchar_t,mbstate_t*);
42 size_t __cdecl
wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
43 int __cdecl
wctob(wint_t);
45 _ACRTIMP errno_t __cdecl
wmemcpy_s(wchar_t *, size_t, const wchar_t *, size_t);
47 static inline wchar_t *wmemchr(const wchar_t *s
, wchar_t c
, size_t n
)
50 for (end
= s
+ n
; s
< end
; s
++)
51 if (*s
== c
) return (wchar_t*)s
;
55 static inline int wmemcmp(const wchar_t *s1
, const wchar_t *s2
, size_t n
)
58 for (i
= 0; i
< n
; i
++)
60 if (s1
[i
] > s2
[i
]) return 1;
61 if (s1
[i
] < s2
[i
]) return -1;
66 static inline wchar_t* __cdecl
wmemcpy(wchar_t *dst
, const wchar_t *src
, size_t n
)
68 return (wchar_t*)memcpy(dst
, src
, n
* sizeof(wchar_t));
71 static inline wchar_t* __cdecl
wmemmove(wchar_t *dst
, const wchar_t *src
, size_t n
)
73 return (wchar_t*)memmove(dst
, src
, n
* sizeof(wchar_t));
76 static inline wchar_t* __cdecl
wmemset(wchar_t *s
, wchar_t c
, size_t n
)
79 for (i
= 0; i
< n
; i
++)
88 #endif /* __WINE_WCHAR_H */