ntdll: Allow NtQueryVolumeInformationFile to make async volume information queries.
[wine.git] / include / msvcrt / wchar.h
blobcb82a08692aa772e4d28cd54d132591ddd3b2b63
1 /*
2 * Unicode definitions
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.
7 */
8 #ifndef __WINE_WCHAR_H
9 #define __WINE_WCHAR_H
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>
19 #include <sys/stat.h>
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 #ifndef WCHAR_MIN /* also in stdint.h */
26 #define WCHAR_MIN 0U
27 #define WCHAR_MAX 0xffffU
28 #endif
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)
49 const wchar_t *end;
50 for (end = s + n; s < end; s++)
51 if (*s == c) return (wchar_t*)s;
52 return NULL;
55 static inline int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
57 size_t i;
58 for (i = 0; i < n; i++)
60 if (s1[i] > s2[i]) return 1;
61 if (s1[i] < s2[i]) return -1;
63 return 0;
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)
78 size_t i;
79 for (i = 0; i < n; i++)
80 s[i] = c;
81 return s;
84 #ifdef __cplusplus
86 #endif
88 #endif /* __WINE_WCHAR_H */