| /* |
| * wchar.h |
| * This file has no copyright assigned and is placed in the Public Domain. |
| * This file is a part of the mingw-runtime package. |
| * No warranty is given; refer to the file DISCLAIMER within the package. |
| * |
| * Defines of all functions for supporting wide characters. Actually it |
| * just includes all those headers, which is not a good thing to do from a |
| * processing time point of view, but it does mean that everything will be |
| * in sync. |
| * |
| * Simplified by Rivoreo for use with the Native C Library for Windows NT. |
| */ |
| |
| #ifndef _WCHAR_H_ |
| #define _WCHAR_H_ |
| |
| /* All the headers include this file. */ |
| #include <_mingw.h> |
| |
| #ifndef RC_INVOKED |
| |
| #define __need_size_t |
| #define __need_wint_t |
| #define __need_wchar_t |
| #define __need_NULL |
| #include <stddef.h> |
| |
| #ifndef __VALIST |
| #if defined __GNUC__ && __GNUC__ >= 3 |
| #define __need___va_list |
| #include <stdarg.h> |
| #define __VALIST __builtin_va_list |
| #else |
| #define __VALIST char* |
| #endif |
| #endif |
| |
| #endif /* Not RC_INVOKED */ |
| |
| #ifndef __STRICT_ANSI__ |
| /* This is necessary to support the the non-ANSI wchar declarations |
| here. */ |
| #include <sys/types.h> |
| #endif /* __STRICT_ANSI__ */ |
| |
| #define WCHAR_MIN 0 |
| #define WCHAR_MAX 0xffff |
| |
| #ifndef WEOF |
| #define WEOF (wchar_t)(0xFFFF) |
| #endif |
| |
| #ifndef RC_INVOKED |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| #ifndef _FILE_DEFINED /* Also in stdio.h */ |
| typedef struct _io_buffer FILE; |
| #define __FILE_defined 1 |
| #define _FILE_DEFINED __FILE_defined |
| #endif /* Not _FILE_DEFINED */ |
| |
| #ifndef _TM_DEFINED /* Also in time.h */ |
| struct tm { |
| int tm_sec; /* seconds after the minute - [0,59] */ |
| int tm_min; /* minutes after the hour - [0,59] */ |
| int tm_hour; /* hours since midnight - [0,23] */ |
| int tm_mday; /* day of the month - [1,31] */ |
| int tm_mon; /* months since January - [0,11] */ |
| int tm_year; /* years since 1900 */ |
| int tm_wday; /* days since Sunday - [0,6] */ |
| int tm_yday; /* days since January 1 - [0,365] */ |
| int tm_isdst; /* daylight savings time flag */ |
| }; |
| #define _TM_DEFINED |
| #endif |
| |
| #ifndef _WSTDIO_DEFINED |
| /* Also in stdio.h - keep in sync */ |
| _CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...); |
| _CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...); |
| _CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...); |
| _CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST); |
| _CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST); |
| _CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST); |
| _CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST); |
| _CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...); |
| _CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...); |
| _CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*); |
| _CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*); |
| _CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*); |
| |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*); |
| _CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*); |
| _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*); |
| _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void); |
| _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*); |
| _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t); |
| |
| #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ |
| int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); |
| __CRT_INLINE int __cdecl __MINGW_NOTHROW |
| vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg) |
| { return _vsnwprintf ( s, n, format, arg);} |
| int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST); |
| int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__, |
| const wchar_t * __restrict__, __VALIST); |
| int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__, |
| const wchar_t * __restrict__, __VALIST); |
| #endif |
| |
| #define _WSTDIO_DEFINED |
| #endif /* _WSTDIO_DEFINED */ |
| |
| #ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */ |
| _CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); |
| _CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); |
| _CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**); |
| #if !defined __NO_ISOCEXT /* in libmingwex.a */ |
| float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__); |
| long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); |
| #endif /* __NO_ISOCEXT */ |
| #define _WSTDLIB_DEFINED |
| #endif /* _WSTDLIB_DEFINED */ |
| |
| #ifndef _WTIME_DEFINED |
| _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); |
| #define _WTIME_DEFINED |
| #endif /* _WTIME_DEFINED */ |
| |
| |
| #ifndef _WSTRING_DEFINED |
| /* |
| * Unicode versions of the standard string calls. |
| * Also in string.h. |
| */ |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*); |
| _CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*); |
| _CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t); |
| _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*); |
| _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t); |
| |
| #ifndef __STRICT_ANSI__ |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*); |
| _CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t); |
| _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*); |
| #endif /* Not strict ANSI */ |
| |
| #define _WSTRING_DEFINED |
| #endif /* _WSTRING_DEFINED */ |
| |
| /* These are resolved by -lmingwex. Alternatively, they can be resolved by |
| adding -lmsvcp60 to your command line, which will give you the VC++ |
| versions of these functions. If you want the latter and don't have |
| msvcp60.dll in your windows system directory, you can easily obtain |
| it with a search from your favorite search engine. */ |
| |
| typedef int mbstate_t; |
| |
| wint_t __cdecl __MINGW_NOTHROW btowc(int); |
| size_t __cdecl __MINGW_NOTHROW mbrlen(const char * __restrict__, size_t, |
| mbstate_t * __restrict__); |
| size_t __cdecl __MINGW_NOTHROW mbrtowc(wchar_t * __restrict__, const char * __restrict__, |
| size_t, mbstate_t * __restrict__); |
| size_t __cdecl __MINGW_NOTHROW mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__, |
| size_t, mbstate_t * __restrict__); |
| size_t __cdecl __MINGW_NOTHROW wcrtomb(char * __restrict__, wchar_t, |
| mbstate_t * __restrict__); |
| size_t __cdecl __MINGW_NOTHROW wcsrtombs(char * __restrict__, const wchar_t ** __restrict__, |
| size_t, mbstate_t * __restrict__); |
| int __cdecl __MINGW_NOTHROW wctob(wint_t); |
| |
| #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */ |
| __CRT_INLINE int __cdecl __MINGW_NOTHROW fwide(FILE* __UNUSED_PARAM(stream), |
| int __UNUSED_PARAM(mode)) |
| {return -1;} /* limited to byte orientation */ |
| __CRT_INLINE int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t* __UNUSED_PARAM(ps)) |
| {return 1;} |
| wchar_t* __cdecl __MINGW_NOTHROW wmemset(wchar_t *, wchar_t, size_t); |
| wchar_t* __cdecl __MINGW_NOTHROW wmemchr(const wchar_t*, wchar_t, size_t); |
| int wmemcmp(const wchar_t*, const wchar_t *, size_t); |
| wchar_t* __cdecl __MINGW_NOTHROW wmemcpy(wchar_t* __restrict__, |
| const wchar_t* __restrict__, |
| size_t); |
| wchar_t* __cdecl __MINGW_NOTHROW wmemmove(wchar_t* s1, const wchar_t *, size_t); |
| long long __cdecl __MINGW_NOTHROW wcstoll(const wchar_t * __restrict__, |
| wchar_t** __restrict__, int); |
| unsigned long long __cdecl __MINGW_NOTHROW wcstoull(const wchar_t * __restrict__, |
| wchar_t ** __restrict__, int); |
| #endif /* __NO_ISOCEXT */ |
| |
| #ifdef __cplusplus |
| } /* end of extern "C" */ |
| #endif |
| |
| #endif /* Not RC_INVOKED */ |
| |
| #endif /* not _WCHAR_H_ */ |
| |