From c302397c7375157ccca7de977d83c95f38015238 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Fri, 27 Nov 2020 14:16:49 +0100 Subject: [PATCH] msvcrt: Remove MSVCRT_wchar_t type. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcrt/console.c | 38 ++-- dlls/msvcrt/ctype.c | 2 +- dlls/msvcrt/data.c | 62 +++--- dlls/msvcrt/dir.c | 88 ++++----- dlls/msvcrt/environ.c | 34 ++-- dlls/msvcrt/errno.c | 18 +- dlls/msvcrt/exit.c | 22 +-- dlls/msvcrt/file.c | 156 +++++++-------- dlls/msvcrt/heap.c | 16 +- dlls/msvcrt/locale.c | 170 ++++++++--------- dlls/msvcrt/mbcs.c | 32 ++-- dlls/msvcrt/msvcrt.h | 133 +++++++------ dlls/msvcrt/printf.h | 16 +- dlls/msvcrt/process.c | 190 +++++++++---------- dlls/msvcrt/scanf.c | 58 +++--- dlls/msvcrt/scanf.h | 28 +-- dlls/msvcrt/string.c | 46 ++--- dlls/msvcrt/time.c | 50 ++--- dlls/msvcrt/wcs.c | 432 +++++++++++++++++++++--------------------- 19 files changed, 795 insertions(+), 796 deletions(-) diff --git a/dlls/msvcrt/console.c b/dlls/msvcrt/console.c index e2452104010..8a6e0be4f7f 100644 --- a/dlls/msvcrt/console.c +++ b/dlls/msvcrt/console.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); static HANDLE MSVCRT_console_in = INVALID_HANDLE_VALUE; static HANDLE MSVCRT_console_out= INVALID_HANDLE_VALUE; static int __MSVCRT_console_buffer = MSVCRT_EOF; -static MSVCRT_wchar_t __MSVCRT_console_buffer_w = MSVCRT_WEOF; +static wchar_t __MSVCRT_console_buffer_w = MSVCRT_WEOF; /* INTERNAL: Initialise console handles */ void msvcrt_init_console(void) @@ -86,7 +86,7 @@ int CDECL _cputs(const char* str) /********************************************************************* * _cputws (MSVCRT.@) */ -int CDECL _cputws(const MSVCRT_wchar_t* str) +int CDECL _cputws(const wchar_t* str) { DWORD count; int len, retval = -1; @@ -220,9 +220,9 @@ int CDECL _getch(void) /********************************************************************* * _getwch_nolock (MSVCR80.@) */ -MSVCRT_wchar_t CDECL _getwch_nolock(void) +wchar_t CDECL _getwch_nolock(void) { - MSVCRT_wchar_t retval = MSVCRT_WEOF; + wchar_t retval = MSVCRT_WEOF; if (__MSVCRT_console_buffer_w != MSVCRT_WEOF) { @@ -274,9 +274,9 @@ MSVCRT_wchar_t CDECL _getwch_nolock(void) /********************************************************************* * _getwch (MSVCRT.@) */ -MSVCRT_wchar_t CDECL _getwch(void) +wchar_t CDECL _getwch(void) { - MSVCRT_wchar_t ret; + wchar_t ret; LOCK_CONSOLE; ret = _getwch_nolock(); @@ -309,7 +309,7 @@ int CDECL _putch(int c) /********************************************************************* * _putwch_nolock (MSVCR80.@) */ -MSVCRT_wchar_t CDECL _putwch_nolock(MSVCRT_wchar_t c) +wchar_t CDECL _putwch_nolock(wchar_t c) { DWORD count; if (WriteConsoleW(MSVCRT_console_out, &c, 1, &count, NULL) && count==1) @@ -320,7 +320,7 @@ MSVCRT_wchar_t CDECL _putwch_nolock(MSVCRT_wchar_t c) /********************************************************************* * _putwch (MSVCRT.@) */ -MSVCRT_wchar_t CDECL _putwch(MSVCRT_wchar_t c) +wchar_t CDECL _putwch(wchar_t c) { LOCK_CONSOLE; c = _putwch_nolock(c); @@ -356,9 +356,9 @@ int CDECL _getche(void) /********************************************************************* * _getwche_nolock (MSVCR80.@) */ -MSVCRT_wchar_t CDECL _getwche_nolock(void) +wchar_t CDECL _getwche_nolock(void) { - MSVCRT_wchar_t wch; + wchar_t wch; wch = _getch_nolock(); if (wch == MSVCRT_WEOF) return wch; @@ -368,9 +368,9 @@ MSVCRT_wchar_t CDECL _getwche_nolock(void) /********************************************************************* * _getwche (MSVCRT.@) */ -MSVCRT_wchar_t CDECL _getwche(void) +wchar_t CDECL _getwche(void) { - MSVCRT_wchar_t ret; + wchar_t ret; LOCK_CONSOLE; ret = _getwche_nolock(); @@ -441,9 +441,9 @@ int CDECL _ungetch(int c) /********************************************************************* * _ungetwch_nolock (MSVCR80.@) */ -MSVCRT_wchar_t CDECL _ungetwch_nolock(MSVCRT_wchar_t c) +wchar_t CDECL _ungetwch_nolock(wchar_t c) { - MSVCRT_wchar_t retval = MSVCRT_WEOF; + wchar_t retval = MSVCRT_WEOF; if (c != MSVCRT_WEOF && __MSVCRT_console_buffer_w == MSVCRT_WEOF) retval = __MSVCRT_console_buffer_w = c; return retval; @@ -452,7 +452,7 @@ MSVCRT_wchar_t CDECL _ungetwch_nolock(MSVCRT_wchar_t c) /********************************************************************* * _ungetwch (MSVCRT.@) */ -MSVCRT_wchar_t CDECL _ungetwch(MSVCRT_wchar_t c) +wchar_t CDECL _ungetwch(wchar_t c) { LOCK_CONSOLE; c = _ungetwch_nolock(c); @@ -505,7 +505,7 @@ static int puts_clbk_console_a(void *ctx, int len, const char *str) return len; } -static int puts_clbk_console_w(void *ctx, int len, const MSVCRT_wchar_t *str) +static int puts_clbk_console_w(void *ctx, int len, const wchar_t *str) { LOCK_CONSOLE; if(!WriteConsoleW(MSVCRT_console_out, str, len, NULL, NULL)) @@ -541,7 +541,7 @@ int WINAPIV _cprintf(const char* format, ...) /********************************************************************* * _vcwprintf (MSVCRT.@) */ -int CDECL _vcwprintf(const MSVCRT_wchar_t* format, __ms_va_list valist) +int CDECL _vcwprintf(const wchar_t* format, __ms_va_list valist) { return pf_printf_w(puts_clbk_console_w, NULL, format, NULL, 0, arg_clbk_valist, NULL, &valist); } @@ -549,7 +549,7 @@ int CDECL _vcwprintf(const MSVCRT_wchar_t* format, __ms_va_list valist) /********************************************************************* * _cwprintf (MSVCRT.@) */ -int WINAPIV _cwprintf(const MSVCRT_wchar_t* format, ...) +int WINAPIV _cwprintf(const wchar_t* format, ...) { int retval; __ms_va_list valist; @@ -578,7 +578,7 @@ int CDECL MSVCRT__conio_common_vcprintf(unsigned __int64 options, const char* fo /********************************************************************* * __conio_common_vcwprintf (UCRTBASE.@) */ -int CDECL MSVCRT__conio_common_vcwprintf(unsigned __int64 options, const MSVCRT_wchar_t* format, +int CDECL MSVCRT__conio_common_vcwprintf(unsigned __int64 options, const wchar_t* format, _locale_t locale, __ms_va_list valist) { if (options & ~UCRTBASE_PRINTF_MASK) diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c index 0679c66f338..0af721fda52 100644 --- a/dlls/msvcrt/ctype.c +++ b/dlls/msvcrt/ctype.c @@ -411,7 +411,7 @@ int CDECL MSVCRT___toascii(int c) * iswascii (MSVCRT.@) * */ -int CDECL MSVCRT_iswascii(MSVCRT_wchar_t c) +int CDECL MSVCRT_iswascii(wchar_t c) { return ((unsigned)c < 0x80); } diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index 78e30163baf..0e4ad4fc42c 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -47,14 +47,14 @@ unsigned int MSVCRT___setlc_active = 0; unsigned int MSVCRT___unguarded_readlc_active = 0; double MSVCRT__HUGE = 0; char **MSVCRT___argv = NULL; -MSVCRT_wchar_t **MSVCRT___wargv = NULL; -static MSVCRT_wchar_t **wargv_expand; +wchar_t **MSVCRT___wargv = NULL; +static wchar_t **wargv_expand; char *MSVCRT__acmdln = NULL; -MSVCRT_wchar_t *MSVCRT__wcmdln = NULL; +wchar_t *MSVCRT__wcmdln = NULL; char **MSVCRT__environ = NULL; -MSVCRT_wchar_t **MSVCRT__wenviron = NULL; +wchar_t **MSVCRT__wenviron = NULL; char **MSVCRT___initenv = NULL; -MSVCRT_wchar_t **MSVCRT___winitenv = NULL; +wchar_t **MSVCRT___winitenv = NULL; int MSVCRT_app_type = 0; char* MSVCRT__pgmptr = NULL; WCHAR* MSVCRT__wpgmptr = NULL; @@ -102,11 +102,11 @@ char ** msvcrt_SnapshotOfEnvironmentA(char **blk) return blk; } -MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **wblk) +wchar_t ** msvcrt_SnapshotOfEnvironmentW(wchar_t **wblk) { - MSVCRT_wchar_t* wenviron_strings = GetEnvironmentStringsW(); + wchar_t* wenviron_strings = GetEnvironmentStringsW(); int count = 1, len = 1, i = 0; /* keep space for the trailing NULLS */ - MSVCRT_wchar_t *wptr; + wchar_t *wptr; for (wptr = wenviron_strings; *wptr; wptr += MSVCRT_wcslen(wptr) + 1) { @@ -115,15 +115,15 @@ MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **wblk) len += MSVCRT_wcslen(wptr) + 1; } if (wblk) - wblk = HeapReAlloc( GetProcessHeap(), 0, wblk, count* sizeof(MSVCRT_wchar_t*) + len * sizeof(MSVCRT_wchar_t)); + wblk = HeapReAlloc( GetProcessHeap(), 0, wblk, count* sizeof(wchar_t*) + len * sizeof(wchar_t)); else - wblk = HeapAlloc(GetProcessHeap(), 0, count* sizeof(MSVCRT_wchar_t*) + len * sizeof(MSVCRT_wchar_t)); + wblk = HeapAlloc(GetProcessHeap(), 0, count* sizeof(wchar_t*) + len * sizeof(wchar_t)); if (wblk) { if (count) { - memcpy(&wblk[count],wenviron_strings,len * sizeof(MSVCRT_wchar_t)); - for (wptr = (MSVCRT_wchar_t*)&wblk[count]; *wptr; wptr += MSVCRT_wcslen(wptr) + 1) + memcpy(&wblk[count],wenviron_strings,len * sizeof(wchar_t)); + for (wptr = (wchar_t*)&wblk[count]; *wptr; wptr += MSVCRT_wcslen(wptr) + 1) { /* Skip special environment strings set by the command shell */ if (*wptr != '=') wblk[i++] = wptr; @@ -323,7 +323,7 @@ char** CDECL MSVCRT___p__acmdln(void) { return &MSVCRT__acmdln; } /********************************************************************* * __p__wcmdln (MSVCRT.@) */ -MSVCRT_wchar_t** CDECL MSVCRT___p__wcmdln(void) { return &MSVCRT__wcmdln; } +wchar_t** CDECL MSVCRT___p__wcmdln(void) { return &MSVCRT__wcmdln; } /********************************************************************* * __p___argv (MSVCRT.@) @@ -333,7 +333,7 @@ char*** CDECL MSVCRT___p___argv(void) { return &MSVCRT___argv; } /********************************************************************* * __p___wargv (MSVCRT.@) */ -MSVCRT_wchar_t*** CDECL MSVCRT___p___wargv(void) { return &MSVCRT___wargv; } +wchar_t*** CDECL MSVCRT___p___wargv(void) { return &MSVCRT___wargv; } /********************************************************************* * __p__environ (MSVCRT.@) @@ -346,7 +346,7 @@ char*** CDECL MSVCRT___p__environ(void) /********************************************************************* * __p__wenviron (MSVCRT.@) */ -MSVCRT_wchar_t*** CDECL MSVCRT___p__wenviron(void) +wchar_t*** CDECL MSVCRT___p__wenviron(void) { return &MSVCRT__wenviron; } @@ -359,7 +359,7 @@ char*** CDECL __p___initenv(void) { return &MSVCRT___initenv; } /********************************************************************* * __p___winitenv (MSVCRT.@) */ -MSVCRT_wchar_t*** CDECL __p___winitenv(void) { return &MSVCRT___winitenv; } +wchar_t*** CDECL __p___winitenv(void) { return &MSVCRT___winitenv; } /********************************************************************* * _get_osplatform (MSVCRT.@) @@ -372,10 +372,10 @@ int CDECL MSVCRT__get_osplatform(int *pValue) } /* INTERNAL: Create a wide string from an ascii string */ -MSVCRT_wchar_t *msvcrt_wstrdupa(const char *str) +wchar_t *msvcrt_wstrdupa(const char *str) { const unsigned int len = strlen(str) + 1 ; - MSVCRT_wchar_t *wstr = MSVCRT_malloc(len* sizeof (MSVCRT_wchar_t)); + wchar_t *wstr = MSVCRT_malloc(len* sizeof (wchar_t)); if (!wstr) return NULL; MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,str,len,wstr,len); @@ -474,7 +474,7 @@ void msvcrt_free_args(void) HeapFree(GetProcessHeap(), 0, wargv_expand); } -static int build_expanded_wargv(int *argc, MSVCRT_wchar_t **argv) +static int build_expanded_wargv(int *argc, wchar_t **argv) { int i, size=0, args_no=0, path_len; BOOL is_expandable; @@ -507,9 +507,9 @@ static int build_expanded_wargv(int *argc, MSVCRT_wchar_t **argv) len = MSVCRT_wcslen(data.cFileName)+1; if(argv) { - argv[args_no] = (MSVCRT_wchar_t*)(argv+*argc+1)+size; - memcpy(argv[args_no], initial_wargv[i], path_len*sizeof(MSVCRT_wchar_t)); - memcpy(argv[args_no]+path_len, data.cFileName, len*sizeof(MSVCRT_wchar_t)); + argv[args_no] = (wchar_t*)(argv+*argc+1)+size; + memcpy(argv[args_no], initial_wargv[i], path_len*sizeof(wchar_t)); + memcpy(argv[args_no]+path_len, data.cFileName, len*sizeof(wchar_t)); } args_no++; size += len+path_len; @@ -520,8 +520,8 @@ static int build_expanded_wargv(int *argc, MSVCRT_wchar_t **argv) if(!len) { len = MSVCRT_wcslen(initial_wargv[i])+1; if(argv) { - argv[args_no] = (MSVCRT_wchar_t*)(argv+*argc+1)+size; - memcpy(argv[args_no], initial_wargv[i], len*sizeof(MSVCRT_wchar_t)); + argv[args_no] = (wchar_t*)(argv+*argc+1)+size; + memcpy(argv[args_no], initial_wargv[i], len*sizeof(wchar_t)); } args_no++; size += len; @@ -530,8 +530,8 @@ static int build_expanded_wargv(int *argc, MSVCRT_wchar_t **argv) if(argv) argv[args_no] = NULL; - size *= sizeof(MSVCRT_wchar_t); - size += (args_no+1)*sizeof(MSVCRT_wchar_t*); + size *= sizeof(wchar_t); + size += (args_no+1)*sizeof(wchar_t*); *argc = args_no; return size; } @@ -539,7 +539,7 @@ static int build_expanded_wargv(int *argc, MSVCRT_wchar_t **argv) /********************************************************************* * __wgetmainargs (MSVCRT.@) */ -int CDECL __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp, +int CDECL __wgetmainargs(int *argc, wchar_t** *wargv, wchar_t** *wenvp, int expand_wildcards, int *new_mode) { TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenvp, expand_wildcards, new_mode); @@ -703,7 +703,7 @@ int CDECL _initialize_narrow_environment(void) /********************************************************************* * _get_initial_wide_environment (UCRTBASE.@) */ -MSVCRT_wchar_t** CDECL _get_initial_wide_environment(void) +wchar_t** CDECL _get_initial_wide_environment(void) { return MSVCRT___winitenv; } @@ -756,10 +756,10 @@ char* CDECL _get_narrow_winmain_command_line(void) /********************************************************************* * _get_wide_winmain_command_line (UCRTBASE.@) */ -MSVCRT_wchar_t* CDECL _get_wide_winmain_command_line(void) +wchar_t* CDECL _get_wide_winmain_command_line(void) { - static MSVCRT_wchar_t *wide_command_line; - MSVCRT_wchar_t *s; + static wchar_t *wide_command_line; + wchar_t *s; if (wide_command_line) return wide_command_line; diff --git a/dlls/msvcrt/dir.c b/dlls/msvcrt/dir.c index 06f65d56f01..8fc1ee2f82b 100644 --- a/dlls/msvcrt/dir.c +++ b/dlls/msvcrt/dir.c @@ -262,7 +262,7 @@ int CDECL MSVCRT__chdir(const char * newdir) * * Unicode version of _chdir. */ -int CDECL MSVCRT__wchdir(const MSVCRT_wchar_t * newdir) +int CDECL MSVCRT__wchdir(const wchar_t * newdir) { if (!SetCurrentDirectoryW(newdir)) { @@ -385,7 +385,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst32(const char * fspec, struct MSVCRT__fin * * Unicode version of _findfirst. */ -MSVCRT_intptr_t CDECL MSVCRT__wfindfirst(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata_t* ft) +MSVCRT_intptr_t CDECL MSVCRT__wfindfirst(const wchar_t * fspec, struct MSVCRT__wfinddata_t* ft) { WIN32_FIND_DATAW find_data; HANDLE hfind; @@ -406,7 +406,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst(const MSVCRT_wchar_t * fspec, struct MS * * Unicode version of _findfirst32. */ -MSVCRT_intptr_t CDECL MSVCRT__wfindfirst32(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata32_t* ft) +MSVCRT_intptr_t CDECL MSVCRT__wfindfirst32(const wchar_t * fspec, struct MSVCRT__wfinddata32_t* ft) { WIN32_FIND_DATAW find_data; HANDLE hfind; @@ -469,7 +469,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst64(const char * fspec, struct MSVCRT__fin * * Unicode version of _findfirst64. */ -MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata64_t* ft) +MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64(const wchar_t * fspec, struct MSVCRT__wfinddata64_t* ft) { WIN32_FIND_DATAW find_data; HANDLE hfind; @@ -511,7 +511,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst64i32(const char * fspec, struct MSVCRT__ * * Unicode version of _findfirst64i32. */ -MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64i32(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata64i32_t* ft) +MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64i32(const wchar_t * fspec, struct MSVCRT__wfinddata64i32_t* ft) { WIN32_FIND_DATAW find_data; HANDLE hfind; @@ -532,7 +532,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64i32(const MSVCRT_wchar_t * fspec, stru * * Unicode version of _findfirsti64. */ -MSVCRT_intptr_t CDECL MSVCRT__wfindfirsti64(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddatai64_t* ft) +MSVCRT_intptr_t CDECL MSVCRT__wfindfirsti64(const wchar_t * fspec, struct MSVCRT__wfinddatai64_t* ft) { WIN32_FIND_DATAW find_data; HANDLE hfind; @@ -786,9 +786,9 @@ char* CDECL MSVCRT__getcwd(char * buf, int size) * * Unicode version of _getcwd. */ -MSVCRT_wchar_t* CDECL MSVCRT__wgetcwd(MSVCRT_wchar_t * buf, int size) +wchar_t* CDECL MSVCRT__wgetcwd(wchar_t * buf, int size) { - MSVCRT_wchar_t dir[MAX_PATH]; + wchar_t dir[MAX_PATH]; int dir_len = GetCurrentDirectoryW(MAX_PATH,dir); if (dir_len < 1) @@ -886,9 +886,9 @@ char* CDECL MSVCRT__getdcwd(int drive, char * buf, int size) * * Unicode version of _wgetdcwd. */ -MSVCRT_wchar_t* CDECL MSVCRT__wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size) +wchar_t* CDECL MSVCRT__wgetdcwd(int drive, wchar_t * buf, int size) { - static MSVCRT_wchar_t* dummy; + static wchar_t* dummy; TRACE(":drive %d(%c), size %d\n",drive, drive + 'A' - 1, size); @@ -896,8 +896,8 @@ MSVCRT_wchar_t* CDECL MSVCRT__wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size return MSVCRT__wgetcwd(buf,size); /* current */ else { - MSVCRT_wchar_t dir[MAX_PATH]; - MSVCRT_wchar_t drivespec[4] = {'A', ':', '\\', 0}; + wchar_t dir[MAX_PATH]; + wchar_t drivespec[4] = {'A', ':', '\\', 0}; int dir_len; drivespec[0] += drive - 1; @@ -990,7 +990,7 @@ int CDECL MSVCRT__mkdir(const char * newdir) * * Unicode version of _mkdir. */ -int CDECL MSVCRT__wmkdir(const MSVCRT_wchar_t* newdir) +int CDECL MSVCRT__wmkdir(const wchar_t* newdir) { if (CreateDirectoryW(newdir,NULL)) return 0; @@ -1026,7 +1026,7 @@ int CDECL MSVCRT__rmdir(const char * dir) * * Unicode version of _rmdir. */ -int CDECL MSVCRT__wrmdir(const MSVCRT_wchar_t * dir) +int CDECL MSVCRT__wrmdir(const wchar_t * dir) { if (RemoveDirectoryW(dir)) return 0; @@ -1137,13 +1137,13 @@ void CDECL MSVCRT__splitpath(const char *inpath, char *drv, char *dir, * * Secure version of _wsplitpath */ -int CDECL MSVCRT__wsplitpath_s(const MSVCRT_wchar_t* inpath, - MSVCRT_wchar_t* drive, MSVCRT_size_t sz_drive, - MSVCRT_wchar_t* dir, MSVCRT_size_t sz_dir, - MSVCRT_wchar_t* fname, MSVCRT_size_t sz_fname, - MSVCRT_wchar_t* ext, MSVCRT_size_t sz_ext) +int CDECL MSVCRT__wsplitpath_s(const wchar_t* inpath, + wchar_t* drive, MSVCRT_size_t sz_drive, + wchar_t* dir, MSVCRT_size_t sz_dir, + wchar_t* fname, MSVCRT_size_t sz_fname, + wchar_t* ext, MSVCRT_size_t sz_ext) { - const MSVCRT_wchar_t *p, *end; + const wchar_t *p, *end; if (!inpath || (!drive && sz_drive) || (drive && !sz_drive) || @@ -1180,7 +1180,7 @@ int CDECL MSVCRT__wsplitpath_s(const MSVCRT_wchar_t* inpath, if (dir) { if (sz_dir <= end - inpath) goto do_error; - memcpy( dir, inpath, (end - inpath) * sizeof(MSVCRT_wchar_t) ); + memcpy( dir, inpath, (end - inpath) * sizeof(wchar_t) ); dir[end - inpath] = 0; } inpath = end; @@ -1196,7 +1196,7 @@ int CDECL MSVCRT__wsplitpath_s(const MSVCRT_wchar_t* inpath, if (fname) { if (sz_fname <= end - inpath) goto do_error; - memcpy( fname, inpath, (end - inpath) * sizeof(MSVCRT_wchar_t) ); + memcpy( fname, inpath, (end - inpath) * sizeof(wchar_t) ); fname[end - inpath] = 0; } if (ext) @@ -1219,8 +1219,8 @@ do_error: * * Unicode version of _splitpath. */ -void CDECL MSVCRT__wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir, - MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext) +void CDECL MSVCRT__wsplitpath(const wchar_t *inpath, wchar_t *drv, wchar_t *dir, + wchar_t *fname, wchar_t *ext) { MSVCRT__wsplitpath_s(inpath, drv, drv?MSVCRT__MAX_DRIVE:0, dir, dir?MSVCRT__MAX_DIR:0, fname, fname?MSVCRT__MAX_FNAME:0, ext, ext?MSVCRT__MAX_EXT:0); @@ -1231,7 +1231,7 @@ void CDECL MSVCRT__wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, * * Unicode version of _fullpath. */ -MSVCRT_wchar_t * CDECL MSVCRT__wfullpath(MSVCRT_wchar_t * absPath, const MSVCRT_wchar_t* relPath, MSVCRT_size_t size) +wchar_t * CDECL MSVCRT__wfullpath(wchar_t * absPath, const wchar_t* relPath, MSVCRT_size_t size) { DWORD rc; WCHAR* buffer; @@ -1387,10 +1387,10 @@ VOID CDECL MSVCRT__makepath(char * path, const char * drive, * * Unicode version of _wmakepath. */ -VOID CDECL MSVCRT__wmakepath(MSVCRT_wchar_t *path, const MSVCRT_wchar_t *drive, const MSVCRT_wchar_t *directory, - const MSVCRT_wchar_t *filename, const MSVCRT_wchar_t *extension) +VOID CDECL MSVCRT__wmakepath(wchar_t *path, const wchar_t *drive, const wchar_t *directory, + const wchar_t *filename, const wchar_t *extension) { - MSVCRT_wchar_t *p = path; + wchar_t *p = path; TRACE("%s %s %s %s\n", debugstr_w(drive), debugstr_w(directory), debugstr_w(filename), debugstr_w(extension)); @@ -1406,7 +1406,7 @@ VOID CDECL MSVCRT__wmakepath(MSVCRT_wchar_t *path, const MSVCRT_wchar_t *drive, if (directory && directory[0]) { unsigned int len = MSVCRT_wcslen(directory); - memmove(p, directory, len * sizeof(MSVCRT_wchar_t)); + memmove(p, directory, len * sizeof(wchar_t)); p += len; if (p[-1] != '/' && p[-1] != '\\') *p++ = '\\'; @@ -1414,7 +1414,7 @@ VOID CDECL MSVCRT__wmakepath(MSVCRT_wchar_t *path, const MSVCRT_wchar_t *drive, if (filename && filename[0]) { unsigned int len = MSVCRT_wcslen(filename); - memmove(p, filename, len * sizeof(MSVCRT_wchar_t)); + memmove(p, filename, len * sizeof(wchar_t)); p += len; } if (extension && extension[0]) @@ -1538,11 +1538,11 @@ range: * * Safe version of _wmakepath. */ -int CDECL MSVCRT__wmakepath_s(MSVCRT_wchar_t *path, MSVCRT_size_t size, const MSVCRT_wchar_t *drive, - const MSVCRT_wchar_t *directory, const MSVCRT_wchar_t *filename, - const MSVCRT_wchar_t *extension) +int CDECL MSVCRT__wmakepath_s(wchar_t *path, MSVCRT_size_t size, const wchar_t *drive, + const wchar_t *directory, const wchar_t *filename, + const wchar_t *extension) { - MSVCRT_wchar_t *p = path; + wchar_t *p = path; if (!path || !size) { @@ -1569,7 +1569,7 @@ int CDECL MSVCRT__wmakepath_s(MSVCRT_wchar_t *path, MSVCRT_size_t size, const MS if (size < 2) goto range; - memmove(p, directory, copylen * sizeof(MSVCRT_wchar_t)); + memmove(p, directory, copylen * sizeof(wchar_t)); if (size <= len) goto range; @@ -1595,7 +1595,7 @@ int CDECL MSVCRT__wmakepath_s(MSVCRT_wchar_t *path, MSVCRT_size_t size, const MS if (size < 2) goto range; - memmove(p, filename, copylen * sizeof(MSVCRT_wchar_t)); + memmove(p, filename, copylen * sizeof(wchar_t)); if (size <= len) goto range; @@ -1620,7 +1620,7 @@ int CDECL MSVCRT__wmakepath_s(MSVCRT_wchar_t *path, MSVCRT_size_t size, const MS } copylen = min(size - 1, len); - memcpy(p, extension, copylen * sizeof(MSVCRT_wchar_t)); + memcpy(p, extension, copylen * sizeof(wchar_t)); if (size <= len) goto range; @@ -1733,11 +1733,11 @@ void CDECL MSVCRT__searchenv(const char* file, const char* env, char *buf) /********************************************************************* * _wsearchenv_s (MSVCRT.@) */ -int CDECL MSVCRT__wsearchenv_s(const MSVCRT_wchar_t* file, const MSVCRT_wchar_t* env, - MSVCRT_wchar_t *buf, MSVCRT_size_t count) +int CDECL MSVCRT__wsearchenv_s(const wchar_t* file, const wchar_t* env, + wchar_t *buf, MSVCRT_size_t count) { - MSVCRT_wchar_t *envVal, *penv, *end; - MSVCRT_wchar_t path[MAX_PATH]; + wchar_t *envVal, *penv, *end; + wchar_t path[MAX_PATH]; MSVCRT_size_t path_len, fname_len; if (!MSVCRT_CHECK_PMT(file != NULL)) return MSVCRT_EINVAL; @@ -1798,7 +1798,7 @@ int CDECL MSVCRT__wsearchenv_s(const MSVCRT_wchar_t* file, const MSVCRT_wchar_t* if (path_len + fname_len >= MAX_PATH) continue; - memcpy(path + path_len, file, (fname_len + 1) * sizeof(MSVCRT_wchar_t)); + memcpy(path + path_len, file, (fname_len + 1) * sizeof(wchar_t)); TRACE("Checking for file %s\n", debugstr_w(path)); if (GetFileAttributesW( path ) != INVALID_FILE_ATTRIBUTES) { @@ -1807,7 +1807,7 @@ int CDECL MSVCRT__wsearchenv_s(const MSVCRT_wchar_t* file, const MSVCRT_wchar_t* MSVCRT_INVALID_PMT("buf[count] is too small", MSVCRT_ERANGE); return MSVCRT_ERANGE; } - memcpy(buf, path, (path_len + fname_len + 1) * sizeof(MSVCRT_wchar_t)); + memcpy(buf, path, (path_len + fname_len + 1) * sizeof(wchar_t)); return 0; } } @@ -1819,7 +1819,7 @@ int CDECL MSVCRT__wsearchenv_s(const MSVCRT_wchar_t* file, const MSVCRT_wchar_t* /********************************************************************* * _wsearchenv (MSVCRT.@) */ -void CDECL MSVCRT__wsearchenv(const MSVCRT_wchar_t* file, const MSVCRT_wchar_t* env, MSVCRT_wchar_t *buf) +void CDECL MSVCRT__wsearchenv(const wchar_t* file, const wchar_t* env, wchar_t *buf) { MSVCRT__wsearchenv_s(file, env, buf, MAX_PATH); } diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index 222b8076b67..f304c33aced 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -49,9 +49,9 @@ char * CDECL MSVCRT_getenv(const char *name) /********************************************************************* * _wgetenv (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT__wgetenv(const MSVCRT_wchar_t *name) +wchar_t * CDECL MSVCRT__wgetenv(const wchar_t *name) { - MSVCRT_wchar_t **environ; + wchar_t **environ; unsigned int length=MSVCRT_wcslen(name); /* Initialize the _wenviron array if it's not already created. */ @@ -60,8 +60,8 @@ MSVCRT_wchar_t * CDECL MSVCRT__wgetenv(const MSVCRT_wchar_t *name) for (environ = MSVCRT__wenviron; *environ; environ++) { - MSVCRT_wchar_t *str = *environ; - MSVCRT_wchar_t *pos = MSVCRT_wcschr(str,'='); + wchar_t *str = *environ; + wchar_t *pos = MSVCRT_wcschr(str,'='); if (pos && ((pos - str) == length) && !MSVCRT__wcsnicmp(str,name,length)) { TRACE("(%s): got %s\n", debugstr_w(name), debugstr_w(pos + 1)); @@ -120,17 +120,17 @@ finish: /********************************************************************* * _wputenv (MSVCRT.@) */ -int CDECL _wputenv(const MSVCRT_wchar_t *str) +int CDECL _wputenv(const wchar_t *str) { - MSVCRT_wchar_t *name, *value; - MSVCRT_wchar_t *dst; + wchar_t *name, *value; + wchar_t *dst; int ret; TRACE("%s\n", debugstr_w(str)); if (!str) return -1; - name = HeapAlloc(GetProcessHeap(), 0, (MSVCRT_wcslen(str) + 1) * sizeof(MSVCRT_wchar_t)); + name = HeapAlloc(GetProcessHeap(), 0, (MSVCRT_wcslen(str) + 1) * sizeof(wchar_t)); if (!name) return -1; dst = name; @@ -186,7 +186,7 @@ int CDECL _putenv_s(const char *name, const char *value) /********************************************************************* * _wputenv_s (MSVCRT.@) */ -int CDECL _wputenv_s(const MSVCRT_wchar_t *name, const MSVCRT_wchar_t *value) +int CDECL _wputenv_s(const wchar_t *name, const wchar_t *value) { int ret; @@ -235,10 +235,10 @@ int CDECL _dupenv_s(char **buffer, MSVCRT_size_t *numberOfElements, const char * /****************************************************************** * _wdupenv_s (MSVCR80.@) */ -int CDECL _wdupenv_s(MSVCRT_wchar_t **buffer, MSVCRT_size_t *numberOfElements, - const MSVCRT_wchar_t *varname) +int CDECL _wdupenv_s(wchar_t **buffer, MSVCRT_size_t *numberOfElements, + const wchar_t *varname) { - MSVCRT_wchar_t* e; + wchar_t* e; MSVCRT_size_t sz; if (!MSVCRT_CHECK_PMT(buffer != NULL)) return MSVCRT_EINVAL; @@ -247,7 +247,7 @@ int CDECL _wdupenv_s(MSVCRT_wchar_t **buffer, MSVCRT_size_t *numberOfElements, if (!(e = MSVCRT__wgetenv(varname))) return *MSVCRT__errno() = MSVCRT_EINVAL; sz = MSVCRT_wcslen(e) + 1; - if (!(*buffer = MSVCRT_malloc(sz * sizeof(MSVCRT_wchar_t)))) + if (!(*buffer = MSVCRT_malloc(sz * sizeof(wchar_t)))) { if (numberOfElements) *numberOfElements = 0; return *MSVCRT__errno() = MSVCRT_ENOMEM; @@ -287,10 +287,10 @@ int CDECL getenv_s(MSVCRT_size_t *pReturnValue, char* buffer, MSVCRT_size_t numb /****************************************************************** * _wgetenv_s (MSVCRT.@) */ -int CDECL _wgetenv_s(MSVCRT_size_t *pReturnValue, MSVCRT_wchar_t *buffer, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t *varname) +int CDECL _wgetenv_s(MSVCRT_size_t *pReturnValue, wchar_t *buffer, MSVCRT_size_t numberOfElements, + const wchar_t *varname) { - MSVCRT_wchar_t* e; + wchar_t* e; if (!MSVCRT_CHECK_PMT(pReturnValue != NULL)) return MSVCRT_EINVAL; if (!MSVCRT_CHECK_PMT(!(buffer == NULL && numberOfElements > 0))) return MSVCRT_EINVAL; @@ -321,7 +321,7 @@ void CDECL MSVCRT__get_environ(char ***ptr) /********************************************************************* * _get_wenviron (MSVCRT.@) */ -void CDECL MSVCRT__get_wenviron(MSVCRT_wchar_t ***ptr) +void CDECL MSVCRT__get_wenviron(wchar_t ***ptr) { *ptr = MSVCRT__wenviron; } diff --git a/dlls/msvcrt/errno.c b/dlls/msvcrt/errno.c index 562cdfcf85a..07d9a83053e 100644 --- a/dlls/msvcrt/errno.c +++ b/dlls/msvcrt/errno.c @@ -350,7 +350,7 @@ void CDECL MSVCRT_perror(const char* str) /********************************************************************* * _wperror (MSVCRT.@) */ -void CDECL MSVCRT__wperror(const MSVCRT_wchar_t* str) +void CDECL MSVCRT__wperror(const wchar_t* str) { MSVCRT_size_t size; char *buffer = NULL; @@ -375,7 +375,7 @@ void CDECL MSVCRT__wperror(const MSVCRT_wchar_t* str) /********************************************************************* * _wcserror_s (MSVCRT.@) */ -int CDECL MSVCRT__wcserror_s(MSVCRT_wchar_t* buffer, MSVCRT_size_t nc, int err) +int CDECL MSVCRT__wcserror_s(wchar_t* buffer, MSVCRT_size_t nc, int err) { if (!MSVCRT_CHECK_PMT(buffer != NULL)) return MSVCRT_EINVAL; if (!MSVCRT_CHECK_PMT(nc > 0)) return MSVCRT_EINVAL; @@ -388,12 +388,12 @@ int CDECL MSVCRT__wcserror_s(MSVCRT_wchar_t* buffer, MSVCRT_size_t nc, int err) /********************************************************************* * _wcserror (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcserror(int err) +wchar_t* CDECL MSVCRT__wcserror(int err) { thread_data_t *data = msvcrt_get_thread_data(); if (!data->wcserror_buffer) - if (!(data->wcserror_buffer = MSVCRT_malloc(256 * sizeof(MSVCRT_wchar_t)))) return NULL; + if (!(data->wcserror_buffer = MSVCRT_malloc(256 * sizeof(wchar_t)))) return NULL; MSVCRT__wcserror_s(data->wcserror_buffer, 256, err); return data->wcserror_buffer; } @@ -401,7 +401,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcserror(int err) /********************************************************************** * __wcserror_s (MSVCRT.@) */ -int CDECL MSVCRT___wcserror_s(MSVCRT_wchar_t* buffer, MSVCRT_size_t nc, const MSVCRT_wchar_t* str) +int CDECL MSVCRT___wcserror_s(wchar_t* buffer, MSVCRT_size_t nc, const wchar_t* str) { int err; static const WCHAR colonW[] = {':', ' ', '\0'}; @@ -434,13 +434,13 @@ int CDECL MSVCRT___wcserror_s(MSVCRT_wchar_t* buffer, MSVCRT_size_t nc, const MS /********************************************************************** * __wcserror (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT___wcserror(const MSVCRT_wchar_t* str) +wchar_t* CDECL MSVCRT___wcserror(const wchar_t* str) { thread_data_t *data = msvcrt_get_thread_data(); int err; if (!data->wcserror_buffer) - if (!(data->wcserror_buffer = MSVCRT_malloc(256 * sizeof(MSVCRT_wchar_t)))) return NULL; + if (!(data->wcserror_buffer = MSVCRT_malloc(256 * sizeof(wchar_t)))) return NULL; err = MSVCRT___wcserror_s(data->wcserror_buffer, 256, str); if (err) FIXME("bad wcserror call (%d)\n", err); @@ -459,8 +459,8 @@ void CDECL _seterrormode(int mode) /****************************************************************************** * _invalid_parameter (MSVCRT.@) */ -void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_wchar_t *func, - const MSVCRT_wchar_t *file, unsigned int line, uintptr_t arg) +void __cdecl MSVCRT__invalid_parameter(const wchar_t *expr, const wchar_t *func, + const wchar_t *file, unsigned int line, uintptr_t arg) { #if _MSVCR_VER >= 140 thread_data_t *data = msvcrt_get_thread_data(); diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index 2a75f336b39..b94110614ec 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -46,7 +46,7 @@ static CRITICAL_SECTION_DEBUG MSVCRT_onexit_cs_debug = static CRITICAL_SECTION MSVCRT_onexit_cs = { &MSVCRT_onexit_cs_debug, -1, 0, 0, 0, 0 }; extern int MSVCRT_app_type; -extern MSVCRT_wchar_t *MSVCRT__wpgmptr; +extern wchar_t *MSVCRT__wpgmptr; static unsigned int MSVCRT_abort_behavior = MSVCRT__WRITE_ABORT_MSG | MSVCRT__CALL_REPORTFAULT; static int MSVCRT_error_mode = MSVCRT__OUT_TO_DEFAULT; @@ -185,9 +185,9 @@ void CDECL MSVCRT__exit(int exitcode) } /* Print out an error message with an option to debug */ -static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *message) +static void DoMessageBoxW(const wchar_t *lead, const wchar_t *message) { - static const MSVCRT_wchar_t message_format[] = {'%','l','s','\n','\n','P','r','o','g','r','a','m',':',' ','%','l','s','\n', + static const wchar_t message_format[] = {'%','l','s','\n','\n','P','r','o','g','r','a','m',':',' ','%','l','s','\n', '%','l','s','\n','\n','P','r','e','s','s',' ','O','K',' ','t','o',' ','e','x','i','t',' ','t','h','e',' ', 'p','r','o','g','r','a','m',',',' ','o','r',' ','C','a','n','c','e','l',' ','t','o',' ','s','t','a','r','t',' ', 't','h','e',' ','W','i','n','e',' ','d','e','b','u','g','g','e','r','.','\n',0}; @@ -195,7 +195,7 @@ static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *mess {'W','i','n','e',' ','C','+','+',' ','R','u','n','t','i','m','e',' ','L','i','b','r','a','r','y',0}; MSGBOXPARAMSW msgbox; - MSVCRT_wchar_t text[2048]; + wchar_t text[2048]; INT ret; MSVCRT__snwprintf(text, ARRAY_SIZE(text), message_format, lead, MSVCRT__wpgmptr, message); @@ -218,7 +218,7 @@ static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *mess static void DoMessageBox(const char *lead, const char *message) { - MSVCRT_wchar_t leadW[1024], messageW[1024]; + wchar_t leadW[1024], messageW[1024]; MSVCRT_mbstowcs(leadW, lead, 1024); MSVCRT_mbstowcs(messageW, message, 1024); @@ -287,12 +287,12 @@ unsigned int CDECL MSVCRT__set_abort_behavior(unsigned int flags, unsigned int m /********************************************************************* * _wassert (MSVCRT.@) */ -void CDECL MSVCRT__wassert(const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* file, unsigned int line) +void CDECL MSVCRT__wassert(const wchar_t* str, const wchar_t* file, unsigned int line) { - static const MSVCRT_wchar_t assertion_failed[] = {'A','s','s','e','r','t','i','o','n',' ','f','a','i','l','e','d','!',0}; - static const MSVCRT_wchar_t format_msgbox[] = {'F','i','l','e',':',' ','%','l','s','\n','L','i','n','e',':',' ','%','d', + static const wchar_t assertion_failed[] = {'A','s','s','e','r','t','i','o','n',' ','f','a','i','l','e','d','!',0}; + static const wchar_t format_msgbox[] = {'F','i','l','e',':',' ','%','l','s','\n','L','i','n','e',':',' ','%','d', '\n','\n','E','x','p','r','e','s','s','i','o','n',':',' ','\"','%','l','s','\"',0}; - static const MSVCRT_wchar_t format_console[] = {'A','s','s','e','r','t','i','o','n',' ','f','a','i','l','e','d',':',' ', + static const wchar_t format_console[] = {'A','s','s','e','r','t','i','o','n',' ','f','a','i','l','e','d',':',' ', '%','l','s',',',' ','f','i','l','e',' ','%','l','s',',',' ','l','i','n','e',' ','%','d','\n','\n',0}; TRACE("(%s,%s,%d)\n", debugstr_w(str), debugstr_w(file), line); @@ -300,7 +300,7 @@ void CDECL MSVCRT__wassert(const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* file if ((MSVCRT_error_mode == MSVCRT__OUT_TO_MSGBOX) || ((MSVCRT_error_mode == MSVCRT__OUT_TO_DEFAULT) && (MSVCRT_app_type == 2))) { - MSVCRT_wchar_t text[2048]; + wchar_t text[2048]; MSVCRT__snwprintf(text, sizeof(text), format_msgbox, file, line, str); DoMessageBoxW(assertion_failed, text); } @@ -316,7 +316,7 @@ void CDECL MSVCRT__wassert(const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* file */ void CDECL _assert(const char* str, const char* file, unsigned int line) { - MSVCRT_wchar_t strW[1024], fileW[1024]; + wchar_t strW[1024], fileW[1024]; MSVCRT_mbstowcs(strW, str, 1024); MSVCRT_mbstowcs(fileW, file, 1024); diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index ac75b181807..91615aa7928 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -752,9 +752,9 @@ static int msvcrt_int_to_base32(int num, char *str) } /* INTERNAL: wide character version of msvcrt_int_to_base32 */ -static int msvcrt_int_to_base32_w(int num, MSVCRT_wchar_t *str) +static int msvcrt_int_to_base32_w(int num, wchar_t *str) { - MSVCRT_wchar_t *p; + wchar_t *p; int n = num; int digits = 0; @@ -833,7 +833,7 @@ int CDECL MSVCRT__access_s(const char *filename, int mode) /********************************************************************* * _waccess (MSVCRT.@) */ -int CDECL MSVCRT__waccess(const MSVCRT_wchar_t *filename, int mode) +int CDECL MSVCRT__waccess(const wchar_t *filename, int mode) { DWORD attr = GetFileAttributesW(filename); @@ -855,7 +855,7 @@ int CDECL MSVCRT__waccess(const MSVCRT_wchar_t *filename, int mode) /********************************************************************* * _waccess_s (MSVCRT.@) */ -int CDECL MSVCRT__waccess_s(const MSVCRT_wchar_t *filename, int mode) +int CDECL MSVCRT__waccess_s(const wchar_t *filename, int mode) { if (!MSVCRT_CHECK_PMT(filename != NULL)) return *MSVCRT__errno(); if (!MSVCRT_CHECK_PMT((mode & ~(MSVCRT_R_OK | MSVCRT_W_OK)) == 0)) return *MSVCRT__errno(); @@ -887,7 +887,7 @@ int CDECL MSVCRT__chmod(const char *path, int flags) /********************************************************************* * _wchmod (MSVCRT.@) */ -int CDECL MSVCRT__wchmod(const MSVCRT_wchar_t *path, int flags) +int CDECL MSVCRT__wchmod(const wchar_t *path, int flags) { DWORD oldFlags = GetFileAttributesW(path); @@ -919,7 +919,7 @@ int CDECL MSVCRT__unlink(const char *path) /********************************************************************* * _wunlink (MSVCRT.@) */ -int CDECL MSVCRT__wunlink(const MSVCRT_wchar_t *path) +int CDECL MSVCRT__wunlink(const wchar_t *path) { TRACE("(%s)\n",debugstr_w(path)); if(DeleteFileW(path)) @@ -1528,7 +1528,7 @@ void CDECL MSVCRT_rewind(MSVCRT_FILE* file) MSVCRT__unlock_file(file); } -static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* stream_flags) +static int msvcrt_get_flags(const wchar_t* mode, int *open_flags, int* stream_flags) { int plus = MSVCRT_wcschr(mode, '+') != NULL; @@ -1650,7 +1650,7 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st MSVCRT_FILE* CDECL MSVCRT__fdopen(int fd, const char *mode) { MSVCRT_FILE *ret; - MSVCRT_wchar_t *modeW = NULL; + wchar_t *modeW = NULL; if (mode && !(modeW = msvcrt_wstrdupa(mode))) return NULL; @@ -1663,7 +1663,7 @@ MSVCRT_FILE* CDECL MSVCRT__fdopen(int fd, const char *mode) /********************************************************************* * _wfdopen (MSVCRT.@) */ -MSVCRT_FILE* CDECL MSVCRT__wfdopen(int fd, const MSVCRT_wchar_t *mode) +MSVCRT_FILE* CDECL MSVCRT__wfdopen(int fd, const wchar_t *mode) { int open_flags, stream_flags; MSVCRT_FILE* file; @@ -2016,7 +2016,7 @@ char * CDECL MSVCRT__mktemp(char *pattern) /********************************************************************* * _wmktemp_s (MSVCRT.@) */ -int CDECL MSVCRT__wmktemp_s(MSVCRT_wchar_t *pattern, MSVCRT_size_t size) +int CDECL MSVCRT__wmktemp_s(wchar_t *pattern, MSVCRT_size_t size) { DWORD len, xno, id; @@ -2055,12 +2055,12 @@ int CDECL MSVCRT__wmktemp_s(MSVCRT_wchar_t *pattern, MSVCRT_size_t size) /********************************************************************* * _wmktemp (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT__wmktemp(MSVCRT_wchar_t *pattern) +wchar_t * CDECL MSVCRT__wmktemp(wchar_t *pattern) { int numX = 0; - MSVCRT_wchar_t *retVal = pattern; + wchar_t *retVal = pattern; int id; - MSVCRT_wchar_t letter = 'a'; + wchar_t letter = 'a'; if(!pattern) return NULL; @@ -2193,7 +2193,7 @@ static int check_bom(HANDLE h, int oflags, BOOL seek) /********************************************************************* * _wsopen_dispatch (UCRTBASE.@) */ -int CDECL MSVCRT__wsopen_dispatch( const MSVCRT_wchar_t* path, int oflags, int shflags, int pmode, +int CDECL MSVCRT__wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pmode, int *fd, int secure ) { DWORD access = 0, creation = 0, attrib; @@ -2361,7 +2361,7 @@ int CDECL MSVCRT__wsopen_dispatch( const MSVCRT_wchar_t* path, int oflags, int s /********************************************************************* * _wsopen_s (MSVCRT.@) */ -int CDECL MSVCRT__wsopen_s( int *fd, const MSVCRT_wchar_t* path, int oflags, int shflags, int pmode ) +int CDECL MSVCRT__wsopen_s( int *fd, const wchar_t* path, int oflags, int shflags, int pmode ) { return MSVCRT__wsopen_dispatch( path, oflags, shflags, pmode, fd, 1 ); } @@ -2369,7 +2369,7 @@ int CDECL MSVCRT__wsopen_s( int *fd, const MSVCRT_wchar_t* path, int oflags, int /********************************************************************* * _wsopen (MSVCRT.@) */ -int WINAPIV MSVCRT__wsopen( const MSVCRT_wchar_t *path, int oflags, int shflags, ... ) +int WINAPIV MSVCRT__wsopen( const wchar_t *path, int oflags, int shflags, ... ) { int pmode; int fd; @@ -2395,7 +2395,7 @@ int WINAPIV MSVCRT__wsopen( const MSVCRT_wchar_t *path, int oflags, int shflags, int CDECL MSVCRT__sopen_dispatch( const char *path, int oflags, int shflags, int pmode, int *fd, int secure) { - MSVCRT_wchar_t *pathW; + wchar_t *pathW; int ret; if (!MSVCRT_CHECK_PMT(fd != NULL)) @@ -2461,7 +2461,7 @@ int WINAPIV MSVCRT__open( const char *path, int flags, ... ) /********************************************************************* * _wopen (MSVCRT.@) */ -int WINAPIV MSVCRT__wopen(const MSVCRT_wchar_t *path,int flags,...) +int WINAPIV MSVCRT__wopen(const wchar_t *path,int flags,...) { __ms_va_list ap; @@ -2489,7 +2489,7 @@ int CDECL MSVCRT__creat(const char *path, int pmode) /********************************************************************* * _wcreat (MSVCRT.@) */ -int CDECL MSVCRT__wcreat(const MSVCRT_wchar_t *path, int pmode) +int CDECL MSVCRT__wcreat(const wchar_t *path, int pmode) { int flags = MSVCRT__O_CREAT | MSVCRT__O_TRUNC | MSVCRT__O_RDWR; return MSVCRT__wopen(path, flags, pmode); @@ -2571,7 +2571,7 @@ static inline int get_utf8_char_len(char ch) /********************************************************************* * (internal) read_utf8 */ -static int read_utf8(ioinfo *fdinfo, MSVCRT_wchar_t *buf, unsigned int count) +static int read_utf8(ioinfo *fdinfo, wchar_t *buf, unsigned int count) { HANDLE hand = fdinfo->handle; char min_buf[4], *readbuf, lookahead; @@ -3124,7 +3124,7 @@ int CDECL MSVCRT__stat64i32(const char* path, struct MSVCRT__stat64i32 *buf) /********************************************************************* * _wstat64 (MSVCRT.@) */ -int CDECL MSVCRT__wstat64(const MSVCRT_wchar_t* path, struct MSVCRT__stat64 * buf) +int CDECL MSVCRT__wstat64(const wchar_t* path, struct MSVCRT__stat64 * buf) { DWORD dw; WIN32_FILE_ATTRIBUTE_DATA hfi; @@ -3201,7 +3201,7 @@ int CDECL MSVCRT__wstat64(const MSVCRT_wchar_t* path, struct MSVCRT__stat64 * bu /********************************************************************* * _wstati64 (MSVCRT.@) */ -int CDECL MSVCRT__wstati64(const MSVCRT_wchar_t* path, struct MSVCRT__stati64 * buf) +int CDECL MSVCRT__wstati64(const wchar_t* path, struct MSVCRT__stati64 * buf) { int ret; struct MSVCRT__stat64 buf64; @@ -3215,7 +3215,7 @@ int CDECL MSVCRT__wstati64(const MSVCRT_wchar_t* path, struct MSVCRT__stati64 * /********************************************************************* * _wstat (MSVCRT.@) */ -int CDECL MSVCRT__wstat(const MSVCRT_wchar_t* path, struct MSVCRT__stat * buf) +int CDECL MSVCRT__wstat(const wchar_t* path, struct MSVCRT__stat * buf) { int ret; struct MSVCRT__stat64 buf64; @@ -3230,7 +3230,7 @@ int CDECL MSVCRT__wstat(const MSVCRT_wchar_t* path, struct MSVCRT__stat * buf) /********************************************************************* * _wstat32 (MSVCR80.@) */ -int CDECL MSVCRT__wstat32(const MSVCRT_wchar_t *path, struct MSVCRT__stat32 *buf) +int CDECL MSVCRT__wstat32(const wchar_t *path, struct MSVCRT__stat32 *buf) { int ret; struct MSVCRT__stat64 buf64; @@ -3244,7 +3244,7 @@ int CDECL MSVCRT__wstat32(const MSVCRT_wchar_t *path, struct MSVCRT__stat32 *buf /********************************************************************* * _wstat32i64 (MSVCR80.@) */ -int CDECL MSVCRT__wstat32i64(const MSVCRT_wchar_t *path, struct MSVCRT__stat32i64 *buf) +int CDECL MSVCRT__wstat32i64(const wchar_t *path, struct MSVCRT__stat32i64 *buf) { int ret; struct MSVCRT__stat64 buf64; @@ -3258,7 +3258,7 @@ int CDECL MSVCRT__wstat32i64(const MSVCRT_wchar_t *path, struct MSVCRT__stat32i6 /********************************************************************* * _wstat64i32 (MSVCR80.@) */ -int CDECL MSVCRT__wstat64i32(const MSVCRT_wchar_t *path, struct MSVCRT__stat64i32 *buf) +int CDECL MSVCRT__wstat64i32(const wchar_t *path, struct MSVCRT__stat64i32 *buf) { int ret; struct MSVCRT__stat64 buf64; @@ -3311,11 +3311,11 @@ char * CDECL MSVCRT__tempnam(const char *dir, const char *prefix) /********************************************************************* * _wtempnam (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT__wtempnam(const MSVCRT_wchar_t *dir, const MSVCRT_wchar_t *prefix) +wchar_t * CDECL MSVCRT__wtempnam(const wchar_t *dir, const wchar_t *prefix) { - static const MSVCRT_wchar_t tmpW[] = {'T','M','P',0}; - MSVCRT_wchar_t tmpbuf[MAX_PATH]; - const MSVCRT_wchar_t *tmp_dir = MSVCRT__wgetenv(tmpW); + static const wchar_t tmpW[] = {'T','M','P',0}; + wchar_t tmpbuf[MAX_PATH]; + const wchar_t *tmp_dir = MSVCRT__wgetenv(tmpW); if (tmp_dir) dir = tmp_dir; @@ -3391,7 +3391,7 @@ int CDECL _utime(const char* path, struct MSVCRT___utimbuf32 *t) /********************************************************************* * _wutime64 (MSVCRT.@) */ -int CDECL _wutime64(const MSVCRT_wchar_t* path, struct MSVCRT___utimbuf64 *t) +int CDECL _wutime64(const wchar_t* path, struct MSVCRT___utimbuf64 *t) { int fd = MSVCRT__wopen(path, MSVCRT__O_WRONLY | MSVCRT__O_BINARY); @@ -3407,7 +3407,7 @@ int CDECL _wutime64(const MSVCRT_wchar_t* path, struct MSVCRT___utimbuf64 *t) /********************************************************************* * _wutime32 (MSVCRT.@) */ -int CDECL _wutime32(const MSVCRT_wchar_t* path, struct MSVCRT___utimbuf32 *t) +int CDECL _wutime32(const wchar_t* path, struct MSVCRT___utimbuf32 *t) { if (t) { @@ -3424,12 +3424,12 @@ int CDECL _wutime32(const MSVCRT_wchar_t* path, struct MSVCRT___utimbuf32 *t) * _wutime (MSVCRT.@) */ #ifdef _WIN64 -int CDECL _wutime(const MSVCRT_wchar_t* path, struct MSVCRT___utimbuf64 *t) +int CDECL _wutime(const wchar_t* path, struct MSVCRT___utimbuf64 *t) { return _wutime64( path, t ); } #else -int CDECL _wutime(const MSVCRT_wchar_t* path, struct MSVCRT___utimbuf32 *t) +int CDECL _wutime(const wchar_t* path, struct MSVCRT___utimbuf32 *t) { return _wutime32( path, t ); } @@ -3912,10 +3912,10 @@ MSVCRT_wint_t CDECL MSVCRT_getwchar(void) /********************************************************************* * fgetws (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT_fgetws(MSVCRT_wchar_t *s, int size, MSVCRT_FILE* file) +wchar_t * CDECL MSVCRT_fgetws(wchar_t *s, int size, MSVCRT_FILE* file) { MSVCRT_wint_t cc = MSVCRT_WEOF; - MSVCRT_wchar_t * buf_start = s; + wchar_t * buf_start = s; TRACE(":file(%p) fd (%d) str (%p) len (%d)\n", file,file->_file,s,size); @@ -4088,7 +4088,7 @@ MSVCRT_wint_t CDECL MSVCRT_fputwc(MSVCRT_wint_t wc, MSVCRT_FILE* file) */ MSVCRT_wint_t CDECL MSVCRT__fputwc_nolock(MSVCRT_wint_t wc, MSVCRT_FILE* file) { - MSVCRT_wchar_t mwc=wc; + wchar_t mwc=wc; ioinfo *fdinfo; MSVCRT_wint_t ret; @@ -4123,7 +4123,7 @@ MSVCRT_wint_t CDECL MSVCRT__fputwchar(MSVCRT_wint_t wc) /********************************************************************* * _wfsopen (MSVCRT.@) */ -MSVCRT_FILE * CDECL MSVCRT__wfsopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, int share) +MSVCRT_FILE * CDECL MSVCRT__wfsopen(const wchar_t *path, const wchar_t *mode, int share) { MSVCRT_FILE* file; int open_flags, stream_flags, fd; @@ -4160,7 +4160,7 @@ MSVCRT_FILE * CDECL MSVCRT__wfsopen(const MSVCRT_wchar_t *path, const MSVCRT_wch MSVCRT_FILE * CDECL MSVCRT__fsopen(const char *path, const char *mode, int share) { MSVCRT_FILE *ret; - MSVCRT_wchar_t *pathW = NULL, *modeW = NULL; + wchar_t *pathW = NULL, *modeW = NULL; if (path && !(pathW = msvcrt_wstrdupa(path))) { MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0); @@ -4210,7 +4210,7 @@ int CDECL MSVCRT_fopen_s(MSVCRT_FILE** pFile, /********************************************************************* * _wfopen (MSVCRT.@) */ -MSVCRT_FILE * CDECL MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode) +MSVCRT_FILE * CDECL MSVCRT__wfopen(const wchar_t *path, const wchar_t *mode) { return MSVCRT__wfsopen( path, mode, MSVCRT__SH_DENYNO ); } @@ -4218,8 +4218,8 @@ MSVCRT_FILE * CDECL MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wcha /********************************************************************* * _wfopen_s (MSVCRT.@) */ -int CDECL MSVCRT__wfopen_s(MSVCRT_FILE** pFile, const MSVCRT_wchar_t *filename, - const MSVCRT_wchar_t *mode) +int CDECL MSVCRT__wfopen_s(MSVCRT_FILE** pFile, const wchar_t *filename, + const wchar_t *mode) { if (!MSVCRT_CHECK_PMT(pFile != NULL)) return MSVCRT_EINVAL; if (!MSVCRT_CHECK_PMT(filename != NULL)) return MSVCRT_EINVAL; @@ -4453,7 +4453,7 @@ MSVCRT_size_t CDECL MSVCRT__fread_nolock_s(void *buf, MSVCRT_size_t buf_size, MS * _wfreopen (MSVCRT.@) * */ -MSVCRT_FILE* CDECL MSVCRT__wfreopen(const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, MSVCRT_FILE* file) +MSVCRT_FILE* CDECL MSVCRT__wfreopen(const wchar_t *path, const wchar_t *mode, MSVCRT_FILE* file) { int open_flags, stream_flags, fd; @@ -4483,7 +4483,7 @@ MSVCRT_FILE* CDECL MSVCRT__wfreopen(const MSVCRT_wchar_t *path, const MSVCRT_wch * _wfreopen_s (MSVCRT.@) */ int CDECL MSVCRT__wfreopen_s(MSVCRT_FILE** pFile, - const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, MSVCRT_FILE* file) + const wchar_t *path, const wchar_t *mode, MSVCRT_FILE* file) { if (!MSVCRT_CHECK_PMT(pFile != NULL)) return MSVCRT_EINVAL; if (!MSVCRT_CHECK_PMT(path != NULL)) return MSVCRT_EINVAL; @@ -4504,7 +4504,7 @@ int CDECL MSVCRT__wfreopen_s(MSVCRT_FILE** pFile, MSVCRT_FILE* CDECL MSVCRT_freopen(const char *path, const char *mode, MSVCRT_FILE* file) { MSVCRT_FILE *ret; - MSVCRT_wchar_t *pathW = NULL, *modeW = NULL; + wchar_t *pathW = NULL, *modeW = NULL; if (path && !(pathW = msvcrt_wstrdupa(path))) return NULL; if (mode && !(modeW = msvcrt_wstrdupa(mode))) @@ -4672,7 +4672,7 @@ int CDECL MSVCRT_fputs(const char *s, MSVCRT_FILE* file) /********************************************************************* * fputws (MSVCRT.@) */ -int CDECL MSVCRT_fputws(const MSVCRT_wchar_t *s, MSVCRT_FILE* file) +int CDECL MSVCRT_fputws(const wchar_t *s, MSVCRT_FILE* file) { MSVCRT_size_t i, len = MSVCRT_wcslen(s); BOOL tmp_buf; @@ -4768,17 +4768,17 @@ char * CDECL MSVCRT_gets(char *buf) /********************************************************************* * _getws (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__getws(MSVCRT_wchar_t* buf) +wchar_t* CDECL MSVCRT__getws(wchar_t* buf) { MSVCRT_wint_t cc; - MSVCRT_wchar_t* ws = buf; + wchar_t* ws = buf; MSVCRT__lock_file(MSVCRT_stdin); for (cc = MSVCRT__fgetwc_nolock(MSVCRT_stdin); cc != MSVCRT_WEOF && cc != '\n'; cc = MSVCRT__fgetwc_nolock(MSVCRT_stdin)) { if (cc != '\r') - *buf++ = (MSVCRT_wchar_t)cc; + *buf++ = (wchar_t)cc; } MSVCRT__unlock_file(MSVCRT_stdin); @@ -4831,7 +4831,7 @@ int CDECL MSVCRT_puts(const char *s) /********************************************************************* * _putws (MSVCRT.@) */ -int CDECL MSVCRT__putws(const MSVCRT_wchar_t *s) +int CDECL MSVCRT__putws(const wchar_t *s) { int ret; @@ -4859,7 +4859,7 @@ int CDECL MSVCRT_remove(const char *path) /********************************************************************* * _wremove (MSVCRT.@) */ -int CDECL MSVCRT__wremove(const MSVCRT_wchar_t *path) +int CDECL MSVCRT__wremove(const wchar_t *path) { TRACE("(%s)\n",debugstr_w(path)); if (DeleteFileW(path)) @@ -4885,7 +4885,7 @@ int CDECL MSVCRT_rename(const char *oldpath,const char *newpath) /********************************************************************* * _wrename (MSVCRT.@) */ -int CDECL MSVCRT__wrename(const MSVCRT_wchar_t *oldpath,const MSVCRT_wchar_t *newpath) +int CDECL MSVCRT__wrename(const wchar_t *oldpath,const wchar_t *newpath) { TRACE(":from %s to %s\n",debugstr_w(oldpath),debugstr_w(newpath)); if (MoveFileExW(oldpath, newpath, MOVEFILE_COPY_ALLOWED)) @@ -5014,10 +5014,10 @@ char * CDECL MSVCRT_tmpnam(char *s) return tmpnam_helper(s, -1, &tmpnam_unique, MSVCRT_TMP_MAX) ? NULL : s; } -static int wtmpnam_helper(MSVCRT_wchar_t *s, MSVCRT_size_t size, int *tmpnam_unique, int tmp_max) +static int wtmpnam_helper(wchar_t *s, MSVCRT_size_t size, int *tmpnam_unique, int tmp_max) { - MSVCRT_wchar_t tmpstr[8]; - MSVCRT_wchar_t *p = s; + wchar_t tmpstr[8]; + wchar_t *p = s; int digits; if (!MSVCRT_CHECK_PMT(s != NULL)) return MSVCRT_EINVAL; @@ -5066,7 +5066,7 @@ static int wtmpnam_helper(MSVCRT_wchar_t *s, MSVCRT_size_t size, int *tmpnam_uni /********************************************************************* * _wtmpnam_s (MSVCRT.@) */ -int CDECL MSVCRT__wtmpnam_s(MSVCRT_wchar_t *s, MSVCRT_size_t size) +int CDECL MSVCRT__wtmpnam_s(wchar_t *s, MSVCRT_size_t size) { return wtmpnam_helper(s, size, &tmpnam_s_unique, MSVCRT_TMP_MAX_S); } @@ -5074,13 +5074,13 @@ int CDECL MSVCRT__wtmpnam_s(MSVCRT_wchar_t *s, MSVCRT_size_t size) /********************************************************************* * _wtmpnam (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT__wtmpnam(MSVCRT_wchar_t *s) +wchar_t * CDECL MSVCRT__wtmpnam(wchar_t *s) { if (!s) { thread_data_t *data = msvcrt_get_thread_data(); if(!data->wtmpnam_buffer) - data->wtmpnam_buffer = MSVCRT_malloc(sizeof(MSVCRT_wchar_t[MAX_PATH])); + data->wtmpnam_buffer = MSVCRT_malloc(sizeof(wchar_t[MAX_PATH])); s = data->wtmpnam_buffer; } @@ -5133,14 +5133,14 @@ static int puts_clbk_file_a(void *file, int len, const char *str) return MSVCRT_fwrite(str, sizeof(char), len, file); } -static int puts_clbk_file_w(void *file, int len, const MSVCRT_wchar_t *str) +static int puts_clbk_file_w(void *file, int len, const wchar_t *str) { int i, ret; MSVCRT__lock_file(file); if(!(get_ioinfo_nolock(((MSVCRT_FILE*)file)->_file)->wxflag & WX_TEXT)) { - ret = MSVCRT__fwrite_nolock(str, sizeof(MSVCRT_wchar_t), len, file); + ret = MSVCRT__fwrite_nolock(str, sizeof(wchar_t), len, file); MSVCRT__unlock_file(file); return ret; } @@ -5188,7 +5188,7 @@ static int vfprintf_helper(DWORD options, MSVCRT_FILE* file, const char *format, return ret; } -static int vfwprintf_helper(DWORD options, MSVCRT_FILE* file, const MSVCRT_wchar_t *format, +static int vfwprintf_helper(DWORD options, MSVCRT_FILE* file, const wchar_t *format, _locale_t locale, __ms_va_list valist) { printf_arg args_ctx[MSVCRT__ARGMAX+1]; @@ -5232,7 +5232,7 @@ int CDECL MSVCRT__vfprintf_s_l(MSVCRT_FILE* file, const char *format, /********************************************************************* * _vfwprintf_s_l (MSVCRT.@) */ -int CDECL MSVCRT__vfwprintf_s_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, +int CDECL MSVCRT__vfwprintf_s_l(MSVCRT_FILE* file, const wchar_t *format, _locale_t locale, __ms_va_list valist) { return vfwprintf_helper(MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, locale, valist); @@ -5257,7 +5257,7 @@ int CDECL MSVCRT_vfprintf_s(MSVCRT_FILE* file, const char *format, __ms_va_list /********************************************************************* * vfwprintf (MSVCRT.@) */ -int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const wchar_t *format, __ms_va_list valist) { return vfwprintf_helper(0, file, format, NULL, valist); } @@ -5265,7 +5265,7 @@ int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms /********************************************************************* * vfwprintf_s (MSVCRT.@) */ -int CDECL MSVCRT_vfwprintf_s(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vfwprintf_s(MSVCRT_FILE* file, const wchar_t *format, __ms_va_list valist) { return MSVCRT__vfwprintf_s_l(file, format, NULL, valist); } @@ -5300,7 +5300,7 @@ int CDECL MSVCRT__stdio_common_vfprintf_s(unsigned __int64 options, MSVCRT_FILE /********************************************************************* * __stdio_common_vfwprintf (UCRTBASE.@) */ -int CDECL MSVCRT__stdio_common_vfwprintf(unsigned __int64 options, MSVCRT_FILE *file, const MSVCRT_wchar_t *format, +int CDECL MSVCRT__stdio_common_vfwprintf(unsigned __int64 options, MSVCRT_FILE *file, const wchar_t *format, _locale_t locale, __ms_va_list valist) { if (options & ~UCRTBASE_PRINTF_MASK) @@ -5312,7 +5312,7 @@ int CDECL MSVCRT__stdio_common_vfwprintf(unsigned __int64 options, MSVCRT_FILE * /********************************************************************* * __stdio_common_vfwprintf_s (UCRTBASE.@) */ -int CDECL MSVCRT__stdio_common_vfwprintf_s(unsigned __int64 options, MSVCRT_FILE *file, const MSVCRT_wchar_t *format, +int CDECL MSVCRT__stdio_common_vfwprintf_s(unsigned __int64 options, MSVCRT_FILE *file, const wchar_t *format, _locale_t locale, __ms_va_list valist) { if (options & ~UCRTBASE_PRINTF_MASK) @@ -5336,7 +5336,7 @@ int CDECL MSVCRT__vfprintf_l(MSVCRT_FILE* file, const char *format, /********************************************************************* * _vfwprintf_l (MSVCRT.@) */ -int CDECL MSVCRT__vfwprintf_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, +int CDECL MSVCRT__vfwprintf_l(MSVCRT_FILE* file, const wchar_t *format, _locale_t locale, __ms_va_list valist) { return vfwprintf_helper(0, file, format, locale, valist); @@ -5363,7 +5363,7 @@ int CDECL MSVCRT__vfprintf_p(MSVCRT_FILE* file, const char *format, __ms_va_list /********************************************************************* * _vfwprintf_p_l (MSVCRT.@) */ -int CDECL MSVCRT__vfwprintf_p_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, +int CDECL MSVCRT__vfwprintf_p_l(MSVCRT_FILE* file, const wchar_t *format, _locale_t locale, __ms_va_list valist) { return vfwprintf_helper(MSVCRT_PRINTF_POSITIONAL_PARAMS | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, @@ -5373,7 +5373,7 @@ int CDECL MSVCRT__vfwprintf_p_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, /********************************************************************* * _vfwprintf_p (MSVCRT.@) */ -int CDECL MSVCRT__vfwprintf_p(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT__vfwprintf_p(MSVCRT_FILE* file, const wchar_t *format, __ms_va_list valist) { return MSVCRT__vfwprintf_p_l(file, format, NULL, valist); } @@ -5397,7 +5397,7 @@ int CDECL MSVCRT_vprintf_s(const char *format, __ms_va_list valist) /********************************************************************* * vwprintf (MSVCRT.@) */ -int CDECL MSVCRT_vwprintf(const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vwprintf(const wchar_t *format, __ms_va_list valist) { return MSVCRT_vfwprintf(MSVCRT_stdout,format,valist); } @@ -5405,7 +5405,7 @@ int CDECL MSVCRT_vwprintf(const MSVCRT_wchar_t *format, __ms_va_list valist) /********************************************************************* * vwprintf_s (MSVCRT.@) */ -int CDECL MSVCRT_vwprintf_s(const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vwprintf_s(const wchar_t *format, __ms_va_list valist) { return MSVCRT_vfwprintf_s(MSVCRT_stdout,format,valist); } @@ -5439,7 +5439,7 @@ int WINAPIV MSVCRT_fprintf_s(MSVCRT_FILE* file, const char *format, ...) /********************************************************************* * fwprintf (MSVCRT.@) */ -int WINAPIV MSVCRT_fwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_fwprintf(MSVCRT_FILE* file, const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -5452,7 +5452,7 @@ int WINAPIV MSVCRT_fwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ... /********************************************************************* * fwprintf_s (MSVCRT.@) */ -int WINAPIV MSVCRT_fwprintf_s(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_fwprintf_s(MSVCRT_FILE* file, const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -5465,7 +5465,7 @@ int WINAPIV MSVCRT_fwprintf_s(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, . /********************************************************************* * _fwprintf_l (MSVCRT.@) */ -int WINAPIV MSVCRT__fwprintf_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, _locale_t locale, ...) +int WINAPIV MSVCRT__fwprintf_l(MSVCRT_FILE* file, const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; int res; @@ -5573,7 +5573,7 @@ MSVCRT_wint_t CDECL MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file) */ MSVCRT_wint_t CDECL MSVCRT__ungetwc_nolock(MSVCRT_wint_t wc, MSVCRT_FILE * file) { - MSVCRT_wchar_t mwc = wc; + wchar_t mwc = wc; if(!MSVCRT_CHECK_PMT(file != NULL)) return MSVCRT_WEOF; if (wc == MSVCRT_WEOF) @@ -5584,7 +5584,7 @@ MSVCRT_wint_t CDECL MSVCRT__ungetwc_nolock(MSVCRT_wint_t wc, MSVCRT_FILE * file) unsigned char * pp = (unsigned char *)&mwc; int i; - for(i=sizeof(MSVCRT_wchar_t)-1;i>=0;i--) { + for(i=sizeof(wchar_t)-1;i>=0;i--) { if(pp[i] != MSVCRT__ungetc_nolock(pp[i],file)) return MSVCRT_WEOF; } @@ -5608,7 +5608,7 @@ MSVCRT_wint_t CDECL MSVCRT__ungetwc_nolock(MSVCRT_wint_t wc, MSVCRT_FILE * file) /********************************************************************* * wprintf (MSVCRT.@) */ -int WINAPIV MSVCRT_wprintf(const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_wprintf(const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -5621,7 +5621,7 @@ int WINAPIV MSVCRT_wprintf(const MSVCRT_wchar_t *format, ...) /********************************************************************* * wprintf_s (MSVCRT.@) */ -int WINAPIV MSVCRT_wprintf_s(const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_wprintf_s(const wchar_t *format, ...) { __ms_va_list valist; int res; diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index ba6ff147e87..795a90e5fbc 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -751,8 +751,8 @@ int CDECL MSVCRT_memmove_s(void *dest, MSVCRT_size_t numberOfElements, const voi /********************************************************************* * wmemmove_s (MSVCR100.@) */ -int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t *src, MSVCRT_size_t count) +int CDECL wmemmove_s(wchar_t *dest, MSVCRT_size_t numberOfElements, + const wchar_t *src, MSVCRT_size_t count) { TRACE("(%p %Iu %p %Iu)\n", dest, numberOfElements, src, count); @@ -767,7 +767,7 @@ int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, if (!MSVCRT_CHECK_PMT(src != NULL)) return MSVCRT_EINVAL; if (!MSVCRT_CHECK_PMT_ERR(count <= numberOfElements, MSVCRT_ERANGE)) return MSVCRT_ERANGE; - memmove(dest, src, sizeof(MSVCRT_wchar_t)*count); + memmove(dest, src, sizeof(wchar_t)*count); return 0; } #endif @@ -802,8 +802,8 @@ int CDECL MSVCRT_memcpy_s(void *dest, MSVCRT_size_t numberOfElements, const void /********************************************************************* * wmemcpy_s (MSVCR100.@) */ -int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t *src, MSVCRT_size_t count) +int CDECL wmemcpy_s(wchar_t *dest, MSVCRT_size_t numberOfElements, + const wchar_t *src, MSVCRT_size_t count) { TRACE("(%p %Iu %p %Iu)\n", dest, numberOfElements, src, count); @@ -813,15 +813,15 @@ int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, if (!MSVCRT_CHECK_PMT(dest != NULL)) return MSVCRT_EINVAL; if (!MSVCRT_CHECK_PMT(src != NULL)) { - memset(dest, 0, numberOfElements*sizeof(MSVCRT_wchar_t)); + memset(dest, 0, numberOfElements*sizeof(wchar_t)); return MSVCRT_EINVAL; } if (!MSVCRT_CHECK_PMT_ERR(count <= numberOfElements, MSVCRT_ERANGE)) { - memset(dest, 0, numberOfElements*sizeof(MSVCRT_wchar_t)); + memset(dest, 0, numberOfElements*sizeof(wchar_t)); return MSVCRT_ERANGE; } - memmove(dest, src, sizeof(MSVCRT_wchar_t)*count); + memmove(dest, src, sizeof(wchar_t)*count); return 0; } #endif diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index abe9eea5b34..975ead24bd9 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -51,51 +51,51 @@ BOOL initial_locale = TRUE; #define MSVCRT_LEADBYTE 0x8000 #define MSVCRT_C1_DEFINED 0x200 -static const MSVCRT_wchar_t sun[] = {'S','u','n',0}; -static const MSVCRT_wchar_t mon[] = {'M','o','n',0}; -static const MSVCRT_wchar_t tue[] = {'T','u','e',0}; -static const MSVCRT_wchar_t wed[] = {'W','e','d',0}; -static const MSVCRT_wchar_t thu[] = {'T','h','u',0}; -static const MSVCRT_wchar_t fri[] = {'F','r','i',0}; -static const MSVCRT_wchar_t sat[] = {'S','a','t',0}; -static const MSVCRT_wchar_t sunday[] = {'S','u','n','d','a','y',0}; -static const MSVCRT_wchar_t monday[] = {'M','o','n','d','a','y',0}; -static const MSVCRT_wchar_t tuesday[] = {'T','u','e','s','d','a','y',0}; -static const MSVCRT_wchar_t wednesday[] = {'W','e','d','n','e','s','d','a','y',0}; -static const MSVCRT_wchar_t thursday[] = {'T','h','u','r','s','d','a','y',0}; -static const MSVCRT_wchar_t friday[] = {'F','r','i','d','a','y',0}; -static const MSVCRT_wchar_t saturday[] = {'S','a','t','u','r','d','a','y',0}; -static const MSVCRT_wchar_t jan[] = {'J','a','n',0}; -static const MSVCRT_wchar_t feb[] = {'F','e','b',0}; -static const MSVCRT_wchar_t mar[] = {'M','a','r',0}; -static const MSVCRT_wchar_t apr[] = {'A','p','r',0}; -static const MSVCRT_wchar_t may[] = {'M','a','y',0}; -static const MSVCRT_wchar_t jun[] = {'J','u','n',0}; -static const MSVCRT_wchar_t jul[] = {'J','u','l',0}; -static const MSVCRT_wchar_t aug[] = {'A','u','g',0}; -static const MSVCRT_wchar_t sep[] = {'S','e','p',0}; -static const MSVCRT_wchar_t oct[] = {'O','c','t',0}; -static const MSVCRT_wchar_t nov[] = {'N','o','v',0}; -static const MSVCRT_wchar_t dec[] = {'D','e','c',0}; -static const MSVCRT_wchar_t january[] = {'J','a','n','u','a','r','y',0}; -static const MSVCRT_wchar_t february[] = {'F','e','b','r','u','a','r','y',0}; -static const MSVCRT_wchar_t march[] = {'M','a','r','c','h',0}; -static const MSVCRT_wchar_t april[] = {'A','p','r','i','l',0}; -static const MSVCRT_wchar_t june[] = {'J','u','n','e',0}; -static const MSVCRT_wchar_t july[] = {'J','u','l','y',0}; -static const MSVCRT_wchar_t august[] = {'A','u','g','u','s','t',0}; -static const MSVCRT_wchar_t september[] = {'S','e','p','t','e','m','b','e','r',0}; -static const MSVCRT_wchar_t october[] = {'O','c','t','o','b','e','r',0}; -static const MSVCRT_wchar_t november[] = {'N','o','v','e','m','b','e','r',0}; -static const MSVCRT_wchar_t december[] = {'D','e','c','e','m','b','e','r',0}; -static const MSVCRT_wchar_t am[] = {'A','M',0}; -static const MSVCRT_wchar_t pm[] = {'P','M',0}; -static const MSVCRT_wchar_t cloc_short_date[] = {'M','M','/','d','d','/','y','y',0}; -static const MSVCRT_wchar_t cloc_date[] = {'d','d','d','d',',',' ','M','M','M','M',' ','d','d',',',' ','y','y','y','y',0}; -static const MSVCRT_wchar_t cloc_time[] = {'H','H',':','m','m',':','s','s',0}; +static const wchar_t sun[] = {'S','u','n',0}; +static const wchar_t mon[] = {'M','o','n',0}; +static const wchar_t tue[] = {'T','u','e',0}; +static const wchar_t wed[] = {'W','e','d',0}; +static const wchar_t thu[] = {'T','h','u',0}; +static const wchar_t fri[] = {'F','r','i',0}; +static const wchar_t sat[] = {'S','a','t',0}; +static const wchar_t sunday[] = {'S','u','n','d','a','y',0}; +static const wchar_t monday[] = {'M','o','n','d','a','y',0}; +static const wchar_t tuesday[] = {'T','u','e','s','d','a','y',0}; +static const wchar_t wednesday[] = {'W','e','d','n','e','s','d','a','y',0}; +static const wchar_t thursday[] = {'T','h','u','r','s','d','a','y',0}; +static const wchar_t friday[] = {'F','r','i','d','a','y',0}; +static const wchar_t saturday[] = {'S','a','t','u','r','d','a','y',0}; +static const wchar_t jan[] = {'J','a','n',0}; +static const wchar_t feb[] = {'F','e','b',0}; +static const wchar_t mar[] = {'M','a','r',0}; +static const wchar_t apr[] = {'A','p','r',0}; +static const wchar_t may[] = {'M','a','y',0}; +static const wchar_t jun[] = {'J','u','n',0}; +static const wchar_t jul[] = {'J','u','l',0}; +static const wchar_t aug[] = {'A','u','g',0}; +static const wchar_t sep[] = {'S','e','p',0}; +static const wchar_t oct[] = {'O','c','t',0}; +static const wchar_t nov[] = {'N','o','v',0}; +static const wchar_t dec[] = {'D','e','c',0}; +static const wchar_t january[] = {'J','a','n','u','a','r','y',0}; +static const wchar_t february[] = {'F','e','b','r','u','a','r','y',0}; +static const wchar_t march[] = {'M','a','r','c','h',0}; +static const wchar_t april[] = {'A','p','r','i','l',0}; +static const wchar_t june[] = {'J','u','n','e',0}; +static const wchar_t july[] = {'J','u','l','y',0}; +static const wchar_t august[] = {'A','u','g','u','s','t',0}; +static const wchar_t september[] = {'S','e','p','t','e','m','b','e','r',0}; +static const wchar_t october[] = {'O','c','t','o','b','e','r',0}; +static const wchar_t november[] = {'N','o','v','e','m','b','e','r',0}; +static const wchar_t december[] = {'D','e','c','e','m','b','e','r',0}; +static const wchar_t am[] = {'A','M',0}; +static const wchar_t pm[] = {'P','M',0}; +static const wchar_t cloc_short_date[] = {'M','M','/','d','d','/','y','y',0}; +static const wchar_t cloc_date[] = {'d','d','d','d',',',' ','M','M','M','M',' ','d','d',',',' ','y','y','y','y',0}; +static const wchar_t cloc_time[] = {'H','H',':','m','m',':','s','s',0}; #if _MSVCR_VER >= 110 -static const MSVCRT_wchar_t en_us[] = {'e','n','-','U','S',0}; +static const wchar_t en_us[] = {'e','n','-','U','S',0}; #endif __lc_time_data cloc_time_data = @@ -196,8 +196,8 @@ static const unsigned char cloc_cumap[256] = static char empty[] = ""; static char cloc_dec_point[] = "."; #if _MSVCR_VER >= 100 -static MSVCRT_wchar_t emptyW[] = {0}; -static MSVCRT_wchar_t cloc_dec_pointW[] = {'.', 0}; +static wchar_t emptyW[] = {0}; +static wchar_t cloc_dec_pointW[] = {'.', 0}; #endif static struct lconv cloc_lconv = { @@ -523,10 +523,10 @@ static inline BOOL set_lc_locale_name(pthreadlocinfo locinfo, int cat) if(LocaleNameToLCID(buf, 0) != lcid) len = LCIDToLocaleName(lcid, buf, 100, 0); - if(!len || !(locinfo->lc_name[cat] = MSVCRT_malloc(len*sizeof(MSVCRT_wchar_t)))) + if(!len || !(locinfo->lc_name[cat] = MSVCRT_malloc(len*sizeof(wchar_t)))) return FALSE; - memcpy(locinfo->lc_name[cat], buf, len*sizeof(MSVCRT_wchar_t)); + memcpy(locinfo->lc_name[cat], buf, len*sizeof(wchar_t)); return TRUE; } #else @@ -729,10 +729,10 @@ char* CDECL _Getdays(void) /********************************************************************* * _W_Getdays (MSVCR110.@) */ -MSVCRT_wchar_t* CDECL _W_Getdays(void) +wchar_t* CDECL _W_Getdays(void) { __lc_time_data *cur = get_locinfo()->lc_time_curr; - MSVCRT_wchar_t *out; + wchar_t *out; int i, len, size = 0; TRACE("\n"); @@ -803,10 +803,10 @@ char* CDECL _Getmonths(void) /********************************************************************* * _W_Getmonths (MSVCR110.@) */ -MSVCRT_wchar_t* CDECL _W_Getmonths(void) +wchar_t* CDECL _W_Getmonths(void) { __lc_time_data *cur = get_locinfo()->lc_time_curr; - MSVCRT_wchar_t *out; + wchar_t *out; int i, len, size = 0; TRACE("\n"); @@ -934,8 +934,8 @@ done: /********************************************************************* * __crtLCMapStringW (MSVCRT.@) */ -int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const MSVCRT_wchar_t *src, - int srclen, MSVCRT_wchar_t *dst, int dstlen, unsigned int codepage, int xflag) +int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const wchar_t *src, + int srclen, wchar_t *dst, int dstlen, unsigned int codepage, int xflag) { FIXME("(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n", lcid, mapflags, debugstr_w(src), srclen, dst, dstlen, codepage, xflag); @@ -958,8 +958,8 @@ int CDECL __crtCompareStringA( LCID lcid, DWORD flags, const char *src1, int len /********************************************************************* * __crtCompareStringW (MSVCRT.@) */ -int CDECL __crtCompareStringW( LCID lcid, DWORD flags, const MSVCRT_wchar_t *src1, int len1, - const MSVCRT_wchar_t *src2, int len2 ) +int CDECL __crtCompareStringW( LCID lcid, DWORD flags, const wchar_t *src1, int len1, + const wchar_t *src2, int len2 ) { FIXME("(lcid %x, flags %x, %s(%d), %s(%d), partial stub\n", lcid, flags, debugstr_w(src1), len1, debugstr_w(src2), len2 ); @@ -970,7 +970,7 @@ int CDECL __crtCompareStringW( LCID lcid, DWORD flags, const MSVCRT_wchar_t *src /********************************************************************* * __crtGetLocaleInfoW (MSVCRT.@) */ -int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, MSVCRT_wchar_t *buffer, int len ) +int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, wchar_t *buffer, int len ) { FIXME("(lcid %x, type %x, %p(%d), partial stub\n", lcid, type, buffer, len ); /* FIXME: probably not entirely right */ @@ -981,7 +981,7 @@ int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, MSVCRT_wchar_t *buffer, i /********************************************************************* * __crtGetLocaleInfoEx (MSVC110.@) */ -int CDECL __crtGetLocaleInfoEx( const WCHAR *locale, LCTYPE type, MSVCRT_wchar_t *buffer, int len ) +int CDECL __crtGetLocaleInfoEx( const WCHAR *locale, LCTYPE type, wchar_t *buffer, int len ) { TRACE("(%s, %x, %p, %d)\n", debugstr_w(locale), type, buffer, len); return GetLocaleInfoEx(locale, type, buffer, len); @@ -995,7 +995,7 @@ int CDECL __crtGetLocaleInfoEx( const WCHAR *locale, LCTYPE type, MSVCRT_wchar_t * versions of msvcrt. */ BOOL CDECL __crtGetStringTypeW(DWORD unk, DWORD type, - MSVCRT_wchar_t *buffer, int len, WORD *out) + wchar_t *buffer, int len, WORD *out) { FIXME("(unk %x, type %x, wstr %p(%d), %p) partial stub\n", unk, type, buffer, len, out); @@ -1040,7 +1040,7 @@ LCID* CDECL ___lc_handle_func(void) /********************************************************************* * ___lc_locale_name_func (MSVCR110.@) */ -MSVCRT_wchar_t** CDECL ___lc_locale_name_func(void) +wchar_t** CDECL ___lc_locale_name_func(void) { return get_locinfo()->lc_name; } @@ -1234,10 +1234,10 @@ static __lc_time_data* create_time_data(LCID lcid) ret = GetLocaleInfoW(lcid, time_data[i], NULL, 0); if(!ret) return NULL; - size += ret*sizeof(MSVCRT_wchar_t); + size += ret*sizeof(wchar_t); } #if _MSVCR_VER >= 110 - size += LCIDToLocaleName(lcid, NULL, 0, 0)*sizeof(MSVCRT_wchar_t); + size += LCIDToLocaleName(lcid, NULL, 0, 0)*sizeof(wchar_t); #endif cur = MSVCRT_malloc(size); @@ -1250,13 +1250,13 @@ static __lc_time_data* create_time_data(LCID lcid) ret += GetLocaleInfoA(lcid, time_data[i], &cur->data[ret], size-ret); } for(i=0; iwstr.wstr[i] = (MSVCRT_wchar_t*)&cur->data[ret]; + cur->wstr.wstr[i] = (wchar_t*)&cur->data[ret]; ret += GetLocaleInfoW(lcid, time_data[i], - (MSVCRT_wchar_t*)&cur->data[ret], size-ret)*sizeof(MSVCRT_wchar_t); + (wchar_t*)&cur->data[ret], size-ret)*sizeof(wchar_t); } #if _MSVCR_VER >= 110 - cur->locname = (MSVCRT_wchar_t*)&cur->data[ret]; - LCIDToLocaleName(lcid, (MSVCRT_wchar_t*)&cur->data[ret], (size-ret)/sizeof(MSVCRT_wchar_t), 0); + cur->locname = (wchar_t*)&cur->data[ret]; + LCIDToLocaleName(lcid, (wchar_t*)&cur->data[ret], (size-ret)/sizeof(wchar_t), 0); #else cur->lcid = lcid; #endif @@ -1283,7 +1283,7 @@ static pthreadlocinfo create_locinfo(int category, char buf[256]; BOOL sname; #if _MSVCR_VER >= 100 - MSVCRT_wchar_t wbuf[256]; + wchar_t wbuf[256]; #endif int i; @@ -1716,8 +1716,8 @@ static pthreadlocinfo create_locinfo(int category, #if _MSVCR_VER >= 100 i = GetLocaleInfoW(lcid[MSVCRT_LC_MONETARY], LOCALE_SINTLSYMBOL |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_int_curr_symbol = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_int_curr_symbol, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_int_curr_symbol = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_int_curr_symbol, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1725,8 +1725,8 @@ static pthreadlocinfo create_locinfo(int category, i = GetLocaleInfoW(lcid[MSVCRT_LC_MONETARY], LOCALE_SCURRENCY |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_currency_symbol = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_currency_symbol, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_currency_symbol = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_currency_symbol, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1734,8 +1734,8 @@ static pthreadlocinfo create_locinfo(int category, i = GetLocaleInfoW(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONDECIMALSEP |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_mon_decimal_point = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_mon_decimal_point, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_mon_decimal_point = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_mon_decimal_point, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1743,8 +1743,8 @@ static pthreadlocinfo create_locinfo(int category, i = GetLocaleInfoW(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONTHOUSANDSEP |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_mon_thousands_sep = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_mon_thousands_sep, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_mon_thousands_sep = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_mon_thousands_sep, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1752,8 +1752,8 @@ static pthreadlocinfo create_locinfo(int category, i = GetLocaleInfoW(lcid[MSVCRT_LC_MONETARY], LOCALE_SPOSITIVESIGN |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_positive_sign = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_positive_sign, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_positive_sign = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_positive_sign, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1761,8 +1761,8 @@ static pthreadlocinfo create_locinfo(int category, i = GetLocaleInfoW(lcid[MSVCRT_LC_MONETARY], LOCALE_SNEGATIVESIGN |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_negative_sign = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_negative_sign, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_negative_sign = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_negative_sign, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1875,8 +1875,8 @@ static pthreadlocinfo create_locinfo(int category, #if _MSVCR_VER >= 100 i = GetLocaleInfoW(lcid[MSVCRT_LC_NUMERIC], LOCALE_SDECIMAL |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_decimal_point = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_decimal_point, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_decimal_point = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_decimal_point, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1884,8 +1884,8 @@ static pthreadlocinfo create_locinfo(int category, i = GetLocaleInfoW(lcid[MSVCRT_LC_NUMERIC], LOCALE_STHOUSAND |LOCALE_NOUSEROVERRIDE, wbuf, 256); - if(i && (locinfo->lconv->_W_thousands_sep = MSVCRT_malloc(i * sizeof(MSVCRT_wchar_t)))) - memcpy(locinfo->lconv->_W_thousands_sep, wbuf, i * sizeof(MSVCRT_wchar_t)); + if(i && (locinfo->lconv->_W_thousands_sep = MSVCRT_malloc(i * sizeof(wchar_t)))) + memcpy(locinfo->lconv->_W_thousands_sep, wbuf, i * sizeof(wchar_t)); else { free_locinfo(locinfo); return NULL; @@ -1976,7 +1976,7 @@ _locale_t CDECL _create_locale(int category, const char *locale) /********************************************************************* * _wcreate_locale (MSVCR110.@) */ -_locale_t CDECL MSVCRT__wcreate_locale(int category, const MSVCRT_wchar_t *locale) +_locale_t CDECL MSVCRT__wcreate_locale(int category, const wchar_t *locale) { _locale_t loc; MSVCRT_size_t len; @@ -2059,9 +2059,9 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale) /********************************************************************* * _wsetlocale (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* wlocale) +wchar_t* CDECL MSVCRT__wsetlocale(int category, const wchar_t* wlocale) { - static MSVCRT_wchar_t current_lc_all[MAX_LOCALE_LENGTH]; + static wchar_t current_lc_all[MAX_LOCALE_LENGTH]; char *locale = NULL; const char *ret; diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index af5ab698f23..0119a0799a4 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -86,10 +86,10 @@ static const unsigned char mbctombb_932_kana[] = { 0xd2,0xd3,0xac,0xd4,0xad,0xd5,0xae,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdc,0xb2, 0xb4,0xa6,0xdd,0xb3,0xb6,0xb9}; -static MSVCRT_wchar_t msvcrt_mbc_to_wc_l(unsigned int ch, _locale_t locale) +static wchar_t msvcrt_mbc_to_wc_l(unsigned int ch, _locale_t locale) { pthreadmbcinfo mbcinfo; - MSVCRT_wchar_t chW; + wchar_t chW; char mbch[2]; int n_chars; @@ -114,7 +114,7 @@ static MSVCRT_wchar_t msvcrt_mbc_to_wc_l(unsigned int ch, _locale_t locale) return chW; } -static MSVCRT_wchar_t msvcrt_mbc_to_wc(unsigned int ch) +static wchar_t msvcrt_mbc_to_wc(unsigned int ch) { return msvcrt_mbc_to_wc_l(ch, NULL); } @@ -1534,7 +1534,7 @@ int CDECL _ismbcupper(unsigned int ch) */ int CDECL _ismbcsymbol(unsigned int ch) { - MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch ); + wchar_t wch = msvcrt_mbc_to_wc( ch ); WORD ctype; if (!GetStringTypeW(CT_CTYPE3, &wch, 1, &ctype)) { @@ -2394,10 +2394,10 @@ MSVCRT_size_t CDECL _mbstrlen(const char* str) /********************************************************************* * _mbtowc_l(MSVCRT.@) */ -int CDECL MSVCRT_mbtowc_l(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n, _locale_t locale) +int CDECL MSVCRT_mbtowc_l(wchar_t *dst, const char* str, MSVCRT_size_t n, _locale_t locale) { pthreadlocinfo locinfo; - MSVCRT_wchar_t tmpdst = '\0'; + wchar_t tmpdst = '\0'; if(!locale) locinfo = get_locinfo(); @@ -2431,7 +2431,7 @@ int CDECL MSVCRT_mbtowc_l(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n, /********************************************************************* * mbtowc(MSVCRT.@) */ -int CDECL MSVCRT_mbtowc(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n) +int CDECL MSVCRT_mbtowc(wchar_t *dst, const char* str, MSVCRT_size_t n) { return MSVCRT_mbtowc_l(dst, str, n, NULL); } @@ -2442,7 +2442,7 @@ int CDECL MSVCRT_mbtowc(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n) MSVCRT_wint_t CDECL btowc(int c) { unsigned char letter = c; - MSVCRT_wchar_t ret; + wchar_t ret; if(c == MSVCRT_EOF) return MSVCRT_WEOF; @@ -2458,7 +2458,7 @@ MSVCRT_wint_t CDECL btowc(int c) /********************************************************************* * mbrtowc(MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_mbrtowc(MSVCRT_wchar_t *dst, const char *str, +MSVCRT_size_t CDECL MSVCRT_mbrtowc(wchar_t *dst, const char *str, MSVCRT_size_t n, MSVCRT_mbstate_t *state) { pthreadlocinfo locinfo = get_locinfo(); @@ -2505,7 +2505,7 @@ MSVCRT_size_t CDECL MSVCRT_mbrtowc(MSVCRT_wchar_t *dst, const char *str, /********************************************************************* * _mbstowcs_l(MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT__mbstowcs_l(MSVCRT_wchar_t *wcstr, const char *mbstr, +MSVCRT_size_t CDECL MSVCRT__mbstowcs_l(wchar_t *wcstr, const char *mbstr, MSVCRT_size_t count, _locale_t locale) { pthreadlocinfo locinfo; @@ -2569,7 +2569,7 @@ MSVCRT_size_t CDECL MSVCRT__mbstowcs_l(MSVCRT_wchar_t *wcstr, const char *mbstr, /********************************************************************* * mbstowcs(MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_mbstowcs(MSVCRT_wchar_t *wcstr, +MSVCRT_size_t CDECL MSVCRT_mbstowcs(wchar_t *wcstr, const char *mbstr, MSVCRT_size_t count) { return MSVCRT__mbstowcs_l(wcstr, mbstr, count, NULL); @@ -2578,7 +2578,7 @@ MSVCRT_size_t CDECL MSVCRT_mbstowcs(MSVCRT_wchar_t *wcstr, /********************************************************************* * _mbstowcs_s_l(MSVCRT.@) */ -int CDECL MSVCRT__mbstowcs_s_l(MSVCRT_size_t *ret, MSVCRT_wchar_t *wcstr, +int CDECL MSVCRT__mbstowcs_s_l(MSVCRT_size_t *ret, wchar_t *wcstr, MSVCRT_size_t size, const char *mbstr, MSVCRT_size_t count, _locale_t locale) { @@ -2624,7 +2624,7 @@ int CDECL MSVCRT__mbstowcs_s_l(MSVCRT_size_t *ret, MSVCRT_wchar_t *wcstr, /********************************************************************* * mbstowcs_s(MSVCRT.@) */ -int CDECL MSVCRT__mbstowcs_s(MSVCRT_size_t *ret, MSVCRT_wchar_t *wcstr, +int CDECL MSVCRT__mbstowcs_s(MSVCRT_size_t *ret, wchar_t *wcstr, MSVCRT_size_t size, const char *mbstr, MSVCRT_size_t count) { return MSVCRT__mbstowcs_s_l(ret, wcstr, size, mbstr, count, NULL); @@ -2633,11 +2633,11 @@ int CDECL MSVCRT__mbstowcs_s(MSVCRT_size_t *ret, MSVCRT_wchar_t *wcstr, /********************************************************************* * mbsrtowcs(MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_mbsrtowcs(MSVCRT_wchar_t *wcstr, +MSVCRT_size_t CDECL MSVCRT_mbsrtowcs(wchar_t *wcstr, const char **pmbstr, MSVCRT_size_t count, MSVCRT_mbstate_t *state) { MSVCRT_mbstate_t s = (state ? *state : 0); - MSVCRT_wchar_t tmpdst; + wchar_t tmpdst; MSVCRT_size_t ret = 0; const char *p; @@ -2668,7 +2668,7 @@ MSVCRT_size_t CDECL MSVCRT_mbsrtowcs(MSVCRT_wchar_t *wcstr, /********************************************************************* * mbsrtowcs_s(MSVCRT.@) */ -int CDECL MSVCRT_mbsrtowcs_s(MSVCRT_size_t *ret, MSVCRT_wchar_t *wcstr, MSVCRT_size_t len, +int CDECL MSVCRT_mbsrtowcs_s(MSVCRT_size_t *ret, wchar_t *wcstr, MSVCRT_size_t len, const char **mbstr, MSVCRT_size_t count, MSVCRT_mbstate_t *state) { MSVCRT_size_t tmp; diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 5456e2129ba..ecef2b97d13 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -54,7 +54,6 @@ #define MSVCRT__MAX_EXT 256 typedef unsigned char MSVCRT_bool; -typedef wchar_t MSVCRT_wchar_t; typedef wint_t MSVCRT_wint_t; typedef __msvcrt_long MSVCRT_long; typedef __msvcrt_ulong MSVCRT_ulong; @@ -73,7 +72,7 @@ typedef void (__cdecl *MSVCRT__se_translator_function)(unsigned int code, struct typedef void (__cdecl *MSVCRT__beginthread_start_routine_t)(void *); typedef unsigned int (__stdcall *MSVCRT__beginthreadex_start_routine_t)(void *); typedef int (__cdecl *MSVCRT__onexit_t)(void); -typedef void (__cdecl *MSVCRT_invalid_parameter_handler)(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, unsigned, uintptr_t); +typedef void (__cdecl *MSVCRT_invalid_parameter_handler)(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, uintptr_t); typedef void (__cdecl *MSVCRT_purecall_handler)(void); typedef void (__cdecl *MSVCRT_security_error_handler)(int, void *); @@ -102,21 +101,21 @@ typedef struct __lc_time_data { int unk; int refcount; union { - const MSVCRT_wchar_t *wstr[43]; + const wchar_t *wstr[43]; struct { - const MSVCRT_wchar_t *short_wday[7]; - const MSVCRT_wchar_t *wday[7]; - const MSVCRT_wchar_t *short_mon[12]; - const MSVCRT_wchar_t *mon[12]; - const MSVCRT_wchar_t *am; - const MSVCRT_wchar_t *pm; - const MSVCRT_wchar_t *short_date; - const MSVCRT_wchar_t *date; - const MSVCRT_wchar_t *time; + const wchar_t *short_wday[7]; + const wchar_t *wday[7]; + const wchar_t *short_mon[12]; + const wchar_t *mon[12]; + const wchar_t *am; + const wchar_t *pm; + const wchar_t *short_date; + const wchar_t *date; + const wchar_t *time; } names; } wstr; #if _MSVCR_VER >= 110 - const MSVCRT_wchar_t *locname; + const wchar_t *locname; #endif char data[1]; } __lc_time_data; @@ -171,15 +170,15 @@ struct __thread_data { int unk1; unsigned int random_seed; /* seed for rand() */ char *strtok_next; /* next ptr for strtok() */ - MSVCRT_wchar_t *wcstok_next; /* next ptr for wcstok() */ + wchar_t *wcstok_next; /* next ptr for wcstok() */ unsigned char *mbstok_next; /* next ptr for mbstok() */ char *strerror_buffer; /* buffer for strerror */ - MSVCRT_wchar_t *wcserror_buffer; /* buffer for wcserror */ + wchar_t *wcserror_buffer; /* buffer for wcserror */ char *tmpnam_buffer; /* buffer for tmpname() */ - MSVCRT_wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */ + wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */ void *unk2[2]; char *asctime_buffer; /* buffer for asctime */ - MSVCRT_wchar_t *wasctime_buffer; /* buffer for wasctime */ + wchar_t *wasctime_buffer; /* buffer for wasctime */ struct MSVCRT_tm *time_buffer; /* buffer for localtime/gmtime */ char *efcvt_buffer; /* buffer for ecvt/fcvt */ int unk3[2]; @@ -244,12 +243,12 @@ void __cdecl _purecall(void); void __cdecl _amsg_exit(int errnum); extern char **MSVCRT__environ; -extern MSVCRT_wchar_t **MSVCRT__wenviron; +extern wchar_t **MSVCRT__wenviron; extern char ** msvcrt_SnapshotOfEnvironmentA(char **) DECLSPEC_HIDDEN; -extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **) DECLSPEC_HIDDEN; +extern wchar_t ** msvcrt_SnapshotOfEnvironmentW(wchar_t **) DECLSPEC_HIDDEN; -MSVCRT_wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN; +wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN; extern unsigned int MSVCRT__commode; @@ -476,7 +475,7 @@ struct MSVCRT__wfinddata32_t { MSVCRT___time32_t time_access; MSVCRT___time32_t time_write; _fsize_t size; - MSVCRT_wchar_t name[260]; + wchar_t name[260]; }; struct MSVCRT__wfinddata32i64_t { @@ -485,7 +484,7 @@ struct MSVCRT__wfinddata32i64_t { MSVCRT___time32_t time_access; MSVCRT___time32_t time_write; __int64 DECLSPEC_ALIGN(8) size; - MSVCRT_wchar_t name[260]; + wchar_t name[260]; }; struct MSVCRT__wfinddata64i32_t { @@ -494,7 +493,7 @@ struct MSVCRT__wfinddata64i32_t { MSVCRT___time64_t time_access; MSVCRT___time64_t time_write; _fsize_t size; - MSVCRT_wchar_t name[260]; + wchar_t name[260]; }; struct MSVCRT__wfinddata64_t { @@ -503,7 +502,7 @@ struct MSVCRT__wfinddata64_t { MSVCRT___time64_t time_access; MSVCRT___time64_t time_write; __int64 DECLSPEC_ALIGN(8) size; - MSVCRT_wchar_t name[260]; + wchar_t name[260]; }; struct MSVCRT___utimbuf32 @@ -875,7 +874,7 @@ int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t); int __cdecl MSVCRT_isleadbyte(int); int __cdecl MSVCRT__isleadbyte_l(int, _locale_t); int __cdecl MSVCRT__isspace_l(int, _locale_t); -int __cdecl MSVCRT__iswspace_l(MSVCRT_wchar_t, _locale_t); +int __cdecl MSVCRT__iswspace_l(wchar_t, _locale_t); void __cdecl MSVCRT__lock_file(MSVCRT_FILE*); void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*); @@ -908,11 +907,11 @@ MSVCRT_FILE* __cdecl MSVCRT__iob_func(void); MSVCRT___time32_t __cdecl MSVCRT__time32(MSVCRT___time32_t*); MSVCRT___time64_t __cdecl MSVCRT__time64(MSVCRT___time64_t*); MSVCRT_FILE* __cdecl MSVCRT__fdopen(int, const char *); -MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *); -int WINAPIV MSVCRT_fwprintf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...); -int __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, __ms_va_list valist ); -int WINAPIV MSVCRT__snwprintf(MSVCRT_wchar_t*, MSVCRT_size_t, const MSVCRT_wchar_t*, ...); +MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const wchar_t *); +int WINAPIV MSVCRT_fwprintf(MSVCRT_FILE *file, const wchar_t *format, ...); +int __cdecl MSVCRT_vsnwprintf(wchar_t *str, MSVCRT_size_t len, + const wchar_t *format, __ms_va_list valist ); +int WINAPIV MSVCRT__snwprintf(wchar_t*, MSVCRT_size_t, const wchar_t*, ...); int WINAPIV MSVCRT_sprintf(char*,const char*,...); int WINAPIV MSVCRT__snprintf(char*,MSVCRT_size_t,const char*,...); int WINAPIV MSVCRT__scprintf(const char*,...); @@ -937,18 +936,18 @@ int __cdecl _ismbblead(unsigned int); int __cdecl _ismbblead_l(unsigned int, _locale_t); int __cdecl _ismbclegal(unsigned int c); int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str); -int __cdecl MSVCRT_mbtowc(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); -int __cdecl MSVCRT_mbtowc_l(MSVCRT_wchar_t*,const char*,MSVCRT_size_t,_locale_t); -MSVCRT_size_t __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); -MSVCRT_size_t __cdecl MSVCRT__mbstowcs_l(MSVCRT_wchar_t*, const char*, MSVCRT_size_t, _locale_t); -int __cdecl MSVCRT__mbstowcs_s_l(MSVCRT_size_t*, MSVCRT_wchar_t*, +int __cdecl MSVCRT_mbtowc(wchar_t*,const char*,MSVCRT_size_t); +int __cdecl MSVCRT_mbtowc_l(wchar_t*,const char*,MSVCRT_size_t,_locale_t); +MSVCRT_size_t __cdecl MSVCRT_mbstowcs(wchar_t*,const char*,MSVCRT_size_t); +MSVCRT_size_t __cdecl MSVCRT__mbstowcs_l(wchar_t*, const char*, MSVCRT_size_t, _locale_t); +int __cdecl MSVCRT__mbstowcs_s_l(MSVCRT_size_t*, wchar_t*, MSVCRT_size_t, const char*, MSVCRT_size_t, _locale_t); -MSVCRT_size_t __cdecl MSVCRT_wcstombs(char*,const MSVCRT_wchar_t*,MSVCRT_size_t); -MSVCRT_size_t __cdecl MSVCRT__wcstombs_l(char*, const MSVCRT_wchar_t*, MSVCRT_size_t, _locale_t); +MSVCRT_size_t __cdecl MSVCRT_wcstombs(char*,const wchar_t*,MSVCRT_size_t); +MSVCRT_size_t __cdecl MSVCRT__wcstombs_l(char*, const wchar_t*, MSVCRT_size_t, _locale_t); MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *); MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *); -MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *); -MSVCRT_intptr_t __cdecl MSVCRT__wspawnvpe(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *); +MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *); +MSVCRT_intptr_t __cdecl MSVCRT__wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *); void __cdecl MSVCRT__searchenv(const char*,const char*,char*); int __cdecl MSVCRT__getdrive(void); char* __cdecl MSVCRT__strdup(const char*); @@ -957,17 +956,17 @@ char* __cdecl _strset(char*,int); int __cdecl _ungetch(int); int __cdecl _cputs(const char*); int WINAPIV _cprintf(const char*,...); -int WINAPIV _cwprintf(const MSVCRT_wchar_t*,...); +int WINAPIV _cwprintf(const wchar_t*,...); int WINAPIV MSVCRT_sscanf(const char *, const char *, ...); char*** __cdecl MSVCRT___p__environ(void); int* __cdecl __p___mb_cur_max(void); int* __cdecl MSVCRT___p__fmode(void); -MSVCRT_wchar_t* __cdecl MSVCRT__wcsdup(const MSVCRT_wchar_t*); +wchar_t* __cdecl MSVCRT__wcsdup(const wchar_t*); MSVCRT_size_t __cdecl MSVCRT_strnlen(const char *,MSVCRT_size_t); -MSVCRT_size_t __cdecl MSVCRT_wcsnlen(const MSVCRT_wchar_t*,MSVCRT_size_t); -MSVCRT_wchar_t*** __cdecl MSVCRT___p__wenviron(void); -INT __cdecl MSVCRT_wctomb(char*,MSVCRT_wchar_t); -int __cdecl MSVCRT__wctomb_l(char*, MSVCRT_wchar_t, _locale_t); +MSVCRT_size_t __cdecl MSVCRT_wcsnlen(const wchar_t*,MSVCRT_size_t); +wchar_t*** __cdecl MSVCRT___p__wenviron(void); +INT __cdecl MSVCRT_wctomb(char*,wchar_t); +int __cdecl MSVCRT__wctomb_l(char*, wchar_t, _locale_t); char* __cdecl MSVCRT__strdate(char* date); char* __cdecl MSVCRT__strtime(char* date); int __cdecl _setmbcp(int); @@ -975,11 +974,11 @@ int __cdecl MSVCRT__close(int); int __cdecl MSVCRT__dup(int); int __cdecl MSVCRT__dup2(int, int); int __cdecl MSVCRT__pipe(int *, unsigned int, int); -MSVCRT_wchar_t* __cdecl MSVCRT__wgetenv(const MSVCRT_wchar_t*); -void __cdecl MSVCRT__wsearchenv(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_wchar_t*); +wchar_t* __cdecl MSVCRT__wgetenv(const wchar_t*); +void __cdecl MSVCRT__wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); MSVCRT_intptr_t __cdecl MSVCRT__spawnvpe(int, const char*, const char* const*, const char* const*); -void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_wchar_t *func, - const MSVCRT_wchar_t *file, unsigned int line, uintptr_t arg); +void __cdecl MSVCRT__invalid_parameter(const wchar_t *expr, const wchar_t *func, + const wchar_t *file, unsigned int line, uintptr_t arg); int __cdecl MSVCRT__toupper_l(int,_locale_t); int __cdecl MSVCRT__tolower_l(int,_locale_t); int __cdecl MSVCRT__towupper_l(MSVCRT_wint_t,_locale_t); @@ -998,23 +997,23 @@ MSVCRT_long __cdecl MSVCRT_strtol(const char*, char**, int); unsigned int __cdecl MSVCRT__get_output_format(void); char* __cdecl MSVCRT_strtok_s(char*, const char*, char**); char* __cdecl MSVCRT__itoa(int, char*, int); -int __cdecl MSVCRT_wcsncmp(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_size_t); -int __cdecl MSVCRT__wcsnicmp(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_size_t); +int __cdecl MSVCRT_wcsncmp(const wchar_t*, const wchar_t*, MSVCRT_size_t); +int __cdecl MSVCRT__wcsnicmp(const wchar_t*, const wchar_t*, MSVCRT_size_t); int __cdecl MSVCRT_towlower(MSVCRT_wint_t); int __cdecl MSVCRT_towupper(MSVCRT_wint_t); int __cdecl MSVCRT__isprint_l(int c, _locale_t locale); -int __cdecl MSVCRT__iswalnum_l(MSVCRT_wchar_t, _locale_t); -int __cdecl MSVCRT__iswdigit_l(MSVCRT_wchar_t, _locale_t); -int __cdecl MSVCRT__iswgraph_l(MSVCRT_wchar_t, _locale_t); -int __cdecl MSVCRT__iswalpha_l(MSVCRT_wchar_t, _locale_t); -int __cdecl MSVCRT__iswlower_l(MSVCRT_wchar_t, _locale_t); -int __cdecl MSVCRT__iswupper_l(MSVCRT_wchar_t, _locale_t); -int __cdecl MSVCRT__iswprint_l(MSVCRT_wchar_t, _locale_t); -int __cdecl MSVCRT__iswpunct_l(MSVCRT_wchar_t, _locale_t); -MSVCRT_size_t __cdecl MSVCRT_wcslen(const MSVCRT_wchar_t*); -MSVCRT_wchar_t* __cdecl MSVCRT_wcscpy(MSVCRT_wchar_t*, const MSVCRT_wchar_t*); -MSVCRT_wchar_t* __cdecl MSVCRT_wcschr(const MSVCRT_wchar_t*, MSVCRT_wchar_t); -MSVCRT_wchar_t* __cdecl MSVCRT_wcscat(MSVCRT_wchar_t*, const MSVCRT_wchar_t*); +int __cdecl MSVCRT__iswalnum_l(wchar_t, _locale_t); +int __cdecl MSVCRT__iswdigit_l(wchar_t, _locale_t); +int __cdecl MSVCRT__iswgraph_l(wchar_t, _locale_t); +int __cdecl MSVCRT__iswalpha_l(wchar_t, _locale_t); +int __cdecl MSVCRT__iswlower_l(wchar_t, _locale_t); +int __cdecl MSVCRT__iswupper_l(wchar_t, _locale_t); +int __cdecl MSVCRT__iswprint_l(wchar_t, _locale_t); +int __cdecl MSVCRT__iswpunct_l(wchar_t, _locale_t); +MSVCRT_size_t __cdecl MSVCRT_wcslen(const wchar_t*); +wchar_t* __cdecl MSVCRT_wcscpy(wchar_t*, const wchar_t*); +wchar_t* __cdecl MSVCRT_wcschr(const wchar_t*, wchar_t); +wchar_t* __cdecl MSVCRT_wcscat(wchar_t*, const wchar_t*); double __cdecl MSVCRT_floor( double x ); float __cdecl MSVCRT_floorf( float x ); @@ -1038,7 +1037,7 @@ struct fpnum { ULONGLONG m; enum fpmod mod; }; -struct fpnum fpnum_parse(MSVCRT_wchar_t (*)(void*), void (*)(void*), +struct fpnum fpnum_parse(wchar_t (*)(void*), void (*)(void*), void*, pthreadlocinfo, BOOL) DECLSPEC_HIDDEN; int fpnum_double(struct fpnum*, double*) DECLSPEC_HIDDEN; /* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd) @@ -1055,7 +1054,7 @@ int fpnum_double(struct fpnum*, double*) DECLSPEC_HIDDEN; #define MSVCRT__ARGMAX 100 typedef int (*puts_clbk_a)(void*, int, const char*); -typedef int (*puts_clbk_w)(void*, int, const MSVCRT_wchar_t*); +typedef int (*puts_clbk_w)(void*, int, const wchar_t*); typedef union _printf_arg { void *get_ptr; @@ -1066,10 +1065,10 @@ typedef union _printf_arg typedef printf_arg (*args_clbk)(void*, int, int, __ms_va_list*); int pf_printf_a(puts_clbk_a, void*, const char*, _locale_t, DWORD, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN; -int pf_printf_w(puts_clbk_w, void*, const MSVCRT_wchar_t*, _locale_t, +int pf_printf_w(puts_clbk_w, void*, const wchar_t*, _locale_t, DWORD, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN; int create_positional_ctx_a(void*, const char*, __ms_va_list) DECLSPEC_HIDDEN; -int create_positional_ctx_w(void*, const MSVCRT_wchar_t*, __ms_va_list) DECLSPEC_HIDDEN; +int create_positional_ctx_w(void*, const wchar_t*, __ms_va_list) DECLSPEC_HIDDEN; printf_arg arg_clbk_valist(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN; printf_arg arg_clbk_positional(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN; diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h index 11daee8cd88..dc980372afb 100644 --- a/dlls/msvcrt/printf.h +++ b/dlls/msvcrt/printf.h @@ -19,12 +19,12 @@ #include "bnum.h" #ifdef PRINTF_WIDE -#define APICHAR MSVCRT_wchar_t +#define APICHAR wchar_t #define CONVCHAR char #define FUNC_NAME(func) func ## _w #else #define APICHAR char -#define CONVCHAR MSVCRT_wchar_t +#define CONVCHAR wchar_t #define FUNC_NAME(func) func ## _a #endif @@ -108,7 +108,7 @@ static inline int FUNC_NAME(pf_fill)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ct #ifndef PRINTF_HELPERS #define PRINTF_HELPERS -static inline int wcstombs_len(char *mbstr, const MSVCRT_wchar_t *wcstr, +static inline int wcstombs_len(char *mbstr, const wchar_t *wcstr, int len, _locale_t locale) { char buf[MSVCRT_MB_LEN_MAX]; @@ -122,7 +122,7 @@ static inline int wcstombs_len(char *mbstr, const MSVCRT_wchar_t *wcstr, return mblen; } -static inline int mbstowcs_len(MSVCRT_wchar_t *wcstr, const char *mbstr, +static inline int mbstowcs_len(wchar_t *wcstr, const char *mbstr, int len, _locale_t locale) { int i, r, wlen = 0; @@ -138,7 +138,7 @@ static inline int mbstowcs_len(MSVCRT_wchar_t *wcstr, const char *mbstr, #endif static inline int FUNC_NAME(pf_output_wstr)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, - const MSVCRT_wchar_t *str, int len, _locale_t locale) + const wchar_t *str, int len, _locale_t locale) { #ifdef PRINTF_WIDE return pf_puts(puts_ctx, len, str); @@ -182,7 +182,7 @@ static inline int FUNC_NAME(pf_output_str)(FUNC_NAME(puts_clbk) pf_puts, void *p } static inline int FUNC_NAME(pf_output_format_wstr)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, - const MSVCRT_wchar_t *str, int len, pf_flags *flags, _locale_t locale) + const wchar_t *str, int len, pf_flags *flags, _locale_t locale) { int r, ret; @@ -244,10 +244,10 @@ static inline int FUNC_NAME(pf_output_format_str)(FUNC_NAME(puts_clbk) pf_puts, static inline int FUNC_NAME(pf_handle_string)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const void *str, int len, pf_flags *flags, _locale_t locale, BOOL legacy_wide) { - BOOL api_is_wide = sizeof(APICHAR) == sizeof(MSVCRT_wchar_t); + BOOL api_is_wide = sizeof(APICHAR) == sizeof(wchar_t); BOOL complement_is_narrow = legacy_wide ? api_is_wide : FALSE; #ifdef PRINTF_WIDE - static const MSVCRT_wchar_t nullW[] = {'(','n','u','l','l',')',0}; + static const wchar_t nullW[] = {'(','n','u','l','l',')',0}; if(!str) return FUNC_NAME(pf_output_format_wstr)(pf_puts, puts_ctx, nullW, 6, flags, locale); diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index 3070e560f8e..463b62f739c 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -36,14 +36,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); -static void msvcrt_search_executable(const MSVCRT_wchar_t *name, MSVCRT_wchar_t *fullname, int use_path) +static void msvcrt_search_executable(const wchar_t *name, wchar_t *fullname, int use_path) { - static const MSVCRT_wchar_t path[] = {'P','A','T','H',0}; - static const MSVCRT_wchar_t suffix[][5] = + static const wchar_t path[] = {'P','A','T','H',0}; + static const wchar_t suffix[][5] = {{'.','c','o','m',0}, {'.','e','x','e',0}, {'.','b','a','t',0}, {'.','c','m','d',0}}; - MSVCRT_wchar_t buffer[MAX_PATH]; - const MSVCRT_wchar_t *env, *p, *end; + wchar_t buffer[MAX_PATH]; + const wchar_t *env, *p, *end; unsigned int i, name_len, path_len; int extension = 1; @@ -56,7 +56,7 @@ static void msvcrt_search_executable(const MSVCRT_wchar_t *name, MSVCRT_wchar_t name_len = p - name; /* FIXME extra-long names are silently truncated */ - memcpy(buffer, name, name_len * sizeof(MSVCRT_wchar_t)); + memcpy(buffer, name, name_len * sizeof(wchar_t)); buffer[name_len] = '\0'; /* try current dir first */ @@ -74,7 +74,7 @@ static void msvcrt_search_executable(const MSVCRT_wchar_t *name, MSVCRT_wchar_t { for (i = 0; i < 4; i++) { - memcpy(buffer + name_len, suffix[i], 5 * sizeof(MSVCRT_wchar_t)); + memcpy(buffer + name_len, suffix[i], 5 * sizeof(wchar_t)); if (GetFileAttributesW(buffer) != INVALID_FILE_ATTRIBUTES) { MSVCRT_wcscpy(fullname, buffer); @@ -96,7 +96,7 @@ static void msvcrt_search_executable(const MSVCRT_wchar_t *name, MSVCRT_wchar_t path_len = p - env; if (path_len + name_len <= MAX_PATH - 2) { - memcpy(buffer, env, path_len * sizeof(MSVCRT_wchar_t)); + memcpy(buffer, env, path_len * sizeof(wchar_t)); if (buffer[path_len] != '/' && buffer[path_len] != '\\') { buffer[path_len++] = '\\'; @@ -116,7 +116,7 @@ static void msvcrt_search_executable(const MSVCRT_wchar_t *name, MSVCRT_wchar_t { for (i = 0; i < 4; i++) { - memcpy(buffer + path_len + name_len, suffix[i], 5 * sizeof(MSVCRT_wchar_t)); + memcpy(buffer + path_len + name_len, suffix[i], 5 * sizeof(wchar_t)); if (GetFileAttributesW(buffer) != INVALID_FILE_ATTRIBUTES) { MSVCRT_wcscpy(fullname, buffer); @@ -128,12 +128,12 @@ static void msvcrt_search_executable(const MSVCRT_wchar_t *name, MSVCRT_wchar_t } while(1); } -static MSVCRT_intptr_t msvcrt_spawn(int flags, const MSVCRT_wchar_t* exe, MSVCRT_wchar_t* cmdline, - MSVCRT_wchar_t* env, int use_path) +static MSVCRT_intptr_t msvcrt_spawn(int flags, const wchar_t* exe, wchar_t* cmdline, + wchar_t* env, int use_path) { STARTUPINFOW si; PROCESS_INFORMATION pi; - MSVCRT_wchar_t fullname[MAX_PATH]; + wchar_t fullname[MAX_PATH]; DWORD create_flags = CREATE_UNICODE_ENVIRONMENT; TRACE("%x %s %s %s %d\n", flags, debugstr_w(exe), debugstr_w(cmdline), debugstr_w(env), use_path); @@ -184,12 +184,12 @@ static MSVCRT_intptr_t msvcrt_spawn(int flags, const MSVCRT_wchar_t* exe, MSVCRT /* INTERNAL: Convert wide argv list to a single 'delim'-separated wide string, with an * extra '\0' to terminate it. */ -static MSVCRT_wchar_t* msvcrt_argvtos(const MSVCRT_wchar_t* const* arg, MSVCRT_wchar_t delim) +static wchar_t* msvcrt_argvtos(const wchar_t* const* arg, wchar_t delim) { - const MSVCRT_wchar_t* const* a; + const wchar_t* const* a; int size; - MSVCRT_wchar_t* p; - MSVCRT_wchar_t* ret; + wchar_t* p; + wchar_t* ret; if (!arg) { @@ -206,7 +206,7 @@ static MSVCRT_wchar_t* msvcrt_argvtos(const MSVCRT_wchar_t* const* arg, MSVCRT_w a++; } - ret = MSVCRT_malloc((size + 1) * sizeof(MSVCRT_wchar_t)); + ret = MSVCRT_malloc((size + 1) * sizeof(wchar_t)); if (!ret) return NULL; @@ -216,7 +216,7 @@ static MSVCRT_wchar_t* msvcrt_argvtos(const MSVCRT_wchar_t* const* arg, MSVCRT_w while (*a) { int len = MSVCRT_wcslen(*a); - memcpy(p,*a,len * sizeof(MSVCRT_wchar_t)); + memcpy(p,*a,len * sizeof(wchar_t)); p += len; *p++ = delim; a++; @@ -229,11 +229,11 @@ static MSVCRT_wchar_t* msvcrt_argvtos(const MSVCRT_wchar_t* const* arg, MSVCRT_w /* INTERNAL: Convert ansi argv list to a single 'delim'-separated wide string, with an * extra '\0' to terminate it. */ -static MSVCRT_wchar_t *msvcrt_argvtos_aw(const char * const *arg, MSVCRT_wchar_t delim) +static wchar_t *msvcrt_argvtos_aw(const char * const *arg, wchar_t delim) { const char * const *a; unsigned int len; - MSVCRT_wchar_t *p, *ret; + wchar_t *p, *ret; if (!arg) { @@ -250,7 +250,7 @@ static MSVCRT_wchar_t *msvcrt_argvtos_aw(const char * const *arg, MSVCRT_wchar_t a++; } - ret = MSVCRT_malloc((len + 1) * sizeof(MSVCRT_wchar_t)); + ret = MSVCRT_malloc((len + 1) * sizeof(wchar_t)); if (!ret) return NULL; @@ -271,20 +271,20 @@ static MSVCRT_wchar_t *msvcrt_argvtos_aw(const char * const *arg, MSVCRT_wchar_t /* INTERNAL: Convert wide va_list to a single 'delim'-separated wide string, with an * extra '\0' to terminate it. */ -static MSVCRT_wchar_t *msvcrt_valisttos(const MSVCRT_wchar_t *arg0, __ms_va_list alist, MSVCRT_wchar_t delim) +static wchar_t *msvcrt_valisttos(const wchar_t *arg0, __ms_va_list alist, wchar_t delim) { unsigned int size = 0, pos = 0; - const MSVCRT_wchar_t *arg; - MSVCRT_wchar_t *new, *ret = NULL; + const wchar_t *arg; + wchar_t *new, *ret = NULL; - for (arg = arg0; arg; arg = va_arg( alist, MSVCRT_wchar_t * )) + for (arg = arg0; arg; arg = va_arg( alist, wchar_t * )) { unsigned int len = MSVCRT_wcslen( arg ) + 1; if (pos + len >= size) { size = max( 256, size * 2 ); size = max( size, pos + len + 1 ); - if (!(new = MSVCRT_realloc( ret, size * sizeof(MSVCRT_wchar_t) ))) + if (!(new = MSVCRT_realloc( ret, size * sizeof(wchar_t) ))) { MSVCRT_free( ret ); return NULL; @@ -306,11 +306,11 @@ static MSVCRT_wchar_t *msvcrt_valisttos(const MSVCRT_wchar_t *arg0, __ms_va_list /* INTERNAL: Convert ansi va_list to a single 'delim'-separated wide string, with an * extra '\0' to terminate it. */ -static MSVCRT_wchar_t *msvcrt_valisttos_aw(const char *arg0, __ms_va_list alist, MSVCRT_wchar_t delim) +static wchar_t *msvcrt_valisttos_aw(const char *arg0, __ms_va_list alist, wchar_t delim) { unsigned int size = 0, pos = 0; const char *arg; - MSVCRT_wchar_t *new, *ret = NULL; + wchar_t *new, *ret = NULL; for (arg = arg0; arg; arg = va_arg( alist, char * )) { @@ -319,7 +319,7 @@ static MSVCRT_wchar_t *msvcrt_valisttos_aw(const char *arg0, __ms_va_list alist, { size = max( 256, size * 2 ); size = max( size, pos + len + 1 ); - if (!(new = MSVCRT_realloc( ret, size * sizeof(MSVCRT_wchar_t) ))) + if (!(new = MSVCRT_realloc( ret, size * sizeof(wchar_t) ))) { MSVCRT_free( ret ); return NULL; @@ -338,15 +338,15 @@ static MSVCRT_wchar_t *msvcrt_valisttos_aw(const char *arg0, __ms_va_list alist, } /* INTERNAL: retrieve COMSPEC environment variable */ -static MSVCRT_wchar_t *msvcrt_get_comspec(void) +static wchar_t *msvcrt_get_comspec(void) { - static const MSVCRT_wchar_t cmd[] = {'c','m','d',0}; - static const MSVCRT_wchar_t comspec[] = {'C','O','M','S','P','E','C',0}; - MSVCRT_wchar_t *ret; + static const wchar_t cmd[] = {'c','m','d',0}; + static const wchar_t comspec[] = {'C','O','M','S','P','E','C',0}; + wchar_t *ret; unsigned int len; if (!(len = GetEnvironmentVariableW(comspec, NULL, 0))) len = ARRAY_SIZE(cmd); - if ((ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(MSVCRT_wchar_t)))) + if ((ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(wchar_t)))) { if (!GetEnvironmentVariableW(comspec, ret, len)) MSVCRT_wcscpy(ret, cmd); } @@ -389,10 +389,10 @@ MSVCRT_intptr_t CDECL _cwait(int *status, MSVCRT_intptr_t pid, int action) * * Unicode version of _execl */ -MSVCRT_intptr_t WINAPIV _wexecl(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV _wexecl(const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args; + wchar_t *args; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -414,7 +414,7 @@ MSVCRT_intptr_t WINAPIV _wexecl(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t MSVCRT_intptr_t WINAPIV _execl(const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args; + wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; @@ -435,11 +435,11 @@ MSVCRT_intptr_t WINAPIV _execl(const char* name, const char* arg0, ...) * * Unicode version of _execle */ -MSVCRT_intptr_t WINAPIV _wexecle(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV _wexecle(const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args, *envs = NULL; - const MSVCRT_wchar_t * const *envp; + wchar_t *args, *envs = NULL; + const wchar_t * const *envp; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -447,8 +447,8 @@ MSVCRT_intptr_t WINAPIV _wexecle(const MSVCRT_wchar_t* name, const MSVCRT_wchar_ __ms_va_end(ap); __ms_va_start(ap, arg0); - while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; - envp = va_arg( ap, const MSVCRT_wchar_t * const * ); + while (va_arg( ap, wchar_t * ) != NULL) /*nothing*/; + envp = va_arg( ap, const wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); __ms_va_end(ap); @@ -465,7 +465,7 @@ MSVCRT_intptr_t WINAPIV _wexecle(const MSVCRT_wchar_t* name, const MSVCRT_wchar_ MSVCRT_intptr_t WINAPIV _execle(const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args, *envs = NULL; + wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; @@ -494,10 +494,10 @@ MSVCRT_intptr_t WINAPIV _execle(const char* name, const char* arg0, ...) * * Unicode version of _execlp */ -MSVCRT_intptr_t WINAPIV _wexeclp(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV _wexeclp(const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args; + wchar_t *args; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -519,7 +519,7 @@ MSVCRT_intptr_t WINAPIV _wexeclp(const MSVCRT_wchar_t* name, const MSVCRT_wchar_ MSVCRT_intptr_t WINAPIV _execlp(const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args; + wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; @@ -540,11 +540,11 @@ MSVCRT_intptr_t WINAPIV _execlp(const char* name, const char* arg0, ...) * * Unicode version of _execlpe */ -MSVCRT_intptr_t WINAPIV _wexeclpe(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV _wexeclpe(const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args, *envs = NULL; - const MSVCRT_wchar_t * const *envp; + wchar_t *args, *envs = NULL; + const wchar_t * const *envp; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -552,8 +552,8 @@ MSVCRT_intptr_t WINAPIV _wexeclpe(const MSVCRT_wchar_t* name, const MSVCRT_wchar __ms_va_end(ap); __ms_va_start(ap, arg0); - while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; - envp = va_arg( ap, const MSVCRT_wchar_t * const * ); + while (va_arg( ap, wchar_t * ) != NULL) /*nothing*/; + envp = va_arg( ap, const wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); __ms_va_end(ap); @@ -570,7 +570,7 @@ MSVCRT_intptr_t WINAPIV _wexeclpe(const MSVCRT_wchar_t* name, const MSVCRT_wchar MSVCRT_intptr_t WINAPIV _execlpe(const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args, *envs = NULL; + wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; @@ -599,7 +599,7 @@ MSVCRT_intptr_t WINAPIV _execlpe(const char* name, const char* arg0, ...) * * Unicode version of _execv */ -MSVCRT_intptr_t CDECL _wexecv(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv) +MSVCRT_intptr_t CDECL _wexecv(const wchar_t* name, const wchar_t* const* argv) { return MSVCRT__wspawnve(MSVCRT__P_OVERLAY, name, argv, NULL); } @@ -620,7 +620,7 @@ MSVCRT_intptr_t CDECL _execv(const char* name, const char* const* argv) * * Unicode version of _execve */ -MSVCRT_intptr_t CDECL _wexecve(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv, const MSVCRT_wchar_t* const* envv) +MSVCRT_intptr_t CDECL _wexecve(const wchar_t* name, const wchar_t* const* argv, const wchar_t* const* envv) { return MSVCRT__wspawnve(MSVCRT__P_OVERLAY, name, argv, envv); } @@ -641,7 +641,7 @@ MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, const char* const* argv, * * Unicode version of _execvpe */ -MSVCRT_intptr_t CDECL _wexecvpe(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv, const MSVCRT_wchar_t* const* envv) +MSVCRT_intptr_t CDECL _wexecvpe(const wchar_t* name, const wchar_t* const* argv, const wchar_t* const* envv) { return MSVCRT__wspawnvpe(MSVCRT__P_OVERLAY, name, argv, envv); } @@ -662,7 +662,7 @@ MSVCRT_intptr_t CDECL _execvpe(const char* name, const char* const* argv, const * * Unicode version of _execvp */ -MSVCRT_intptr_t CDECL _wexecvp(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv) +MSVCRT_intptr_t CDECL _wexecvp(const wchar_t* name, const wchar_t* const* argv) { return _wexecvpe(name, argv, NULL); } @@ -683,10 +683,10 @@ MSVCRT_intptr_t CDECL _execvp(const char* name, const char* const* argv) * * Unicode version of _spawnl */ -MSVCRT_intptr_t WINAPIV MSVCRT__wspawnl(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV MSVCRT__wspawnl(int flags, const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args; + wchar_t *args; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -708,7 +708,7 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnl(int flags, const MSVCRT_wchar_t* name, c MSVCRT_intptr_t WINAPIV MSVCRT__spawnl(int flags, const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args; + wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; @@ -729,11 +729,11 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnl(int flags, const char* name, const char* * * Unicode version of _spawnle */ -MSVCRT_intptr_t WINAPIV MSVCRT__wspawnle(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV MSVCRT__wspawnle(int flags, const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args, *envs = NULL; - const MSVCRT_wchar_t * const *envp; + wchar_t *args, *envs = NULL; + const wchar_t * const *envp; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -741,8 +741,8 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnle(int flags, const MSVCRT_wchar_t* name, __ms_va_end(ap); __ms_va_start(ap, arg0); - while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; - envp = va_arg( ap, const MSVCRT_wchar_t * const * ); + while (va_arg( ap, wchar_t * ) != NULL) /*nothing*/; + envp = va_arg( ap, const wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); __ms_va_end(ap); @@ -759,7 +759,7 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnle(int flags, const MSVCRT_wchar_t* name, MSVCRT_intptr_t WINAPIV MSVCRT__spawnle(int flags, const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args, *envs = NULL; + wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; @@ -788,10 +788,10 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnle(int flags, const char* name, const char* * * Unicode version of _spawnlp */ -MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlp(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlp(int flags, const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args; + wchar_t *args; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -813,7 +813,7 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlp(int flags, const MSVCRT_wchar_t* name, MSVCRT_intptr_t WINAPIV MSVCRT__spawnlp(int flags, const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args; + wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; @@ -834,11 +834,11 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnlp(int flags, const char* name, const char* * * Unicode version of _spawnlpe */ -MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlpe(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) +MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlpe(int flags, const wchar_t* name, const wchar_t* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *args, *envs = NULL; - const MSVCRT_wchar_t * const *envp; + wchar_t *args, *envs = NULL; + const wchar_t * const *envp; MSVCRT_intptr_t ret; __ms_va_start(ap, arg0); @@ -846,8 +846,8 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlpe(int flags, const MSVCRT_wchar_t* name, __ms_va_end(ap); __ms_va_start(ap, arg0); - while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; - envp = va_arg( ap, const MSVCRT_wchar_t * const * ); + while (va_arg( ap, wchar_t * ) != NULL) /*nothing*/; + envp = va_arg( ap, const wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); __ms_va_end(ap); @@ -864,7 +864,7 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlpe(int flags, const MSVCRT_wchar_t* name, MSVCRT_intptr_t WINAPIV MSVCRT__spawnlpe(int flags, const char* name, const char* arg0, ...) { __ms_va_list ap; - MSVCRT_wchar_t *nameW, *args, *envs = NULL; + wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; @@ -897,7 +897,7 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnlpe(int flags, const char* name, const char MSVCRT_intptr_t CDECL MSVCRT__spawnve(int flags, const char* name, const char* const* argv, const char* const* envv) { - MSVCRT_wchar_t *nameW, *args, *envs; + wchar_t *nameW, *args, *envs; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; @@ -918,10 +918,10 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnve(int flags, const char* name, const char* c * * Unicode version of _spawnve */ -MSVCRT_intptr_t CDECL MSVCRT__wspawnve(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv, - const MSVCRT_wchar_t* const* envv) +MSVCRT_intptr_t CDECL MSVCRT__wspawnve(int flags, const wchar_t* name, const wchar_t* const* argv, + const wchar_t* const* envv) { - MSVCRT_wchar_t *args, *envs; + wchar_t *args, *envs; MSVCRT_intptr_t ret; args = msvcrt_argvtos(argv, ' '); @@ -950,7 +950,7 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnv(int flags, const char* name, const char* co * * Unicode version of _spawnv */ -MSVCRT_intptr_t CDECL MSVCRT__wspawnv(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv) +MSVCRT_intptr_t CDECL MSVCRT__wspawnv(int flags, const wchar_t* name, const wchar_t* const* argv) { return MSVCRT__wspawnve(flags, name, argv, NULL); } @@ -964,7 +964,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wspawnv(int flags, const MSVCRT_wchar_t* name, con MSVCRT_intptr_t CDECL MSVCRT__spawnvpe(int flags, const char* name, const char* const* argv, const char* const* envv) { - MSVCRT_wchar_t *nameW, *args, *envs; + wchar_t *nameW, *args, *envs; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; @@ -985,10 +985,10 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnvpe(int flags, const char* name, const char* * * Unicode version of _spawnvpe */ -MSVCRT_intptr_t CDECL MSVCRT__wspawnvpe(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv, - const MSVCRT_wchar_t* const* envv) +MSVCRT_intptr_t CDECL MSVCRT__wspawnvpe(int flags, const wchar_t* name, const wchar_t* const* argv, + const wchar_t* const* envv) { - MSVCRT_wchar_t *args, *envs; + wchar_t *args, *envs; MSVCRT_intptr_t ret; args = msvcrt_argvtos(argv, ' '); @@ -1017,7 +1017,7 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnvp(int flags, const char* name, const char* c * * Unicode version of _spawnvp */ -MSVCRT_intptr_t CDECL MSVCRT__wspawnvp(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* const* argv) +MSVCRT_intptr_t CDECL MSVCRT__wspawnvp(int flags, const wchar_t* name, const wchar_t* const* argv) { return MSVCRT__wspawnvpe(flags, name, argv, NULL); } @@ -1038,15 +1038,15 @@ void msvcrt_free_popen_data(void) * * Unicode version of _popen */ -MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wchar_t* mode) +MSVCRT_FILE* CDECL MSVCRT__wpopen(const wchar_t* command, const wchar_t* mode) { MSVCRT_FILE *ret; BOOL readPipe = TRUE; int textmode, fds[2], fdToDup, fdToOpen, fdStdHandle = -1; - const MSVCRT_wchar_t *p; - MSVCRT_wchar_t *comspec, *fullcmd; + const wchar_t *p; + wchar_t *comspec, *fullcmd; unsigned int len; - static const MSVCRT_wchar_t flag[] = {' ','/','c',' ',0}; + static const wchar_t flag[] = {' ','/','c',' ',0}; struct popen_handle *container; DWORD i; @@ -1111,7 +1111,7 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc if (!(comspec = msvcrt_get_comspec())) goto error; len = MSVCRT_wcslen(comspec) + MSVCRT_wcslen(flag) + MSVCRT_wcslen(command) + 1; - if (!(fullcmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(MSVCRT_wchar_t)))) + if (!(fullcmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(wchar_t)))) { HeapFree(GetProcessHeap(), 0, comspec); goto error; @@ -1155,7 +1155,7 @@ error: MSVCRT_FILE* CDECL MSVCRT__popen(const char* command, const char* mode) { MSVCRT_FILE *ret; - MSVCRT_wchar_t *cmdW, *modeW; + wchar_t *cmdW, *modeW; TRACE("(command=%s, mode=%s)\n", debugstr_a(command), debugstr_a(mode)); @@ -1220,12 +1220,12 @@ int CDECL MSVCRT__pclose(MSVCRT_FILE* file) * * Unicode version of system */ -int CDECL _wsystem(const MSVCRT_wchar_t* cmd) +int CDECL _wsystem(const wchar_t* cmd) { int res; - MSVCRT_wchar_t *comspec, *fullcmd; + wchar_t *comspec, *fullcmd; unsigned int len; - static const MSVCRT_wchar_t flag[] = {' ','/','c',' ',0}; + static const wchar_t flag[] = {' ','/','c',' ',0}; comspec = msvcrt_get_comspec(); @@ -1245,7 +1245,7 @@ int CDECL _wsystem(const MSVCRT_wchar_t* cmd) len = MSVCRT_wcslen(comspec) + MSVCRT_wcslen(flag) + MSVCRT_wcslen(cmd) + 1; - if (!(fullcmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(MSVCRT_wchar_t)))) + if (!(fullcmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(wchar_t)))) { HeapFree(GetProcessHeap(), 0, comspec); return -1; @@ -1267,7 +1267,7 @@ int CDECL _wsystem(const MSVCRT_wchar_t* cmd) int CDECL MSVCRT_system(const char* cmd) { int res = -1; - MSVCRT_wchar_t *cmdW; + wchar_t *cmdW; if (cmd == NULL) return _wsystem(NULL); diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c index 19743c60d00..2e5b9d1afb2 100644 --- a/dlls/msvcrt/scanf.c +++ b/dlls/msvcrt/scanf.c @@ -49,7 +49,7 @@ static int char2digit(char c, int base) { /* helper function for *wscanf. Returns the value of character c in the * given base, or -1 if the given character is not a digit of the base. */ -static int wchar2digit(MSVCRT_wchar_t c, int base) { +static int wchar2digit(wchar_t c, int base) { if ((c>='0') && (c<='9') && (c<='0'+base-1)) return (c-'0'); if (base<=10) return -1; if ((c>='A') && (c<='Z') && (c<='A'+base-11)) return (c-'A'+10); @@ -260,7 +260,7 @@ int WINAPIV MSVCRT__scanf_s_l(const char *format, _locale_t locale, ...) /********************************************************************* * fwscanf (MSVCRT.@) */ -int WINAPIV MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_fwscanf(MSVCRT_FILE *file, const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -274,7 +274,7 @@ int WINAPIV MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...) /********************************************************************* * _fwscanf_l (MSVCRT.@) */ -int WINAPIV MSVCRT__fwscanf_l(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT__fwscanf_l(MSVCRT_FILE *file, const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; @@ -289,7 +289,7 @@ int WINAPIV MSVCRT__fwscanf_l(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, /********************************************************************* * fwscanf_s (MSVCRT.@) */ -int WINAPIV MSVCRT_fwscanf_s(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_fwscanf_s(MSVCRT_FILE *file, const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -303,7 +303,7 @@ int WINAPIV MSVCRT_fwscanf_s(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, .. /********************************************************************* * _fwscanf_s_l (MSVCRT.@) */ -int WINAPIV MSVCRT__fwscanf_s_l(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT__fwscanf_s_l(MSVCRT_FILE *file, const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; @@ -318,7 +318,7 @@ int WINAPIV MSVCRT__fwscanf_s_l(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, /********************************************************************* * wscanf (MSVCRT.@) */ -int WINAPIV MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_wscanf(const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -332,7 +332,7 @@ int WINAPIV MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...) /********************************************************************* * _wscanf_l (MSVCRT.@) */ -int WINAPIV MSVCRT__wscanf_l(const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT__wscanf_l(const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; @@ -347,7 +347,7 @@ int WINAPIV MSVCRT__wscanf_l(const MSVCRT_wchar_t *format, /********************************************************************* * wscanf_s (MSVCRT.@) */ -int WINAPIV MSVCRT_wscanf_s(const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_wscanf_s(const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -361,7 +361,7 @@ int WINAPIV MSVCRT_wscanf_s(const MSVCRT_wchar_t *format, ...) /********************************************************************* * _wscanf_s_l (MSVCRT.@) */ -int WINAPIV MSVCRT__wscanf_s_l(const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT__wscanf_s_l(const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; @@ -434,7 +434,7 @@ int WINAPIV MSVCRT__sscanf_s_l(const char *str, const char *format, /********************************************************************* * swscanf (MSVCRT.@) */ -int WINAPIV MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_swscanf(const wchar_t *str, const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -448,7 +448,7 @@ int WINAPIV MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *form /********************************************************************* * _swscanf_l (MSVCRT.@) */ -int WINAPIV MSVCRT__swscanf_l(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT__swscanf_l(const wchar_t *str, const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; @@ -463,7 +463,7 @@ int WINAPIV MSVCRT__swscanf_l(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *f /********************************************************************* * swscanf_s (MSVCRT.@) */ -int WINAPIV MSVCRT_swscanf_s(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT_swscanf_s(const wchar_t *str, const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -477,7 +477,7 @@ int WINAPIV MSVCRT_swscanf_s(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *fo /********************************************************************* * _swscanf_s_l (MSVCRT.@) */ -int WINAPIV MSVCRT__swscanf_s_l(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT__swscanf_s_l(const wchar_t *str, const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; @@ -548,7 +548,7 @@ int WINAPIV _cscanf_s_l(const char *format, _locale_t locale, ...) /********************************************************************* * _cwscanf (MSVCRT.@) */ -int WINAPIV _cwscanf(const MSVCRT_wchar_t *format, ...) +int WINAPIV _cwscanf(const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -562,7 +562,7 @@ int WINAPIV _cwscanf(const MSVCRT_wchar_t *format, ...) /********************************************************************* * _cwscanf_l (MSVCRT.@) */ -int WINAPIV _cwscanf_l(const MSVCRT_wchar_t *format, _locale_t locale, ...) +int WINAPIV _cwscanf_l(const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; int res; @@ -576,7 +576,7 @@ int WINAPIV _cwscanf_l(const MSVCRT_wchar_t *format, _locale_t locale, ...) /********************************************************************* * _cwscanf_s (MSVCRT.@) */ -int WINAPIV _cwscanf_s(const MSVCRT_wchar_t *format, ...) +int WINAPIV _cwscanf_s(const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -590,7 +590,7 @@ int WINAPIV _cwscanf_s(const MSVCRT_wchar_t *format, ...) /********************************************************************* * _cwscanf_s_l (MSVCRT.@) */ -int WINAPIV _cwscanf_s_l(const MSVCRT_wchar_t *format, _locale_t locale, ...) +int WINAPIV _cwscanf_s_l(const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; int res; @@ -684,8 +684,8 @@ int CDECL MSVCRT__stdio_common_vsscanf(unsigned __int64 options, * __stdio_common_vswscanf (UCRTBASE.@) */ int CDECL MSVCRT__stdio_common_vswscanf(unsigned __int64 options, - const MSVCRT_wchar_t *input, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, + const wchar_t *input, MSVCRT_size_t length, + const wchar_t *format, _locale_t locale, __ms_va_list valist) { @@ -722,7 +722,7 @@ int CDECL MSVCRT__stdio_common_vfscanf(unsigned __int64 options, */ int CDECL MSVCRT__stdio_common_vfwscanf(unsigned __int64 options, MSVCRT_FILE *file, - const MSVCRT_wchar_t *format, + const wchar_t *format, _locale_t locale, __ms_va_list valist) { @@ -737,8 +737,8 @@ int CDECL MSVCRT__stdio_common_vfwscanf(unsigned __int64 options, /********************************************************************* * _snwscanf (MSVCRT.@) */ -int WINAPIV MSVCRT__snwscanf(MSVCRT_wchar_t *input, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT__snwscanf(wchar_t *input, MSVCRT_size_t length, + const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -752,8 +752,8 @@ int WINAPIV MSVCRT__snwscanf(MSVCRT_wchar_t *input, MSVCRT_size_t length, /********************************************************************* * _snwscanf_l (MSVCRT.@) */ -int WINAPIV MSVCRT__snwscanf_l(MSVCRT_wchar_t *input, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, _locale_t locale, ...) +int WINAPIV MSVCRT__snwscanf_l(wchar_t *input, MSVCRT_size_t length, + const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; int res; @@ -767,8 +767,8 @@ int WINAPIV MSVCRT__snwscanf_l(MSVCRT_wchar_t *input, MSVCRT_size_t length, /********************************************************************* * _snwscanf_s (MSVCRT.@) */ -int WINAPIV MSVCRT__snwscanf_s(MSVCRT_wchar_t *input, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT__snwscanf_s(wchar_t *input, MSVCRT_size_t length, + const wchar_t *format, ...) { __ms_va_list valist; int res; @@ -782,8 +782,8 @@ int WINAPIV MSVCRT__snwscanf_s(MSVCRT_wchar_t *input, MSVCRT_size_t length, /********************************************************************* * _snscanf_s_l (MSVCRT.@) */ -int WINAPIV MSVCRT__snwscanf_s_l(MSVCRT_wchar_t *input, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, _locale_t locale, ...) +int WINAPIV MSVCRT__snwscanf_s_l(wchar_t *input, MSVCRT_size_t length, + const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; int res; @@ -809,7 +809,7 @@ int CDECL MSVCRT_vsscanf(const char *buffer, const char *format, __ms_va_list va /********************************************************************* * vswscanf (MSVCRT120.@) */ -int CDECL MSVCRT_vswscanf(const MSVCRT_wchar_t *buffer, const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vswscanf(const wchar_t *buffer, const wchar_t *format, __ms_va_list valist) { if (!MSVCRT_CHECK_PMT(buffer != NULL && format != NULL)) return -1; diff --git a/dlls/msvcrt/scanf.h b/dlls/msvcrt/scanf.h index 64be13c6a33..9edbfb6ff68 100644 --- a/dlls/msvcrt/scanf.h +++ b/dlls/msvcrt/scanf.h @@ -24,7 +24,7 @@ */ #ifdef WIDE_SCANF -#define _CHAR_ MSVCRT_wchar_t +#define _CHAR_ wchar_t #define _EOF_ MSVCRT_WEOF #define _EOF_RET (short)MSVCRT_WEOF #define _ISSPACE_(c) MSVCRT_iswspace(c) @@ -52,9 +52,9 @@ #define _UNLOCK_FILE_(file) MSVCRT__unlock_file(MSVCRT_stdin) #ifdef WIDE_SCANF #ifdef SECURE -#define _FUNCTION_ static int MSVCRT_vcwscanf_s_l(const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vcwscanf_s_l(const wchar_t *format, _locale_t locale, __ms_va_list ap) #else /* SECURE */ -#define _FUNCTION_ static int MSVCRT_vcwscanf_l(const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vcwscanf_l(const wchar_t *format, _locale_t locale, __ms_va_list ap) #endif /* SECURE */ #else /* WIDE_SCANF */ #ifdef SECURE @@ -84,9 +84,9 @@ #define _UNLOCK_FILE_(file) do {} while(0) #ifdef WIDE_SCANF #ifdef SECURE -#define _FUNCTION_ static int MSVCRT_vsnwscanf_s_l(const MSVCRT_wchar_t *file, MSVCRT_size_t length, const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vsnwscanf_s_l(const wchar_t *file, MSVCRT_size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap) #else /* SECURE */ -#define _FUNCTION_ static int MSVCRT_vsnwscanf_l(const MSVCRT_wchar_t *file, MSVCRT_size_t length, const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vsnwscanf_l(const wchar_t *file, MSVCRT_size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap) #endif /* SECURE */ #else /* WIDE_SCANF */ #ifdef SECURE @@ -106,9 +106,9 @@ #define _UNLOCK_FILE_(file) do {} while(0) #ifdef WIDE_SCANF #ifdef SECURE -#define _FUNCTION_ static int MSVCRT_vswscanf_s_l(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vswscanf_s_l(const wchar_t *file, const wchar_t *format, _locale_t locale, __ms_va_list ap) #else /* SECURE */ -#define _FUNCTION_ static int MSVCRT_vswscanf_l(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vswscanf_l(const wchar_t *file, const wchar_t *format, _locale_t locale, __ms_va_list ap) #endif /* SECURE */ #else /* WIDE_SCANF */ #ifdef SECURE @@ -127,9 +127,9 @@ #define _LOCK_FILE_(file) MSVCRT__lock_file(file) #define _UNLOCK_FILE_(file) MSVCRT__unlock_file(file) #ifdef SECURE -#define _FUNCTION_ static int MSVCRT_vfwscanf_s_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vfwscanf_s_l(MSVCRT_FILE* file, const wchar_t *format, _locale_t locale, __ms_va_list ap) #else /* SECURE */ -#define _FUNCTION_ static int MSVCRT_vfwscanf_l(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list ap) +#define _FUNCTION_ static int MSVCRT_vfwscanf_l(MSVCRT_FILE* file, const wchar_t *format, _locale_t locale, __ms_va_list ap) #endif /* SECURE */ #else /* WIDE_SCANF */ #define _GETC_FUNC_(file) MSVCRT_fgetc(file) @@ -162,7 +162,7 @@ struct _STRTOD_NAME_(strtod_scanf_ctx) { BOOL err; }; -static MSVCRT_wchar_t _STRTOD_NAME_(strtod_scanf_get)(void *ctx) +static wchar_t _STRTOD_NAME_(strtod_scanf_get)(void *ctx) { struct _STRTOD_NAME_(strtod_scanf_ctx) *context = ctx; @@ -482,8 +482,8 @@ _FUNCTION_ { } break; widecharstring: { /* read a word into a wchar_t* */ - MSVCRT_wchar_t *sptr = suppress ? NULL : va_arg(ap, MSVCRT_wchar_t*); - MSVCRT_wchar_t *sptr_beg = sptr; + wchar_t *sptr = suppress ? NULL : va_arg(ap, wchar_t*); + wchar_t *sptr_beg = sptr; #ifdef SECURE unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned); #else @@ -563,8 +563,8 @@ _FUNCTION_ { } break; widecharacter: { /* read single character into a wchar_t */ - MSVCRT_wchar_t *str = suppress ? NULL : va_arg(ap, MSVCRT_wchar_t*); - MSVCRT_wchar_t *pstr = str; + wchar_t *str = suppress ? NULL : va_arg(ap, wchar_t*); + wchar_t *pstr = str; #ifdef SECURE unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned); #else diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 9c8ed35f266..ccf5613902a 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -606,12 +606,12 @@ static inline int hex2int(char c) return -1; } -static struct fpnum fpnum_parse16(MSVCRT_wchar_t get(void *ctx), void unget(void *ctx), +static struct fpnum fpnum_parse16(wchar_t get(void *ctx), void unget(void *ctx), void *ctx, int sign, pthreadlocinfo locinfo) { BOOL found_digit = FALSE, found_dp = FALSE; enum fpmod round = FP_ROUND_ZERO; - MSVCRT_wchar_t nch; + wchar_t nch; ULONGLONG m = 0; int val, exp = 0; @@ -737,19 +737,19 @@ static inline BOOL bnum_to_mant(struct bnum *b, ULONGLONG *m) return TRUE; } -static struct fpnum fpnum_parse_bnum(MSVCRT_wchar_t (*get)(void *ctx), void (*unget)(void *ctx), +static struct fpnum fpnum_parse_bnum(wchar_t (*get)(void *ctx), void (*unget)(void *ctx), void *ctx, pthreadlocinfo locinfo, BOOL ldouble, struct bnum *b) { #if _MSVCR_VER >= 140 - MSVCRT_wchar_t _infinity[] = { 'i', 'n', 'f', 'i', 'n', 'i', 't', 'y', 0 }; - MSVCRT_wchar_t _nan[] = { 'n', 'a', 'n', 0 }; - MSVCRT_wchar_t *str_match = NULL; + wchar_t _infinity[] = { 'i', 'n', 'f', 'i', 'n', 'i', 't', 'y', 0 }; + wchar_t _nan[] = { 'n', 'a', 'n', 0 }; + wchar_t *str_match = NULL; int matched=0; #endif BOOL found_digit = FALSE, found_dp = FALSE, found_sign = FALSE; int e2 = 0, dp=0, sign=1, off, limb_digits = 0, i; enum fpmod round = FP_ROUND_ZERO; - MSVCRT_wchar_t nch; + wchar_t nch; ULONGLONG m; nch = get(ctx); @@ -969,7 +969,7 @@ static struct fpnum fpnum_parse_bnum(MSVCRT_wchar_t (*get)(void *ctx), void (*un return fpnum(sign, e2, m, round); } -struct fpnum fpnum_parse(MSVCRT_wchar_t (*get)(void *ctx), void (*unget)(void *ctx), +struct fpnum fpnum_parse(wchar_t (*get)(void *ctx), void (*unget)(void *ctx), void *ctx, pthreadlocinfo locinfo, BOOL ldouble) { if(!ldouble) { @@ -987,7 +987,7 @@ struct fpnum fpnum_parse(MSVCRT_wchar_t (*get)(void *ctx), void (*unget)(void *c } } -static MSVCRT_wchar_t strtod_str_get(void *ctx) +static wchar_t strtod_str_get(void *ctx) { const char **p = ctx; if (!**p) return MSVCRT_WEOF; @@ -1930,12 +1930,12 @@ int CDECL MSVCRT__ltoa_s(MSVCRT_long value, char *str, MSVCRT_size_t size, int r /********************************************************************* * _ltow_s (MSVCRT.@) */ -int CDECL MSVCRT__ltow_s(MSVCRT_long value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix) +int CDECL MSVCRT__ltow_s(MSVCRT_long value, wchar_t *str, MSVCRT_size_t size, int radix) { MSVCRT_ulong val; unsigned int digit; BOOL is_negative; - MSVCRT_wchar_t buffer[33], *pos; + wchar_t buffer[33], *pos; size_t len; if (!MSVCRT_CHECK_PMT(str != NULL)) return MSVCRT_EINVAL; @@ -1979,7 +1979,7 @@ int CDECL MSVCRT__ltow_s(MSVCRT_long value, MSVCRT_wchar_t *str, MSVCRT_size_t s if (len > size) { size_t i; - MSVCRT_wchar_t *p = str; + wchar_t *p = str; /* Copy the temporary buffer backwards up to the available number of * characters. Don't copy the negative sign if present. */ @@ -1998,7 +1998,7 @@ int CDECL MSVCRT__ltow_s(MSVCRT_long value, MSVCRT_wchar_t *str, MSVCRT_size_t s return MSVCRT_ERANGE; } - memcpy(str, pos, len * sizeof(MSVCRT_wchar_t)); + memcpy(str, pos, len * sizeof(wchar_t)); return 0; } @@ -2021,7 +2021,7 @@ char* CDECL MSVCRT__itoa(int value, char *str, int radix) /********************************************************************* * _itow_s (MSVCRT.@) */ -int CDECL MSVCRT__itow_s(int value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix) +int CDECL MSVCRT__itow_s(int value, wchar_t *str, MSVCRT_size_t size, int radix) { return MSVCRT__ltow_s(value, str, size, radix); } @@ -2068,10 +2068,10 @@ int CDECL MSVCRT__ui64toa_s(unsigned __int64 value, char *str, /********************************************************************* * _ui64tow_s (MSVCRT.@) */ -int CDECL MSVCRT__ui64tow_s( unsigned __int64 value, MSVCRT_wchar_t *str, +int CDECL MSVCRT__ui64tow_s( unsigned __int64 value, wchar_t *str, MSVCRT_size_t size, int radix ) { - MSVCRT_wchar_t buffer[65], *pos; + wchar_t buffer[65], *pos; int digit; if (!MSVCRT_CHECK_PMT(str != NULL)) return MSVCRT_EINVAL; @@ -2099,7 +2099,7 @@ int CDECL MSVCRT__ui64tow_s( unsigned __int64 value, MSVCRT_wchar_t *str, return MSVCRT_EINVAL; } - memcpy(str, pos, (buffer-pos+65)*sizeof(MSVCRT_wchar_t)); + memcpy(str, pos, (buffer-pos+65)*sizeof(wchar_t)); return 0; } @@ -2160,7 +2160,7 @@ int CDECL MSVCRT__ultoa_s(MSVCRT_ulong value, char *str, MSVCRT_size_t size, int /********************************************************************* * _ultow_s (MSVCRT.@) */ -int CDECL MSVCRT__ultow_s(MSVCRT_ulong value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix) +int CDECL MSVCRT__ultow_s(MSVCRT_ulong value, wchar_t *str, MSVCRT_size_t size, int radix) { MSVCRT_ulong digit; WCHAR buffer[33], *pos; @@ -2207,7 +2207,7 @@ int CDECL MSVCRT__ultow_s(MSVCRT_ulong value, MSVCRT_wchar_t *str, MSVCRT_size_t return MSVCRT_ERANGE; } - memcpy(str, pos, len * sizeof(MSVCRT_wchar_t)); + memcpy(str, pos, len * sizeof(wchar_t)); return 0; } @@ -2289,12 +2289,12 @@ int CDECL MSVCRT__i64toa_s(__int64 value, char *str, MSVCRT_size_t size, int rad /********************************************************************* * _i64tow_s (MSVCRT.@) */ -int CDECL MSVCRT__i64tow_s(__int64 value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix) +int CDECL MSVCRT__i64tow_s(__int64 value, wchar_t *str, MSVCRT_size_t size, int radix) { unsigned __int64 val; unsigned int digit; BOOL is_negative; - MSVCRT_wchar_t buffer[65], *pos; + wchar_t buffer[65], *pos; size_t len; if (!MSVCRT_CHECK_PMT(str != NULL)) return MSVCRT_EINVAL; @@ -2338,7 +2338,7 @@ int CDECL MSVCRT__i64tow_s(__int64 value, MSVCRT_wchar_t *str, MSVCRT_size_t siz if (len > size) { size_t i; - MSVCRT_wchar_t *p = str; + wchar_t *p = str; /* Copy the temporary buffer backwards up to the available number of * characters. Don't copy the negative sign if present. */ @@ -2357,7 +2357,7 @@ int CDECL MSVCRT__i64tow_s(__int64 value, MSVCRT_wchar_t *str, MSVCRT_size_t siz return MSVCRT_ERANGE; } - memcpy(str, pos, len * sizeof(MSVCRT_wchar_t)); + memcpy(str, pos, len * sizeof(wchar_t)); return 0; } diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index f833dcf1ef8..56fabac74e7 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -623,7 +623,7 @@ int CDECL _strdate_s(char* date, MSVCRT_size_t size) /********************************************************************** * _wstrdate (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wstrdate(MSVCRT_wchar_t* date) +wchar_t* CDECL MSVCRT__wstrdate(wchar_t* date) { static const WCHAR format[] = { 'M','M','\'','/','\'','d','d','\'','/','\'','y','y',0 }; @@ -635,7 +635,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wstrdate(MSVCRT_wchar_t* date) /********************************************************************** * _wstrdate_s (MSVCRT.@) */ -int CDECL _wstrdate_s(MSVCRT_wchar_t* date, MSVCRT_size_t size) +int CDECL _wstrdate_s(wchar_t* date, MSVCRT_size_t size) { if(date && size) date[0] = '\0'; @@ -691,7 +691,7 @@ int CDECL _strtime_s(char* time, MSVCRT_size_t size) /********************************************************************* * _wstrtime (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wstrtime(MSVCRT_wchar_t* time) +wchar_t* CDECL MSVCRT__wstrtime(wchar_t* time) { static const WCHAR format[] = { 'H','H','\'',':','\'','m','m','\'',':','\'','s','s',0 }; @@ -703,7 +703,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wstrtime(MSVCRT_wchar_t* time) /********************************************************************* * _wstrtime_s (MSVCRT.@) */ -int CDECL _wstrtime_s(MSVCRT_wchar_t* time, MSVCRT_size_t size) +int CDECL _wstrtime_s(wchar_t* time, MSVCRT_size_t size) { if(time && size) time[0] = '\0'; @@ -963,7 +963,7 @@ char ** CDECL __p__tzname(void) #define STRFTIME_CHAR char #define STRFTIME_TD(td, name) td->str.names.name #else -#define STRFTIME_CHAR MSVCRT_wchar_t +#define STRFTIME_CHAR wchar_t #define STRFTIME_TD(td, name) td->wstr.names.name #endif @@ -1549,7 +1549,7 @@ static MSVCRT_size_t strftime_helper(char *str, MSVCRT_size_t max, const char *f TRACE("(%p %Iu %s %p %p %p)\n", str, max, format, mstm, time_data, loc); return strftime_impl(str, max, format, mstm, time_data, loc); #else - MSVCRT_wchar_t *s, *fmt; + wchar_t *s, *fmt; MSVCRT_size_t len; TRACE("(%p %Iu %s %p %p %p)\n", str, max, format, mstm, time_data, loc); @@ -1560,10 +1560,10 @@ static MSVCRT_size_t strftime_helper(char *str, MSVCRT_size_t max, const char *f if (!MSVCRT_CHECK_PMT(format != NULL)) return 0; len = MSVCRT__mbstowcs_l( NULL, format, 0, loc ) + 1; - if (!len || !(fmt = MSVCRT_malloc( len*sizeof(MSVCRT_wchar_t) ))) return 0; + if (!len || !(fmt = MSVCRT_malloc( len*sizeof(wchar_t) ))) return 0; MSVCRT__mbstowcs_l(fmt, format, len, loc); - if ((s = MSVCRT_malloc( max*sizeof(MSVCRT_wchar_t) ))) + if ((s = MSVCRT_malloc( max*sizeof(wchar_t) ))) { len = strftime_impl( s, max, fmt, mstm, time_data, loc ); if (len) @@ -1606,8 +1606,8 @@ MSVCRT_size_t CDECL MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *f return strftime_helper(str, max, format, mstm, NULL, NULL); } -static MSVCRT_size_t wcsftime_helper( MSVCRT_wchar_t *str, MSVCRT_size_t max, - const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm, +static MSVCRT_size_t wcsftime_helper( wchar_t *str, MSVCRT_size_t max, + const wchar_t *format, const struct MSVCRT_tm *mstm, __lc_time_data *time_data, _locale_t loc ) { #if _MSVCR_VER <= 90 @@ -1639,8 +1639,8 @@ static MSVCRT_size_t wcsftime_helper( MSVCRT_wchar_t *str, MSVCRT_size_t max, /********************************************************************* * _wcsftime_l (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT__wcsftime_l( MSVCRT_wchar_t *str, MSVCRT_size_t max, - const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm, _locale_t loc ) +MSVCRT_size_t CDECL MSVCRT__wcsftime_l( wchar_t *str, MSVCRT_size_t max, + const wchar_t *format, const struct MSVCRT_tm *mstm, _locale_t loc ) { return wcsftime_helper(str, max, format, mstm, NULL, loc); } @@ -1648,8 +1648,8 @@ MSVCRT_size_t CDECL MSVCRT__wcsftime_l( MSVCRT_wchar_t *str, MSVCRT_size_t max, /********************************************************************* * wcsftime (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max, - const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm ) +MSVCRT_size_t CDECL MSVCRT_wcsftime( wchar_t *str, MSVCRT_size_t max, + const wchar_t *format, const struct MSVCRT_tm *mstm ) { return wcsftime_helper(str, max, format, mstm, NULL, NULL); } @@ -1658,8 +1658,8 @@ MSVCRT_size_t CDECL MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max, /********************************************************************* * _Wcsftime (MSVCR110.@) */ -MSVCRT_size_t CDECL _Wcsftime(MSVCRT_wchar_t *str, MSVCRT_size_t max, - const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm, +MSVCRT_size_t CDECL _Wcsftime(wchar_t *str, MSVCRT_size_t max, + const wchar_t *format, const struct MSVCRT_tm *mstm, __lc_time_data *time_data) { return wcsftime_helper(str, max, format, mstm, time_data, NULL); @@ -1740,13 +1740,13 @@ int CDECL MSVCRT_asctime_s(char* time, MSVCRT_size_t size, const struct MSVCRT_t /********************************************************************* * _wasctime (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm) +wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm) { thread_data_t *data = msvcrt_get_thread_data(); char buffer[26]; if(!data->wasctime_buffer) { - data->wasctime_buffer = MSVCRT_malloc(26*sizeof(MSVCRT_wchar_t)); + data->wasctime_buffer = MSVCRT_malloc(26*sizeof(wchar_t)); if(!data->wasctime_buffer) { *MSVCRT__errno() = MSVCRT_ENOMEM; return NULL; @@ -1763,7 +1763,7 @@ MSVCRT_wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm) /********************************************************************* * _wasctime_s (MSVCRT.@) */ -int CDECL MSVCRT__wasctime_s(MSVCRT_wchar_t* time, MSVCRT_size_t size, const struct MSVCRT_tm *mstm) +int CDECL MSVCRT__wasctime_s(wchar_t* time, MSVCRT_size_t size, const struct MSVCRT_tm *mstm) { char buffer[26]; int ret; @@ -1856,7 +1856,7 @@ char * CDECL MSVCRT_ctime(const MSVCRT___time32_t *time) /********************************************************************* * _wctime64 (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT__wctime64(const MSVCRT___time64_t *time) +wchar_t * CDECL MSVCRT__wctime64(const MSVCRT___time64_t *time) { return MSVCRT__wasctime( MSVCRT__localtime64(time) ); } @@ -1864,7 +1864,7 @@ MSVCRT_wchar_t * CDECL MSVCRT__wctime64(const MSVCRT___time64_t *time) /********************************************************************* * _wctime32 (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT__wctime32(const MSVCRT___time32_t *time) +wchar_t * CDECL MSVCRT__wctime32(const MSVCRT___time32_t *time) { return MSVCRT__wasctime( MSVCRT__localtime32(time) ); } @@ -1873,12 +1873,12 @@ MSVCRT_wchar_t * CDECL MSVCRT__wctime32(const MSVCRT___time32_t *time) * _wctime (MSVCRT.@) */ #ifdef _WIN64 -MSVCRT_wchar_t * CDECL MSVCRT__wctime(const MSVCRT___time64_t *time) +wchar_t * CDECL MSVCRT__wctime(const MSVCRT___time64_t *time) { return MSVCRT__wctime64( time ); } #else -MSVCRT_wchar_t * CDECL MSVCRT__wctime(const MSVCRT___time32_t *time) +wchar_t * CDECL MSVCRT__wctime(const MSVCRT___time32_t *time) { return MSVCRT__wctime32( time ); } @@ -1887,7 +1887,7 @@ MSVCRT_wchar_t * CDECL MSVCRT__wctime(const MSVCRT___time32_t *time) /********************************************************************* * _wctime64_s (MSVCRT.@) */ -int CDECL MSVCRT__wctime64_s(MSVCRT_wchar_t *buf, +int CDECL MSVCRT__wctime64_s(wchar_t *buf, MSVCRT_size_t size, const MSVCRT___time64_t *time) { struct MSVCRT_tm tm; @@ -1910,7 +1910,7 @@ int CDECL MSVCRT__wctime64_s(MSVCRT_wchar_t *buf, /********************************************************************* * _wctime32_s (MSVCRT.@) */ -int CDECL MSVCRT__wctime32_s(MSVCRT_wchar_t *buf, MSVCRT_size_t size, +int CDECL MSVCRT__wctime32_s(wchar_t *buf, MSVCRT_size_t size, const MSVCRT___time32_t *time) { struct MSVCRT_tm tm; diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 54886ac5b64..e87bcb544e3 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -73,12 +73,12 @@ int CDECL MSVCRT__set_printf_count_output( int enable ) /********************************************************************* * _wcsdup (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcsdup( const MSVCRT_wchar_t* str ) +wchar_t* CDECL MSVCRT__wcsdup( const wchar_t* str ) { - MSVCRT_wchar_t* ret = NULL; + wchar_t* ret = NULL; if (str) { - int size = (MSVCRT_wcslen(str) + 1) * sizeof(MSVCRT_wchar_t); + int size = (MSVCRT_wcslen(str) + 1) * sizeof(wchar_t); ret = MSVCRT_malloc( size ); if (ret) memcpy( ret, str, size ); } @@ -91,7 +91,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsdup( const MSVCRT_wchar_t* str ) int CDECL MSVCRT__towlower_l(MSVCRT_wint_t c, _locale_t locale) { pthreadlocinfo locinfo; - MSVCRT_wchar_t ret; + wchar_t ret; if(!locale) locinfo = get_locinfo(); @@ -117,10 +117,10 @@ int CDECL MSVCRT_towlower(MSVCRT_wint_t c) return MSVCRT__towlower_l(c, NULL); } -INT CDECL MSVCRT__wcsicmp_l(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2, _locale_t locale) +INT CDECL MSVCRT__wcsicmp_l(const wchar_t *str1, const wchar_t *str2, _locale_t locale) { _locale_tstruct tmp = {0}; - MSVCRT_wchar_t c1, c2; + wchar_t c1, c2; if(!MSVCRT_CHECK_PMT(str1 != NULL) || !MSVCRT_CHECK_PMT(str2 != NULL)) return MSVCRT__NLSCMPERROR; @@ -151,7 +151,7 @@ wint_t CDECL towctrans(wint_t c, wctrans_t category) /********************************************************************* * _wcsicmp (MSVCRT.@) */ -INT CDECL MSVCRT__wcsicmp( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 ) +INT CDECL MSVCRT__wcsicmp( const wchar_t* str1, const wchar_t* str2 ) { return MSVCRT__wcsicmp_l(str1, str2, NULL); } @@ -159,11 +159,11 @@ INT CDECL MSVCRT__wcsicmp( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str /********************************************************************* * _wcsnicmp_l (MSVCRT.@) */ -INT CDECL MSVCRT__wcsnicmp_l(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2, +INT CDECL MSVCRT__wcsnicmp_l(const wchar_t *str1, const wchar_t *str2, MSVCRT_size_t n, _locale_t locale) { _locale_tstruct tmp = {0}; - MSVCRT_wchar_t c1, c2; + wchar_t c1, c2; if (!n) return 0; @@ -187,7 +187,7 @@ INT CDECL MSVCRT__wcsnicmp_l(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *s /********************************************************************* * _wcsnicmp (MSVCRT.@) */ -INT CDECL MSVCRT__wcsnicmp(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2, MSVCRT_size_t n) +INT CDECL MSVCRT__wcsnicmp(const wchar_t *str1, const wchar_t *str2, MSVCRT_size_t n) { return MSVCRT__wcsnicmp_l(str1, str2, n, NULL); } @@ -195,7 +195,7 @@ INT CDECL MSVCRT__wcsnicmp(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str /********************************************************************* * _wcsicoll_l (MSVCRT.@) */ -int CDECL MSVCRT__wcsicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, _locale_t locale) +int CDECL MSVCRT__wcsicoll_l(const wchar_t* str1, const wchar_t* str2, _locale_t locale) { pthreadlocinfo locinfo; @@ -206,7 +206,7 @@ int CDECL MSVCRT__wcsicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* s if(!locinfo->lc_handle[MSVCRT_LC_COLLATE]) { - MSVCRT_wchar_t c1, c2; + wchar_t c1, c2; do { @@ -228,7 +228,7 @@ int CDECL MSVCRT__wcsicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* s /********************************************************************* * _wcsicoll (MSVCRT.@) */ -INT CDECL MSVCRT__wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 ) +INT CDECL MSVCRT__wcsicoll( const wchar_t* str1, const wchar_t* str2 ) { return MSVCRT__wcsicoll_l(str1, str2, NULL); } @@ -236,7 +236,7 @@ INT CDECL MSVCRT__wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* st /********************************************************************* * _wcsnicoll_l (MSVCRT.@) */ -int CDECL MSVCRT__wcsnicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, +int CDECL MSVCRT__wcsnicoll_l(const wchar_t* str1, const wchar_t* str2, MSVCRT_size_t count, _locale_t locale) { pthreadlocinfo locinfo; @@ -248,7 +248,7 @@ int CDECL MSVCRT__wcsnicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* if(!locinfo->lc_handle[MSVCRT_LC_COLLATE]) { - MSVCRT_wchar_t c1, c2; + wchar_t c1, c2; if (!count) return 0; @@ -274,7 +274,7 @@ int CDECL MSVCRT__wcsnicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* /********************************************************************* * _wcsnicoll (MSVCRT.@) */ -INT CDECL MSVCRT__wcsnicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, MSVCRT_size_t count ) +INT CDECL MSVCRT__wcsnicoll( const wchar_t* str1, const wchar_t* str2, MSVCRT_size_t count ) { return MSVCRT__wcsnicoll_l(str1, str2, count, NULL); } @@ -282,9 +282,9 @@ INT CDECL MSVCRT__wcsnicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* s /********************************************************************* * _wcsnset (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MSVCRT_size_t n ) +wchar_t* CDECL MSVCRT__wcsnset( wchar_t* str, wchar_t c, MSVCRT_size_t n ) { - MSVCRT_wchar_t* ret = str; + wchar_t* ret = str; while ((n-- > 0) && *str) *str++ = c; return ret; } @@ -292,7 +292,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MS /********************************************************************* * _wcsnset_s (MSVCRT.@) */ -int CDECL MSVCRT__wcsnset_s( MSVCRT_wchar_t *str, MSVCRT_size_t size, MSVCRT_wchar_t c, MSVCRT_size_t count ) +int CDECL MSVCRT__wcsnset_s( wchar_t *str, MSVCRT_size_t size, wchar_t c, MSVCRT_size_t count ) { MSVCRT_size_t i; @@ -316,13 +316,13 @@ int CDECL MSVCRT__wcsnset_s( MSVCRT_wchar_t *str, MSVCRT_size_t size, MSVCRT_wch /********************************************************************* * _wcsrev (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcsrev( MSVCRT_wchar_t* str ) +wchar_t* CDECL MSVCRT__wcsrev( wchar_t* str ) { - MSVCRT_wchar_t* ret = str; - MSVCRT_wchar_t* end = str + MSVCRT_wcslen(str) - 1; + wchar_t* ret = str; + wchar_t* end = str + MSVCRT_wcslen(str) - 1; while (end > str) { - MSVCRT_wchar_t t = *end; + wchar_t t = *end; *end-- = *str; *str++ = t; } @@ -332,9 +332,9 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsrev( MSVCRT_wchar_t* str ) /********************************************************************* * _wcsset_s (MSVCRT.@) */ -int CDECL MSVCRT__wcsset_s( MSVCRT_wchar_t *str, MSVCRT_size_t n, MSVCRT_wchar_t c ) +int CDECL MSVCRT__wcsset_s( wchar_t *str, MSVCRT_size_t n, wchar_t c ) { - MSVCRT_wchar_t *p = str; + wchar_t *p = str; if(!MSVCRT_CHECK_PMT(str != NULL)) return MSVCRT_EINVAL; if(!MSVCRT_CHECK_PMT(n)) return MSVCRT_EINVAL; @@ -352,9 +352,9 @@ int CDECL MSVCRT__wcsset_s( MSVCRT_wchar_t *str, MSVCRT_size_t n, MSVCRT_wchar_t /********************************************************************* * _wcsset (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcsset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c ) +wchar_t* CDECL MSVCRT__wcsset( wchar_t* str, wchar_t c ) { - MSVCRT_wchar_t* ret = str; + wchar_t* ret = str; while (*str) *str++ = c; return ret; } @@ -362,11 +362,11 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c ) /****************************************************************** * _wcsupr_s_l (MSVCRT.@) */ -int CDECL MSVCRT__wcsupr_s_l( MSVCRT_wchar_t* str, MSVCRT_size_t n, +int CDECL MSVCRT__wcsupr_s_l( wchar_t* str, MSVCRT_size_t n, _locale_t locale ) { _locale_tstruct tmp = {0}; - MSVCRT_wchar_t* ptr = str; + wchar_t* ptr = str; if (!str || !n) { @@ -402,7 +402,7 @@ int CDECL MSVCRT__wcsupr_s_l( MSVCRT_wchar_t* str, MSVCRT_size_t n, * _wcsupr_s (MSVCRT.@) * */ -INT CDECL MSVCRT__wcsupr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) +INT CDECL MSVCRT__wcsupr_s( wchar_t* str, MSVCRT_size_t n ) { return MSVCRT__wcsupr_s_l( str, n, NULL ); } @@ -410,7 +410,7 @@ INT CDECL MSVCRT__wcsupr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) /****************************************************************** * _wcsupr_l (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcsupr_l( MSVCRT_wchar_t *str, _locale_t locale ) +wchar_t* CDECL MSVCRT__wcsupr_l( wchar_t *str, _locale_t locale ) { MSVCRT__wcsupr_s_l( str, -1, locale); return str; @@ -419,7 +419,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsupr_l( MSVCRT_wchar_t *str, _locale_t locale ) /****************************************************************** * _wcsupr (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcsupr( MSVCRT_wchar_t *str ) +wchar_t* CDECL MSVCRT__wcsupr( wchar_t *str ) { return MSVCRT__wcsupr_l(str, NULL); } @@ -427,10 +427,10 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsupr( MSVCRT_wchar_t *str ) /****************************************************************** * _wcslwr_s_l (MSVCRT.@) */ -int CDECL MSVCRT__wcslwr_s_l( MSVCRT_wchar_t* str, MSVCRT_size_t n, _locale_t locale ) +int CDECL MSVCRT__wcslwr_s_l( wchar_t* str, MSVCRT_size_t n, _locale_t locale ) { _locale_tstruct tmp = {0}; - MSVCRT_wchar_t* ptr = str; + wchar_t* ptr = str; if (!str || !n) { @@ -465,7 +465,7 @@ int CDECL MSVCRT__wcslwr_s_l( MSVCRT_wchar_t* str, MSVCRT_size_t n, _locale_t lo /****************************************************************** * _wcslwr_s (MSVCRT.@) */ -int CDECL MSVCRT__wcslwr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) +int CDECL MSVCRT__wcslwr_s( wchar_t* str, MSVCRT_size_t n ) { return MSVCRT__wcslwr_s_l(str, n, NULL); } @@ -473,7 +473,7 @@ int CDECL MSVCRT__wcslwr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n ) /****************************************************************** * _wcslwr_l (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcslwr_l( MSVCRT_wchar_t* str, _locale_t locale ) +wchar_t* CDECL MSVCRT__wcslwr_l( wchar_t* str, _locale_t locale ) { MSVCRT__wcslwr_s_l(str, -1, locale); return str; @@ -482,7 +482,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcslwr_l( MSVCRT_wchar_t* str, _locale_t locale ) /****************************************************************** * _wcslwr (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT__wcslwr( MSVCRT_wchar_t* str ) +wchar_t* CDECL MSVCRT__wcslwr( wchar_t* str ) { MSVCRT__wcslwr_s_l(str, -1, NULL); return str; @@ -491,7 +491,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcslwr( MSVCRT_wchar_t* str ) /********************************************************************* * wcsncmp (MSVCRT.@) */ -int CDECL MSVCRT_wcsncmp(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2, MSVCRT_size_t n) +int CDECL MSVCRT_wcsncmp(const wchar_t *str1, const wchar_t *str2, MSVCRT_size_t n) { if (!n) return 0; @@ -506,7 +506,7 @@ int CDECL MSVCRT_wcsncmp(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2, /********************************************************************* * _wcsncoll_l (MSVCRT.@) */ -int CDECL MSVCRT__wcsncoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, +int CDECL MSVCRT__wcsncoll_l(const wchar_t* str1, const wchar_t* str2, MSVCRT_size_t count, _locale_t locale) { pthreadlocinfo locinfo; @@ -526,32 +526,32 @@ int CDECL MSVCRT__wcsncoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* s /********************************************************************* * _wcsncoll (MSVCRT.@) */ -int CDECL MSVCRT__wcsncoll(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, MSVCRT_size_t count) +int CDECL MSVCRT__wcsncoll(const wchar_t* str1, const wchar_t* str2, MSVCRT_size_t count) { return MSVCRT__wcsncoll_l(str1, str2, count, NULL); } -static MSVCRT_wchar_t strtod_wstr_get(void *ctx) +static wchar_t strtod_wstr_get(void *ctx) { - const MSVCRT_wchar_t **p = ctx; + const wchar_t **p = ctx; if (!**p) return MSVCRT_WEOF; return *(*p)++; } static void strtod_wstr_unget(void *ctx) { - const MSVCRT_wchar_t **p = ctx; + const wchar_t **p = ctx; (*p)--; } /********************************************************************* * _wcstod_l (MSVCRT.@) */ -double CDECL MSVCRT__wcstod_l(const MSVCRT_wchar_t* str, MSVCRT_wchar_t** end, +double CDECL MSVCRT__wcstod_l(const wchar_t* str, wchar_t** end, _locale_t locale) { pthreadlocinfo locinfo; - const MSVCRT_wchar_t *beg, *p; + const wchar_t *beg, *p; struct fpnum fp; double ret; int err; @@ -572,7 +572,7 @@ double CDECL MSVCRT__wcstod_l(const MSVCRT_wchar_t* str, MSVCRT_wchar_t** end, beg = p; fp = fpnum_parse(strtod_wstr_get, strtod_wstr_unget, &p, locinfo, FALSE); - if (end) *end = (p == beg ? (MSVCRT_wchar_t*)str : (MSVCRT_wchar_t*)p); + if (end) *end = (p == beg ? (wchar_t*)str : (wchar_t*)p); err = fpnum_double(&fp, &ret); if(err) *MSVCRT__errno() = err; @@ -582,7 +582,7 @@ double CDECL MSVCRT__wcstod_l(const MSVCRT_wchar_t* str, MSVCRT_wchar_t** end, /********************************************************************* * wcsrtombs_l (INTERNAL) */ -static MSVCRT_size_t MSVCRT_wcsrtombs_l(char *mbstr, const MSVCRT_wchar_t **wcstr, +static MSVCRT_size_t MSVCRT_wcsrtombs_l(char *mbstr, const wchar_t **wcstr, MSVCRT_size_t count, _locale_t locale) { pthreadlocinfo locinfo; @@ -653,7 +653,7 @@ static MSVCRT_size_t MSVCRT_wcsrtombs_l(char *mbstr, const MSVCRT_wchar_t **wcst /********************************************************************* * _wcstombs_l (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT__wcstombs_l(char *mbstr, const MSVCRT_wchar_t *wcstr, +MSVCRT_size_t CDECL MSVCRT__wcstombs_l(char *mbstr, const wchar_t *wcstr, MSVCRT_size_t count, _locale_t locale) { return MSVCRT_wcsrtombs_l(mbstr, &wcstr, count, locale); @@ -662,7 +662,7 @@ MSVCRT_size_t CDECL MSVCRT__wcstombs_l(char *mbstr, const MSVCRT_wchar_t *wcstr, /********************************************************************* * wcstombs (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_wcstombs(char *mbstr, const MSVCRT_wchar_t *wcstr, +MSVCRT_size_t CDECL MSVCRT_wcstombs(char *mbstr, const wchar_t *wcstr, MSVCRT_size_t count) { return MSVCRT_wcsrtombs_l(mbstr, &wcstr, count, NULL); @@ -671,7 +671,7 @@ MSVCRT_size_t CDECL MSVCRT_wcstombs(char *mbstr, const MSVCRT_wchar_t *wcstr, /********************************************************************* * wcsrtombs (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_wcsrtombs(char *mbstr, const MSVCRT_wchar_t **wcstr, +MSVCRT_size_t CDECL MSVCRT_wcsrtombs(char *mbstr, const wchar_t **wcstr, MSVCRT_size_t count, MSVCRT_mbstate_t *mbstate) { if(mbstate) @@ -684,7 +684,7 @@ MSVCRT_size_t CDECL MSVCRT_wcsrtombs(char *mbstr, const MSVCRT_wchar_t **wcstr, * MSVCRT_wcsrtombs_s_l (INTERNAL) */ static int MSVCRT_wcsrtombs_s_l(MSVCRT_size_t *ret, char *mbstr, - MSVCRT_size_t size, const MSVCRT_wchar_t **wcstr, + MSVCRT_size_t size, const wchar_t **wcstr, MSVCRT_size_t count, _locale_t locale) { MSVCRT_size_t conv; @@ -739,7 +739,7 @@ static int MSVCRT_wcsrtombs_s_l(MSVCRT_size_t *ret, char *mbstr, * _wcstombs_s_l (MSVCRT.@) */ int CDECL MSVCRT__wcstombs_s_l(MSVCRT_size_t *ret, char *mbstr, - MSVCRT_size_t size, const MSVCRT_wchar_t *wcstr, + MSVCRT_size_t size, const wchar_t *wcstr, MSVCRT_size_t count, _locale_t locale) { return MSVCRT_wcsrtombs_s_l(ret, mbstr, size, &wcstr,count, locale); @@ -749,7 +749,7 @@ int CDECL MSVCRT__wcstombs_s_l(MSVCRT_size_t *ret, char *mbstr, * wcstombs_s (MSVCRT.@) */ int CDECL MSVCRT_wcstombs_s(MSVCRT_size_t *ret, char *mbstr, - MSVCRT_size_t size, const MSVCRT_wchar_t *wcstr, MSVCRT_size_t count) + MSVCRT_size_t size, const wchar_t *wcstr, MSVCRT_size_t count) { return MSVCRT_wcsrtombs_s_l(ret, mbstr, size, &wcstr, count, NULL); } @@ -758,7 +758,7 @@ int CDECL MSVCRT_wcstombs_s(MSVCRT_size_t *ret, char *mbstr, * wcsrtombs_s (MSVCRT.@) */ int CDECL MSVCRT_wcsrtombs_s(MSVCRT_size_t *ret, char *mbstr, MSVCRT_size_t size, - const MSVCRT_wchar_t **wcstr, MSVCRT_size_t count, MSVCRT_mbstate_t *mbstate) + const wchar_t **wcstr, MSVCRT_size_t count, MSVCRT_mbstate_t *mbstate) { if(mbstate) *mbstate = 0; @@ -769,7 +769,7 @@ int CDECL MSVCRT_wcsrtombs_s(MSVCRT_size_t *ret, char *mbstr, MSVCRT_size_t size /********************************************************************* * wcstod (MSVCRT.@) */ -double CDECL MSVCRT_wcstod(const MSVCRT_wchar_t* lpszStr, MSVCRT_wchar_t** end) +double CDECL MSVCRT_wcstod(const wchar_t* lpszStr, wchar_t** end) { return MSVCRT__wcstod_l(lpszStr, end, NULL); } @@ -777,7 +777,7 @@ double CDECL MSVCRT_wcstod(const MSVCRT_wchar_t* lpszStr, MSVCRT_wchar_t** end) /********************************************************************* * _wtof (MSVCRT.@) */ -double CDECL MSVCRT__wtof(const MSVCRT_wchar_t *str) +double CDECL MSVCRT__wtof(const wchar_t *str) { return MSVCRT__wcstod_l(str, NULL, NULL); } @@ -785,7 +785,7 @@ double CDECL MSVCRT__wtof(const MSVCRT_wchar_t *str) /********************************************************************* * _wtof_l (MSVCRT.@) */ -double CDECL MSVCRT__wtof_l(const MSVCRT_wchar_t *str, _locale_t locale) +double CDECL MSVCRT__wtof_l(const wchar_t *str, _locale_t locale) { return MSVCRT__wcstod_l(str, NULL, locale); } @@ -795,7 +795,7 @@ double CDECL MSVCRT__wtof_l(const MSVCRT_wchar_t *str, _locale_t locale) /********************************************************************* * _wcstof_l (MSVCR120.@) */ -float CDECL MSVCRT__wcstof_l( const MSVCRT_wchar_t *str, MSVCRT_wchar_t **end, _locale_t locale ) +float CDECL MSVCRT__wcstof_l( const wchar_t *str, wchar_t **end, _locale_t locale ) { return MSVCRT__wcstod_l(str, end, locale); } @@ -803,7 +803,7 @@ float CDECL MSVCRT__wcstof_l( const MSVCRT_wchar_t *str, MSVCRT_wchar_t **end, _ /********************************************************************* * wcstof (MSVCR120.@) */ -float CDECL MSVCRT_wcstof( const MSVCRT_wchar_t *str, MSVCRT_wchar_t **end ) +float CDECL MSVCRT_wcstof( const wchar_t *str, wchar_t **end ) { return MSVCRT__wcstof_l(str, end, NULL); } @@ -983,11 +983,11 @@ static int CDECL MSVCRT_vsnprintf_s_l_opt( char *str, MSVCRT_size_t sizeOfBuffer return ret; } -static int MSVCRT_vsnwprintf_s_l_opt( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, - MSVCRT_size_t count, const MSVCRT_wchar_t *format, DWORD options, +static int MSVCRT_vsnwprintf_s_l_opt( wchar_t *str, MSVCRT_size_t sizeOfBuffer, + MSVCRT_size_t count, const wchar_t *format, DWORD options, _locale_t locale, __ms_va_list valist) { - static const MSVCRT_wchar_t nullbyte = '\0'; + static const wchar_t nullbyte = '\0'; struct _str_ctx_w ctx; int len, ret; @@ -1004,7 +1004,7 @@ static int MSVCRT_vsnwprintf_s_l_opt( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfB if(ret<0 || ret==len) { if(count!=MSVCRT__TRUNCATE && count>sizeOfBuffer) { MSVCRT_INVALID_PMT("str[sizeOfBuffer] is too small", MSVCRT_ERANGE); - memset(str, 0, sizeOfBuffer*sizeof(MSVCRT_wchar_t)); + memset(str, 0, sizeOfBuffer*sizeof(wchar_t)); } else str[len-1] = '\0'; @@ -1092,8 +1092,8 @@ int CDECL MSVCRT__stdio_common_vsnprintf_s( unsigned __int64 options, * __stdio_common_vsnwprintf_s (UCRTBASE.@) */ int CDECL MSVCRT__stdio_common_vsnwprintf_s( unsigned __int64 options, - MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, MSVCRT_size_t count, - const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list valist ) + wchar_t *str, MSVCRT_size_t sizeOfBuffer, MSVCRT_size_t count, + const wchar_t *format, _locale_t locale, __ms_va_list valist ) { if (options & ~UCRTBASE_PRINTF_MASK) FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); @@ -1104,7 +1104,7 @@ int CDECL MSVCRT__stdio_common_vsnwprintf_s( unsigned __int64 options, * __stdio_common_vswprintf_s (UCRTBASE.@) */ int CDECL MSVCRT__stdio_common_vswprintf_s( unsigned __int64 options, - MSVCRT_wchar_t *str, MSVCRT_size_t count, const MSVCRT_wchar_t *format, + wchar_t *str, MSVCRT_size_t count, const wchar_t *format, _locale_t locale, __ms_va_list valist ) { return MSVCRT__stdio_common_vsnwprintf_s(options, str, INT_MAX, count, format, locale, valist); @@ -1293,10 +1293,10 @@ int WINAPIV MSVCRT__scprintf(const char *format, ...) /********************************************************************* * _vsnwprintf (MSVCRT.@) */ -int CDECL MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vsnwprintf(wchar_t *str, MSVCRT_size_t len, + const wchar_t *format, __ms_va_list valist) { - static const MSVCRT_wchar_t nullbyte = '\0'; + static const wchar_t nullbyte = '\0'; struct _str_ctx_w ctx = {len, str}; int ret; @@ -1309,11 +1309,11 @@ int CDECL MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len, /********************************************************************* * _vsnwprintf_l (MSVCRT.@) */ -int CDECL MSVCRT_vsnwprintf_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, _locale_t locale, +int CDECL MSVCRT_vsnwprintf_l(wchar_t *str, MSVCRT_size_t len, + const wchar_t *format, _locale_t locale, __ms_va_list valist) { - static const MSVCRT_wchar_t nullbyte = '\0'; + static const wchar_t nullbyte = '\0'; struct _str_ctx_w ctx = {len, str}; int ret; @@ -1326,8 +1326,8 @@ int CDECL MSVCRT_vsnwprintf_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, /********************************************************************* * _vswprintf_c_l (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf_c_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, _locale_t locale, +int CDECL MSVCRT_vswprintf_c_l(wchar_t *str, MSVCRT_size_t len, + const wchar_t *format, _locale_t locale, __ms_va_list valist) { return MSVCRT_vsnwprintf_s_l_opt(str, len, len, format, 0, locale, valist); @@ -1336,16 +1336,16 @@ int CDECL MSVCRT_vswprintf_c_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, /********************************************************************* * _vswprintf_c (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf_c(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vswprintf_c(wchar_t *str, MSVCRT_size_t len, + const wchar_t *format, __ms_va_list valist) { return MSVCRT_vswprintf_c_l(str, len, format, NULL, valist); } -static int MSVCRT_vswprintf_p_l_opt(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, DWORD options, _locale_t locale, __ms_va_list args) +static int MSVCRT_vswprintf_p_l_opt(wchar_t *buffer, MSVCRT_size_t length, + const wchar_t *format, DWORD options, _locale_t locale, __ms_va_list args) { - static const MSVCRT_wchar_t nullbyte = '\0'; + static const wchar_t nullbyte = '\0'; printf_arg args_ctx[MSVCRT__ARGMAX+1]; struct _str_ctx_w puts_ctx = {length, buffer}; int ret; @@ -1372,8 +1372,8 @@ static int MSVCRT_vswprintf_p_l_opt(MSVCRT_wchar_t *buffer, MSVCRT_size_t length /********************************************************************* * _vswprintf_p_l (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list args) +int CDECL MSVCRT_vswprintf_p_l(wchar_t *buffer, MSVCRT_size_t length, + const wchar_t *format, _locale_t locale, __ms_va_list args) { return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, locale, args); } @@ -1382,8 +1382,8 @@ int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, /********************************************************************* * _vswprintf_p (MSVCR80.@) */ -int CDECL MSVCRT__vswprintf_p(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, __ms_va_list args) +int CDECL MSVCRT__vswprintf_p(wchar_t *buffer, MSVCRT_size_t length, + const wchar_t *format, __ms_va_list args) { return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, NULL, args); } @@ -1394,7 +1394,7 @@ int CDECL MSVCRT__vswprintf_p(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, * __stdio_common_vswprintf_p (UCRTBASE.@) */ int CDECL MSVCRT__stdio_common_vswprintf_p( unsigned __int64 options, - MSVCRT_wchar_t *str, MSVCRT_size_t count, const MSVCRT_wchar_t *format, + wchar_t *str, MSVCRT_size_t count, const wchar_t *format, _locale_t locale, __ms_va_list valist ) { if (options & ~UCRTBASE_PRINTF_MASK) @@ -1406,8 +1406,8 @@ int CDECL MSVCRT__stdio_common_vswprintf_p( unsigned __int64 options, /********************************************************************* * _vsnwprintf_s_l (MSVCRT.@) */ -int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, - MSVCRT_size_t count, const MSVCRT_wchar_t *format, +int CDECL MSVCRT_vsnwprintf_s_l( wchar_t *str, MSVCRT_size_t sizeOfBuffer, + MSVCRT_size_t count, const wchar_t *format, _locale_t locale, __ms_va_list valist) { return MSVCRT_vsnwprintf_s_l_opt(str, sizeOfBuffer, count, format, 0, locale, valist); @@ -1416,8 +1416,8 @@ int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer /********************************************************************* * _vsnwprintf_s (MSVCRT.@) */ -int CDECL MSVCRT_vsnwprintf_s(MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, - MSVCRT_size_t count, const MSVCRT_wchar_t *format, __ms_va_list valist) +int CDECL MSVCRT_vsnwprintf_s(wchar_t *str, MSVCRT_size_t sizeOfBuffer, + MSVCRT_size_t count, const wchar_t *format, __ms_va_list valist) { return MSVCRT_vsnwprintf_s_l(str, sizeOfBuffer, count, format, NULL, valist); @@ -1426,7 +1426,7 @@ int CDECL MSVCRT_vsnwprintf_s(MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, /********************************************************************* * _snwprintf (MSVCRT.@) */ -int WINAPIV MSVCRT__snwprintf( MSVCRT_wchar_t *str, MSVCRT_size_t len, const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT__snwprintf( wchar_t *str, MSVCRT_size_t len, const wchar_t *format, ...) { int retval; __ms_va_list valist; @@ -1439,7 +1439,7 @@ int WINAPIV MSVCRT__snwprintf( MSVCRT_wchar_t *str, MSVCRT_size_t len, const MSV /********************************************************************* * _snwprintf_l (MSVCRT.@) */ -int WINAPIV MSVCRT__snwprintf_l( MSVCRT_wchar_t *str, MSVCRT_size_t len, const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT__snwprintf_l( wchar_t *str, MSVCRT_size_t len, const wchar_t *format, _locale_t locale, ...) { int retval; @@ -1453,8 +1453,8 @@ int WINAPIV MSVCRT__snwprintf_l( MSVCRT_wchar_t *str, MSVCRT_size_t len, const M /********************************************************************* * _snwprintf_s (MSVCRT.@) */ -int WINAPIV MSVCRT__snwprintf_s( MSVCRT_wchar_t *str, MSVCRT_size_t len, MSVCRT_size_t count, - const MSVCRT_wchar_t *format, ...) +int WINAPIV MSVCRT__snwprintf_s( wchar_t *str, MSVCRT_size_t len, MSVCRT_size_t count, + const wchar_t *format, ...) { int retval; __ms_va_list valist; @@ -1467,8 +1467,8 @@ int WINAPIV MSVCRT__snwprintf_s( MSVCRT_wchar_t *str, MSVCRT_size_t len, MSVCRT_ /********************************************************************* * _snwprintf_s_l (MSVCRT.@) */ -int WINAPIV MSVCRT__snwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t len, MSVCRT_size_t count, - const MSVCRT_wchar_t *format, _locale_t locale, ... ) +int WINAPIV MSVCRT__snwprintf_s_l( wchar_t *str, MSVCRT_size_t len, MSVCRT_size_t count, + const wchar_t *format, _locale_t locale, ... ) { int retval; __ms_va_list valist; @@ -1480,7 +1480,7 @@ int WINAPIV MSVCRT__snwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t len, MSVCR #if _MSVCR_VER>=140 -static int puts_clbk_str_c99_w(void *ctx, int len, const MSVCRT_wchar_t *str) +static int puts_clbk_str_c99_w(void *ctx, int len, const wchar_t *str) { struct _str_ctx_w *out = ctx; @@ -1488,13 +1488,13 @@ static int puts_clbk_str_c99_w(void *ctx, int len, const MSVCRT_wchar_t *str) return len; if(out->len < len) { - memcpy(out->buf, str, out->len*sizeof(MSVCRT_wchar_t)); + memcpy(out->buf, str, out->len*sizeof(wchar_t)); out->buf += out->len; out->len = 0; return len; } - memcpy(out->buf, str, len*sizeof(MSVCRT_wchar_t)); + memcpy(out->buf, str, len*sizeof(wchar_t)); out->buf += len; out->len -= len; return len; @@ -1504,10 +1504,10 @@ static int puts_clbk_str_c99_w(void *ctx, int len, const MSVCRT_wchar_t *str) * __stdio_common_vswprintf (UCRTBASE.@) */ int CDECL MSVCRT__stdio_common_vswprintf( unsigned __int64 options, - MSVCRT_wchar_t *str, MSVCRT_size_t len, const MSVCRT_wchar_t *format, + wchar_t *str, MSVCRT_size_t len, const wchar_t *format, _locale_t locale, __ms_va_list valist ) { - static const MSVCRT_wchar_t nullbyte = '\0'; + static const wchar_t nullbyte = '\0'; struct _str_ctx_w ctx = {len, str}; int ret; @@ -1563,7 +1563,7 @@ int WINAPIV MSVCRT_sprintf_s( char *str, MSVCRT_size_t num, const char *format, /********************************************************************* * _scwprintf (MSVCRT.@) */ -int WINAPIV MSVCRT__scwprintf( const MSVCRT_wchar_t *format, ... ) +int WINAPIV MSVCRT__scwprintf( const wchar_t *format, ... ) { __ms_va_list ap; int r; @@ -1577,7 +1577,7 @@ int WINAPIV MSVCRT__scwprintf( const MSVCRT_wchar_t *format, ... ) /********************************************************************* * swprintf (MSVCRT.@) */ -int WINAPIV MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ... ) +int WINAPIV MSVCRT_swprintf( wchar_t *str, const wchar_t *format, ... ) { __ms_va_list ap; int r; @@ -1591,8 +1591,8 @@ int WINAPIV MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, /********************************************************************* * swprintf_s (MSVCRT.@) */ -int WINAPIV MSVCRT_swprintf_s(MSVCRT_wchar_t *str, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t *format, ... ) +int WINAPIV MSVCRT_swprintf_s(wchar_t *str, MSVCRT_size_t numberOfElements, + const wchar_t *format, ... ) { __ms_va_list ap; int r; @@ -1607,8 +1607,8 @@ int WINAPIV MSVCRT_swprintf_s(MSVCRT_wchar_t *str, MSVCRT_size_t numberOfElement /********************************************************************* * _swprintf_s_l (MSVCRT.@) */ -int WINAPIV MSVCRT__swprintf_s_l(MSVCRT_wchar_t *str, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t *format, _locale_t locale, ... ) +int WINAPIV MSVCRT__swprintf_s_l(wchar_t *str, MSVCRT_size_t numberOfElements, + const wchar_t *format, _locale_t locale, ... ) { __ms_va_list ap; int r; @@ -1623,8 +1623,8 @@ int WINAPIV MSVCRT__swprintf_s_l(MSVCRT_wchar_t *str, MSVCRT_size_t numberOfElem /********************************************************************* * _swprintf_c_l (MSVCRT.@) */ -int WINAPIV MSVCRT_swprintf_c_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, _locale_t locale, ... ) +int WINAPIV MSVCRT_swprintf_c_l(wchar_t *str, MSVCRT_size_t len, + const wchar_t *format, _locale_t locale, ... ) { __ms_va_list ap; int r; @@ -1639,8 +1639,8 @@ int WINAPIV MSVCRT_swprintf_c_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, /********************************************************************* * _swprintf_c (MSVCRT.@) */ -int WINAPIV MSVCRT_swprintf_c(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, ... ) +int WINAPIV MSVCRT_swprintf_c(wchar_t *str, MSVCRT_size_t len, + const wchar_t *format, ... ) { __ms_va_list ap; int r; @@ -1655,7 +1655,7 @@ int WINAPIV MSVCRT_swprintf_c(MSVCRT_wchar_t *str, MSVCRT_size_t len, /********************************************************************* * _vswprintf (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, __ms_va_list args ) +int CDECL MSVCRT_vswprintf( wchar_t* str, const wchar_t* format, __ms_va_list args ) { return MSVCRT_vsnwprintf( str, INT_MAX, format, args ); } @@ -1663,7 +1663,7 @@ int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, _ /********************************************************************* * _vswprintf (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf_l( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, +int CDECL MSVCRT_vswprintf_l( wchar_t* str, const wchar_t* format, _locale_t locale, __ms_va_list args ) { return MSVCRT_vsnwprintf_l( str, INT_MAX, format, locale, args ); @@ -1672,7 +1672,7 @@ int CDECL MSVCRT_vswprintf_l( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, /********************************************************************* * _vscwprintf (MSVCRT.@) */ -int CDECL MSVCRT__vscwprintf( const MSVCRT_wchar_t *format, __ms_va_list args ) +int CDECL MSVCRT__vscwprintf( const wchar_t *format, __ms_va_list args ) { return MSVCRT_vsnwprintf( NULL, INT_MAX, format, args ); } @@ -1680,7 +1680,7 @@ int CDECL MSVCRT__vscwprintf( const MSVCRT_wchar_t *format, __ms_va_list args ) /********************************************************************* * _vscwprintf_l (MSVCRT.@) */ -int CDECL MSVCRT__vscwprintf_l( const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list args ) +int CDECL MSVCRT__vscwprintf_l( const wchar_t *format, _locale_t locale, __ms_va_list args ) { return MSVCRT_vsnwprintf_l( NULL, INT_MAX, format, locale, args ); } @@ -1688,7 +1688,7 @@ int CDECL MSVCRT__vscwprintf_l( const MSVCRT_wchar_t *format, _locale_t locale, /********************************************************************* * _vscwprintf_p_l (MSVCRT.@) */ -int CDECL MSVCRT__vscwprintf_p_l( const MSVCRT_wchar_t *format, _locale_t locale, __ms_va_list args ) +int CDECL MSVCRT__vscwprintf_p_l( const wchar_t *format, _locale_t locale, __ms_va_list args ) { return MSVCRT_vswprintf_p_l_opt( NULL, INT_MAX, format, 0, locale, args ); } @@ -1697,7 +1697,7 @@ int CDECL MSVCRT__vscwprintf_p_l( const MSVCRT_wchar_t *format, _locale_t locale /********************************************************************* * _vscwprintf_p (MSVCR80.@) */ -int CDECL MSVCRT__vscwprintf_p(const MSVCRT_wchar_t *format, __ms_va_list args) +int CDECL MSVCRT__vscwprintf_p(const wchar_t *format, __ms_va_list args) { return MSVCRT_vswprintf_p_l_opt(NULL, INT_MAX, format, 0, NULL, args); } @@ -1706,8 +1706,8 @@ int CDECL MSVCRT__vscwprintf_p(const MSVCRT_wchar_t *format, __ms_va_list args) /********************************************************************* * vswprintf_s (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf_s(MSVCRT_wchar_t* str, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t* format, __ms_va_list args) +int CDECL MSVCRT_vswprintf_s(wchar_t* str, MSVCRT_size_t numberOfElements, + const wchar_t* format, __ms_va_list args) { return MSVCRT_vsnwprintf_s(str, numberOfElements, INT_MAX, format, args ); } @@ -1715,8 +1715,8 @@ int CDECL MSVCRT_vswprintf_s(MSVCRT_wchar_t* str, MSVCRT_size_t numberOfElements /********************************************************************* * _vswprintf_s_l (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf_s_l(MSVCRT_wchar_t* str, MSVCRT_size_t numberOfElements, - const MSVCRT_wchar_t* format, _locale_t locale, __ms_va_list args) +int CDECL MSVCRT_vswprintf_s_l(wchar_t* str, MSVCRT_size_t numberOfElements, + const wchar_t* format, _locale_t locale, __ms_va_list args) { return MSVCRT_vsnwprintf_s_l(str, numberOfElements, INT_MAX, format, locale, args ); @@ -1799,7 +1799,7 @@ int WINAPIV MSVCRT_sprintf_p_l(char *buffer, MSVCRT_size_t length, /********************************************************************* * __swprintf_l (MSVCRT.@) */ -int WINAPIV MSVCRT___swprintf_l( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, +int WINAPIV MSVCRT___swprintf_l( wchar_t *str, const wchar_t *format, _locale_t locale, ...) { int retval; @@ -1830,8 +1830,8 @@ int WINAPIV MSVCRT__sprintf_p(char *buffer, MSVCRT_size_t length, const char *fo /********************************************************************* * _swprintf_p_l (MSVCRT.@) */ -int WINAPIV MSVCRT_swprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, _locale_t locale, ...) +int WINAPIV MSVCRT_swprintf_p_l(wchar_t *buffer, MSVCRT_size_t length, + const wchar_t *format, _locale_t locale, ...) { __ms_va_list valist; int r; @@ -1846,7 +1846,7 @@ int WINAPIV MSVCRT_swprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, /********************************************************************* * wcscmp (MSVCRT.@) */ -int CDECL MSVCRT_wcscmp(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2) +int CDECL MSVCRT_wcscmp(const wchar_t *str1, const wchar_t *str2) { while (*str1 && (*str1 == *str2)) { @@ -1864,7 +1864,7 @@ int CDECL MSVCRT_wcscmp(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2) /********************************************************************* * _wcscoll_l (MSVCRT.@) */ -int CDECL MSVCRT__wcscoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, _locale_t locale) +int CDECL MSVCRT__wcscoll_l(const wchar_t* str1, const wchar_t* str2, _locale_t locale) { pthreadlocinfo locinfo; @@ -1881,7 +1881,7 @@ int CDECL MSVCRT__wcscoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* st /********************************************************************* * wcscoll (MSVCRT.@) */ -int CDECL MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 ) +int CDECL MSVCRT_wcscoll( const wchar_t* str1, const wchar_t* str2 ) { return MSVCRT__wcscoll_l(str1, str2, NULL); } @@ -1889,13 +1889,13 @@ int CDECL MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 /********************************************************************* * wcspbrk (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT_wcspbrk( const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* accept ) +wchar_t* CDECL MSVCRT_wcspbrk( const wchar_t* str, const wchar_t* accept ) { - const MSVCRT_wchar_t* p; + const wchar_t* p; while (*str) { - for (p = accept; *p; p++) if (*p == *str) return (MSVCRT_wchar_t*)str; + for (p = accept; *p; p++) if (*p == *str) return (wchar_t*)str; str++; } return NULL; @@ -1904,10 +1904,10 @@ MSVCRT_wchar_t* CDECL MSVCRT_wcspbrk( const MSVCRT_wchar_t* str, const MSVCRT_wc /********************************************************************* * wcstok_s (MSVCRT.@) */ -MSVCRT_wchar_t * CDECL MSVCRT_wcstok_s( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim, - MSVCRT_wchar_t **next_token ) +wchar_t * CDECL MSVCRT_wcstok_s( wchar_t *str, const wchar_t *delim, + wchar_t **next_token ) { - MSVCRT_wchar_t *ret; + wchar_t *ret; if (!MSVCRT_CHECK_PMT(delim != NULL)) return NULL; if (!MSVCRT_CHECK_PMT(next_token != NULL)) return NULL; @@ -1928,14 +1928,14 @@ MSVCRT_wchar_t * CDECL MSVCRT_wcstok_s( MSVCRT_wchar_t *str, const MSVCRT_wchar_ * wcstok (MSVCRT.@) */ #if _MSVCR_VER>=140 -MSVCRT_wchar_t * CDECL MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim, MSVCRT_wchar_t **ctx ) +wchar_t * CDECL MSVCRT_wcstok( wchar_t *str, const wchar_t *delim, wchar_t **ctx ) { if (!ctx) ctx = &msvcrt_get_thread_data()->wcstok_next; return MSVCRT_wcstok_s(str, delim, ctx); } #else -MSVCRT_wchar_t * CDECL MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim ) +wchar_t * CDECL MSVCRT_wcstok( wchar_t *str, const wchar_t *delim ) { return MSVCRT_wcstok_s(str, delim, &msvcrt_get_thread_data()->wcstok_next); } @@ -1945,7 +1945,7 @@ MSVCRT_wchar_t * CDECL MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t * _wctomb_s_l (MSVCRT.@) */ int CDECL MSVCRT__wctomb_s_l(int *len, char *mbchar, MSVCRT_size_t size, - MSVCRT_wchar_t wch, _locale_t locale) + wchar_t wch, _locale_t locale) { pthreadlocinfo locinfo; BOOL error = FALSE; @@ -2009,7 +2009,7 @@ int CDECL MSVCRT__wctomb_s_l(int *len, char *mbchar, MSVCRT_size_t size, /********************************************************************* * wctomb_s (MSVCRT.@) */ -int CDECL MSVCRT_wctomb_s(int *len, char *mbchar, MSVCRT_size_t size, MSVCRT_wchar_t wch) +int CDECL MSVCRT_wctomb_s(int *len, char *mbchar, MSVCRT_size_t size, wchar_t wch) { return MSVCRT__wctomb_s_l(len, mbchar, size, wch, NULL); } @@ -2017,7 +2017,7 @@ int CDECL MSVCRT_wctomb_s(int *len, char *mbchar, MSVCRT_size_t size, MSVCRT_wch /********************************************************************* * _wctomb_l (MSVCRT.@) */ -int CDECL MSVCRT__wctomb_l(char *dst, MSVCRT_wchar_t ch, _locale_t locale) +int CDECL MSVCRT__wctomb_l(char *dst, wchar_t ch, _locale_t locale) { int len; @@ -2028,7 +2028,7 @@ int CDECL MSVCRT__wctomb_l(char *dst, MSVCRT_wchar_t ch, _locale_t locale) /********************************************************************* * wctomb (MSVCRT.@) */ -INT CDECL MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch ) +INT CDECL MSVCRT_wctomb( char *dst, wchar_t ch ) { return MSVCRT__wctomb_l(dst, ch, NULL); } @@ -2059,7 +2059,7 @@ INT CDECL MSVCRT_wctob( MSVCRT_wint_t wchar ) * wcrtomb_s (MSVCRT.@) */ INT CDECL MSVCRT_wcrtomb_s(MSVCRT_size_t *len, char *mbchar, - MSVCRT_size_t size, MSVCRT_wchar_t wch, MSVCRT_mbstate_t *s) + MSVCRT_size_t size, wchar_t wch, MSVCRT_mbstate_t *s) { int ilen, ret; @@ -2072,7 +2072,7 @@ INT CDECL MSVCRT_wcrtomb_s(MSVCRT_size_t *len, char *mbchar, /********************************************************************* * wcrtomb (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_wcrtomb( char *dst, MSVCRT_wchar_t ch, MSVCRT_mbstate_t *s) +MSVCRT_size_t CDECL MSVCRT_wcrtomb( char *dst, wchar_t ch, MSVCRT_mbstate_t *s) { if(s) *s = 0; @@ -2082,7 +2082,7 @@ MSVCRT_size_t CDECL MSVCRT_wcrtomb( char *dst, MSVCRT_wchar_t ch, MSVCRT_mbstate /********************************************************************* * _iswctype_l (MSVCRT.@) */ -INT CDECL MSVCRT__iswctype_l( MSVCRT_wchar_t wc, wctype_t type, _locale_t locale ) +INT CDECL MSVCRT__iswctype_l( wchar_t wc, wctype_t type, _locale_t locale ) { WORD ct; @@ -2100,7 +2100,7 @@ INT CDECL MSVCRT__iswctype_l( MSVCRT_wchar_t wc, wctype_t type, _locale_t locale /********************************************************************* * iswctype (MSVCRT.@) */ -INT CDECL MSVCRT_iswctype( MSVCRT_wchar_t wc, wctype_t type ) +INT CDECL MSVCRT_iswctype( wchar_t wc, wctype_t type ) { return MSVCRT__iswctype_l( wc, type, NULL ); } @@ -2108,7 +2108,7 @@ INT CDECL MSVCRT_iswctype( MSVCRT_wchar_t wc, wctype_t type ) /********************************************************************* * _iswalnum_l (MSVCRT.@) */ -int CDECL MSVCRT__iswalnum_l( MSVCRT_wchar_t wc, _locale_t locale ) +int CDECL MSVCRT__iswalnum_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__ALPHA | MSVCRT__DIGIT, locale ); } @@ -2116,7 +2116,7 @@ int CDECL MSVCRT__iswalnum_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswalnum (MSVCRT.@) */ -INT CDECL MSVCRT_iswalnum( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswalnum( wchar_t wc ) { return MSVCRT__iswalnum_l( wc, NULL ); } @@ -2124,7 +2124,7 @@ INT CDECL MSVCRT_iswalnum( MSVCRT_wchar_t wc ) /********************************************************************* * iswalpha_l (MSVCRT.@) */ -INT CDECL MSVCRT__iswalpha_l( MSVCRT_wchar_t wc, _locale_t locale ) +INT CDECL MSVCRT__iswalpha_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__ALPHA, locale ); } @@ -2132,7 +2132,7 @@ INT CDECL MSVCRT__iswalpha_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswalpha (MSVCRT.@) */ -INT CDECL MSVCRT_iswalpha( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswalpha( wchar_t wc ) { return MSVCRT__iswalpha_l( wc, NULL ); } @@ -2140,7 +2140,7 @@ INT CDECL MSVCRT_iswalpha( MSVCRT_wchar_t wc ) /********************************************************************* * _iswcntrl_l (MSVCRT.@) */ -int CDECL MSVCRT__iswcntrl_l( MSVCRT_wchar_t wc, _locale_t locale ) +int CDECL MSVCRT__iswcntrl_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__CONTROL, locale ); } @@ -2148,7 +2148,7 @@ int CDECL MSVCRT__iswcntrl_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswcntrl (MSVCRT.@) */ -INT CDECL MSVCRT_iswcntrl( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswcntrl( wchar_t wc ) { return MSVCRT__iswcntrl_l( wc, NULL ); } @@ -2156,7 +2156,7 @@ INT CDECL MSVCRT_iswcntrl( MSVCRT_wchar_t wc ) /********************************************************************* * _iswdigit_l (MSVCRT.@) */ -INT CDECL MSVCRT__iswdigit_l( MSVCRT_wchar_t wc, _locale_t locale ) +INT CDECL MSVCRT__iswdigit_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__DIGIT, locale ); } @@ -2164,7 +2164,7 @@ INT CDECL MSVCRT__iswdigit_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswdigit (MSVCRT.@) */ -INT CDECL MSVCRT_iswdigit( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswdigit( wchar_t wc ) { return MSVCRT__iswdigit_l( wc, NULL ); } @@ -2172,7 +2172,7 @@ INT CDECL MSVCRT_iswdigit( MSVCRT_wchar_t wc ) /********************************************************************* * _iswgraph_l (MSVCRT.@) */ -int CDECL MSVCRT__iswgraph_l( MSVCRT_wchar_t wc, _locale_t locale ) +int CDECL MSVCRT__iswgraph_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__ALPHA | MSVCRT__DIGIT | MSVCRT__PUNCT, locale ); } @@ -2180,7 +2180,7 @@ int CDECL MSVCRT__iswgraph_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswgraph (MSVCRT.@) */ -INT CDECL MSVCRT_iswgraph( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswgraph( wchar_t wc ) { return MSVCRT__iswgraph_l( wc, NULL ); } @@ -2188,7 +2188,7 @@ INT CDECL MSVCRT_iswgraph( MSVCRT_wchar_t wc ) /********************************************************************* * _iswlower_l (MSVCRT.@) */ -int CDECL MSVCRT__iswlower_l( MSVCRT_wchar_t wc, _locale_t locale ) +int CDECL MSVCRT__iswlower_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__LOWER, locale ); } @@ -2196,7 +2196,7 @@ int CDECL MSVCRT__iswlower_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswlower (MSVCRT.@) */ -INT CDECL MSVCRT_iswlower( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswlower( wchar_t wc ) { return MSVCRT__iswlower_l( wc, NULL ); } @@ -2204,7 +2204,7 @@ INT CDECL MSVCRT_iswlower( MSVCRT_wchar_t wc ) /********************************************************************* * _iswprint_l (MSVCRT.@) */ -int CDECL MSVCRT__iswprint_l( MSVCRT_wchar_t wc, _locale_t locale ) +int CDECL MSVCRT__iswprint_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__ALPHA | MSVCRT__BLANK | MSVCRT__DIGIT | MSVCRT__PUNCT, locale ); @@ -2213,7 +2213,7 @@ int CDECL MSVCRT__iswprint_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswprint (MSVCRT.@) */ -INT CDECL MSVCRT_iswprint( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswprint( wchar_t wc ) { return MSVCRT__iswprint_l( wc, NULL ); } @@ -2221,7 +2221,7 @@ INT CDECL MSVCRT_iswprint( MSVCRT_wchar_t wc ) /********************************************************************* * _iswpunct_l (MSVCRT.@) */ -INT CDECL MSVCRT__iswpunct_l( MSVCRT_wchar_t wc, _locale_t locale ) +INT CDECL MSVCRT__iswpunct_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__PUNCT, locale ); } @@ -2229,7 +2229,7 @@ INT CDECL MSVCRT__iswpunct_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswpunct (MSVCRT.@) */ -INT CDECL MSVCRT_iswpunct( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswpunct( wchar_t wc ) { return MSVCRT__iswpunct_l( wc, NULL ); } @@ -2237,7 +2237,7 @@ INT CDECL MSVCRT_iswpunct( MSVCRT_wchar_t wc ) /********************************************************************* * _iswspace_l (MSVCRT.@) */ -INT CDECL MSVCRT__iswspace_l( MSVCRT_wchar_t wc, _locale_t locale ) +INT CDECL MSVCRT__iswspace_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__SPACE, locale ); } @@ -2245,7 +2245,7 @@ INT CDECL MSVCRT__iswspace_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswspace (MSVCRT.@) */ -INT CDECL MSVCRT_iswspace( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswspace( wchar_t wc ) { return MSVCRT__iswspace_l( wc, NULL ); } @@ -2253,7 +2253,7 @@ INT CDECL MSVCRT_iswspace( MSVCRT_wchar_t wc ) /********************************************************************* * _iswupper_l (MSVCRT.@) */ -int CDECL MSVCRT__iswupper_l( MSVCRT_wchar_t wc, _locale_t locale ) +int CDECL MSVCRT__iswupper_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__UPPER, locale ); } @@ -2261,7 +2261,7 @@ int CDECL MSVCRT__iswupper_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswupper (MSVCRT.@) */ -INT CDECL MSVCRT_iswupper( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswupper( wchar_t wc ) { return MSVCRT__iswupper_l( wc, NULL ); } @@ -2269,7 +2269,7 @@ INT CDECL MSVCRT_iswupper( MSVCRT_wchar_t wc ) /********************************************************************* * _iswxdigit_l (MSVCRT.@) */ -int CDECL MSVCRT__iswxdigit_l( MSVCRT_wchar_t wc, _locale_t locale ) +int CDECL MSVCRT__iswxdigit_l( wchar_t wc, _locale_t locale ) { return MSVCRT__iswctype_l( wc, MSVCRT__HEX, locale ); } @@ -2277,7 +2277,7 @@ int CDECL MSVCRT__iswxdigit_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswxdigit (MSVCRT.@) */ -INT CDECL MSVCRT_iswxdigit( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswxdigit( wchar_t wc ) { return MSVCRT__iswxdigit_l( wc, NULL ); } @@ -2285,7 +2285,7 @@ INT CDECL MSVCRT_iswxdigit( MSVCRT_wchar_t wc ) /********************************************************************* * _iswblank_l (MSVCRT.@) */ -INT CDECL MSVCRT__iswblank_l( MSVCRT_wchar_t wc, _locale_t locale ) +INT CDECL MSVCRT__iswblank_l( wchar_t wc, _locale_t locale ) { return wc == '\t' || MSVCRT__iswctype_l( wc, MSVCRT__BLANK, locale ); } @@ -2293,7 +2293,7 @@ INT CDECL MSVCRT__iswblank_l( MSVCRT_wchar_t wc, _locale_t locale ) /********************************************************************* * iswblank (MSVCRT.@) */ -INT CDECL MSVCRT_iswblank( MSVCRT_wchar_t wc ) +INT CDECL MSVCRT_iswblank( wchar_t wc ) { return wc == '\t' || MSVCRT__iswctype_l( wc, MSVCRT__BLANK, NULL ); } @@ -2301,7 +2301,7 @@ INT CDECL MSVCRT_iswblank( MSVCRT_wchar_t wc ) /********************************************************************* * wcscpy_s (MSVCRT.@) */ -INT CDECL MSVCRT_wcscpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, const MSVCRT_wchar_t *wcSrc) +INT CDECL MSVCRT_wcscpy_s( wchar_t* wcDest, MSVCRT_size_t numElement, const wchar_t *wcSrc) { MSVCRT_size_t size = 0; @@ -2330,7 +2330,7 @@ INT CDECL MSVCRT_wcscpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, con /*********************************************************************** * wcscpy (MSVCRT.@) */ -MSVCRT_wchar_t* __cdecl MSVCRT_wcscpy( MSVCRT_wchar_t *dst, const MSVCRT_wchar_t *src ) +wchar_t* __cdecl MSVCRT_wcscpy( wchar_t *dst, const wchar_t *src ) { WCHAR *p = dst; while ((*p++ = *src++)); @@ -2340,8 +2340,8 @@ MSVCRT_wchar_t* __cdecl MSVCRT_wcscpy( MSVCRT_wchar_t *dst, const MSVCRT_wchar_t /****************************************************************** * wcsncpy (MSVCRT.@) */ -MSVCRT_wchar_t* __cdecl MSVCRT_wcsncpy( MSVCRT_wchar_t* s1, - const MSVCRT_wchar_t *s2, MSVCRT_size_t n ) +wchar_t* __cdecl MSVCRT_wcsncpy( wchar_t* s1, + const wchar_t *s2, MSVCRT_size_t n ) { MSVCRT_size_t i; @@ -2355,7 +2355,7 @@ MSVCRT_wchar_t* __cdecl MSVCRT_wcsncpy( MSVCRT_wchar_t* s1, /****************************************************************** * wcsncpy_s (MSVCRT.@) */ -INT CDECL MSVCRT_wcsncpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, const MSVCRT_wchar_t *wcSrc, +INT CDECL MSVCRT_wcsncpy_s( wchar_t* wcDest, MSVCRT_size_t numElement, const wchar_t *wcSrc, MSVCRT_size_t count ) { WCHAR *p = wcDest; @@ -2398,9 +2398,9 @@ INT CDECL MSVCRT_wcsncpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, co * wcscat_s (MSVCRT.@) * */ -INT CDECL MSVCRT_wcscat_s(MSVCRT_wchar_t* dst, MSVCRT_size_t elem, const MSVCRT_wchar_t* src) +INT CDECL MSVCRT_wcscat_s(wchar_t* dst, MSVCRT_size_t elem, const wchar_t* src) { - MSVCRT_wchar_t* ptr = dst; + wchar_t* ptr = dst; if (!dst || elem == 0) return MSVCRT_EINVAL; if (!src) @@ -2423,7 +2423,7 @@ INT CDECL MSVCRT_wcscat_s(MSVCRT_wchar_t* dst, MSVCRT_size_t elem, const MSVCRT_ /*********************************************************************** * wcscat (MSVCRT.@) */ -MSVCRT_wchar_t* __cdecl MSVCRT_wcscat( MSVCRT_wchar_t *dst, const MSVCRT_wchar_t *src ) +wchar_t* __cdecl MSVCRT_wcscat( wchar_t *dst, const wchar_t *src ) { MSVCRT_wcscpy( dst + MSVCRT_wcslen(dst), src ); return dst; @@ -2433,11 +2433,11 @@ MSVCRT_wchar_t* __cdecl MSVCRT_wcscat( MSVCRT_wchar_t *dst, const MSVCRT_wchar_t * wcsncat_s (MSVCRT.@) * */ -INT CDECL MSVCRT_wcsncat_s(MSVCRT_wchar_t *dst, MSVCRT_size_t elem, - const MSVCRT_wchar_t *src, MSVCRT_size_t count) +INT CDECL MSVCRT_wcsncat_s(wchar_t *dst, MSVCRT_size_t elem, + const wchar_t *src, MSVCRT_size_t count) { MSVCRT_size_t srclen; - MSVCRT_wchar_t dststart; + wchar_t dststart; INT ret = 0; if (!MSVCRT_CHECK_PMT(dst != NULL)) return MSVCRT_EINVAL; @@ -2471,7 +2471,7 @@ INT CDECL MSVCRT_wcsncat_s(MSVCRT_wchar_t *dst, MSVCRT_size_t elem, srclen = min(MSVCRT_wcslen(src), count); if (srclen < (elem - dststart)) { - memcpy(&dst[dststart], src, srclen*sizeof(MSVCRT_wchar_t)); + memcpy(&dst[dststart], src, srclen*sizeof(wchar_t)); dst[dststart+srclen] = '\0'; return ret; } @@ -2515,8 +2515,8 @@ static int wctoint(WCHAR c, int base) * * FIXME: locale parameter is ignored */ -__int64 CDECL MSVCRT__wcstoi64_l(const MSVCRT_wchar_t *nptr, - MSVCRT_wchar_t **endptr, int base, _locale_t locale) +__int64 CDECL MSVCRT__wcstoi64_l(const wchar_t *nptr, + wchar_t **endptr, int base, _locale_t locale) { BOOL negative = FALSE, empty = TRUE; __int64 ret = 0; @@ -2528,7 +2528,7 @@ __int64 CDECL MSVCRT__wcstoi64_l(const MSVCRT_wchar_t *nptr, if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; if(endptr) - *endptr = (MSVCRT_wchar_t*)nptr; + *endptr = (wchar_t*)nptr; while(MSVCRT__iswspace_l(*nptr, locale)) nptr++; @@ -2572,7 +2572,7 @@ __int64 CDECL MSVCRT__wcstoi64_l(const MSVCRT_wchar_t *nptr, } if(endptr && !empty) - *endptr = (MSVCRT_wchar_t*)nptr; + *endptr = (wchar_t*)nptr; return ret; } @@ -2580,8 +2580,8 @@ __int64 CDECL MSVCRT__wcstoi64_l(const MSVCRT_wchar_t *nptr, /********************************************************************* * _wcstoi64 (MSVCRT.@) */ -__int64 CDECL MSVCRT__wcstoi64(const MSVCRT_wchar_t *nptr, - MSVCRT_wchar_t **endptr, int base) +__int64 CDECL MSVCRT__wcstoi64(const wchar_t *nptr, + wchar_t **endptr, int base) { return MSVCRT__wcstoi64_l(nptr, endptr, base, NULL); } @@ -2589,8 +2589,8 @@ __int64 CDECL MSVCRT__wcstoi64(const MSVCRT_wchar_t *nptr, /********************************************************************* * _wcstol_l (MSVCRT.@) */ -MSVCRT_long CDECL MSVCRT__wcstol_l(const MSVCRT_wchar_t *s, - MSVCRT_wchar_t **end, int base, _locale_t locale) +MSVCRT_long CDECL MSVCRT__wcstol_l(const wchar_t *s, + wchar_t **end, int base, _locale_t locale) { __int64 ret = MSVCRT__wcstoi64_l(s, end, base, locale); @@ -2607,8 +2607,8 @@ MSVCRT_long CDECL MSVCRT__wcstol_l(const MSVCRT_wchar_t *s, /********************************************************************* * wcstol (MSVCRT.@) */ -MSVCRT_long CDECL MSVCRT_wcstol(const MSVCRT_wchar_t *s, - MSVCRT_wchar_t **end, int base) +MSVCRT_long CDECL MSVCRT_wcstol(const wchar_t *s, + wchar_t **end, int base) { return MSVCRT__wcstol_l(s, end, base, NULL); } @@ -2616,7 +2616,7 @@ MSVCRT_long CDECL MSVCRT_wcstol(const MSVCRT_wchar_t *s, /********************************************************************* * _wtoi_l (MSVCRT.@) */ -int __cdecl MSVCRT__wtoi_l(const MSVCRT_wchar_t *str, _locale_t locale) +int __cdecl MSVCRT__wtoi_l(const wchar_t *str, _locale_t locale) { __int64 ret = MSVCRT__wcstoi64_l(str, NULL, 10, locale); @@ -2633,7 +2633,7 @@ int __cdecl MSVCRT__wtoi_l(const MSVCRT_wchar_t *str, _locale_t locale) /********************************************************************* * _wtoi (MSVCRT.@) */ -int __cdecl MSVCRT__wtoi(const MSVCRT_wchar_t *str) +int __cdecl MSVCRT__wtoi(const wchar_t *str) { return MSVCRT__wtoi_l(str, NULL); } @@ -2641,7 +2641,7 @@ int __cdecl MSVCRT__wtoi(const MSVCRT_wchar_t *str) /********************************************************************* * _wtol_l (MSVCRT.@) */ -MSVCRT_long __cdecl MSVCRT__wtol_l(const MSVCRT_wchar_t *str, _locale_t locale) +MSVCRT_long __cdecl MSVCRT__wtol_l(const wchar_t *str, _locale_t locale) { __int64 ret = MSVCRT__wcstoi64_l(str, NULL, 10, locale); @@ -2658,7 +2658,7 @@ MSVCRT_long __cdecl MSVCRT__wtol_l(const MSVCRT_wchar_t *str, _locale_t locale) /********************************************************************* * _wtol (MSVCRT.@) */ -MSVCRT_long __cdecl MSVCRT__wtol(const MSVCRT_wchar_t *str) +MSVCRT_long __cdecl MSVCRT__wtol(const wchar_t *str) { return MSVCRT__wtol_l(str, NULL); } @@ -2668,7 +2668,7 @@ MSVCRT_long __cdecl MSVCRT__wtol(const MSVCRT_wchar_t *str) /********************************************************************* * _wtoll_l (MSVCR120.@) */ -MSVCRT_longlong __cdecl MSVCRT__wtoll_l(const MSVCRT_wchar_t *str, _locale_t locale) +MSVCRT_longlong __cdecl MSVCRT__wtoll_l(const wchar_t *str, _locale_t locale) { return MSVCRT__wcstoi64_l(str, NULL, 10, locale); } @@ -2676,7 +2676,7 @@ MSVCRT_longlong __cdecl MSVCRT__wtoll_l(const MSVCRT_wchar_t *str, _locale_t loc /********************************************************************* * _wtoll (MSVCR120.@) */ -MSVCRT_longlong __cdecl MSVCRT__wtoll(const MSVCRT_wchar_t *str) +MSVCRT_longlong __cdecl MSVCRT__wtoll(const wchar_t *str) { return MSVCRT__wtoll_l(str, NULL); } @@ -2688,8 +2688,8 @@ MSVCRT_longlong __cdecl MSVCRT__wtoll(const MSVCRT_wchar_t *str) * * FIXME: locale parameter is ignored */ -unsigned __int64 CDECL MSVCRT__wcstoui64_l(const MSVCRT_wchar_t *nptr, - MSVCRT_wchar_t **endptr, int base, _locale_t locale) +unsigned __int64 CDECL MSVCRT__wcstoui64_l(const wchar_t *nptr, + wchar_t **endptr, int base, _locale_t locale) { BOOL negative = FALSE, empty = TRUE; unsigned __int64 ret = 0; @@ -2701,7 +2701,7 @@ unsigned __int64 CDECL MSVCRT__wcstoui64_l(const MSVCRT_wchar_t *nptr, if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; if(endptr) - *endptr = (MSVCRT_wchar_t*)nptr; + *endptr = (wchar_t*)nptr; while(MSVCRT__iswspace_l(*nptr, locale)) nptr++; @@ -2739,7 +2739,7 @@ unsigned __int64 CDECL MSVCRT__wcstoui64_l(const MSVCRT_wchar_t *nptr, } if(endptr && !empty) - *endptr = (MSVCRT_wchar_t*)nptr; + *endptr = (wchar_t*)nptr; return negative ? -ret : ret; } @@ -2747,8 +2747,8 @@ unsigned __int64 CDECL MSVCRT__wcstoui64_l(const MSVCRT_wchar_t *nptr, /********************************************************************* * _wcstoui64 (MSVCRT.@) */ -unsigned __int64 CDECL MSVCRT__wcstoui64(const MSVCRT_wchar_t *nptr, - MSVCRT_wchar_t **endptr, int base) +unsigned __int64 CDECL MSVCRT__wcstoui64(const wchar_t *nptr, + wchar_t **endptr, int base) { return MSVCRT__wcstoui64_l(nptr, endptr, base, NULL); } @@ -2756,8 +2756,8 @@ unsigned __int64 CDECL MSVCRT__wcstoui64(const MSVCRT_wchar_t *nptr, /********************************************************************* * _wcstoul_l (MSVCRT.@) */ -MSVCRT_ulong __cdecl MSVCRT__wcstoul_l(const MSVCRT_wchar_t *s, - MSVCRT_wchar_t **end, int base, _locale_t locale) +MSVCRT_ulong __cdecl MSVCRT__wcstoul_l(const wchar_t *s, + wchar_t **end, int base, _locale_t locale) { __int64 ret = MSVCRT__wcstoi64_l(s, end, base, locale); @@ -2774,7 +2774,7 @@ MSVCRT_ulong __cdecl MSVCRT__wcstoul_l(const MSVCRT_wchar_t *s, /********************************************************************* * wcstoul (MSVCRT.@) */ -MSVCRT_ulong __cdecl MSVCRT_wcstoul(const MSVCRT_wchar_t *s, MSVCRT_wchar_t **end, int base) +MSVCRT_ulong __cdecl MSVCRT_wcstoul(const wchar_t *s, wchar_t **end, int base) { return MSVCRT__wcstoul_l(s, end, base, NULL); } @@ -2782,7 +2782,7 @@ MSVCRT_ulong __cdecl MSVCRT_wcstoul(const MSVCRT_wchar_t *s, MSVCRT_wchar_t **en /****************************************************************** * wcsnlen (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_wcsnlen(const MSVCRT_wchar_t *s, MSVCRT_size_t maxlen) +MSVCRT_size_t CDECL MSVCRT_wcsnlen(const wchar_t *s, MSVCRT_size_t maxlen) { MSVCRT_size_t i; @@ -2797,7 +2797,7 @@ MSVCRT_size_t CDECL MSVCRT_wcsnlen(const MSVCRT_wchar_t *s, MSVCRT_size_t maxlen int CDECL MSVCRT__towupper_l(MSVCRT_wint_t c, _locale_t locale) { pthreadlocinfo locinfo; - MSVCRT_wchar_t ret; + wchar_t ret; if(!locale) locinfo = get_locinfo(); @@ -2826,7 +2826,7 @@ int CDECL MSVCRT_towupper(MSVCRT_wint_t c) /********************************************************************* * wcschr (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT_wcschr(const MSVCRT_wchar_t *str, MSVCRT_wchar_t ch) +wchar_t* CDECL MSVCRT_wcschr(const wchar_t *str, wchar_t ch) { do { if (*str == ch) return (WCHAR *)(ULONG_PTR)str; } while (*str++); return NULL; @@ -2835,7 +2835,7 @@ MSVCRT_wchar_t* CDECL MSVCRT_wcschr(const MSVCRT_wchar_t *str, MSVCRT_wchar_t ch /********************************************************************* * wcsrchr (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT_wcsrchr(const MSVCRT_wchar_t *str, MSVCRT_wchar_t ch) +wchar_t* CDECL MSVCRT_wcsrchr(const wchar_t *str, wchar_t ch) { WCHAR *ret = NULL; do { if (*str == ch) ret = (WCHAR *)(ULONG_PTR)str; } while (*str++); @@ -2845,9 +2845,9 @@ MSVCRT_wchar_t* CDECL MSVCRT_wcsrchr(const MSVCRT_wchar_t *str, MSVCRT_wchar_t c /*********************************************************************** * wcslen (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_wcslen(const MSVCRT_wchar_t *str) +MSVCRT_size_t CDECL MSVCRT_wcslen(const wchar_t *str) { - const MSVCRT_wchar_t *s = str; + const wchar_t *s = str; while (*s) s++; return s - str; } @@ -2855,18 +2855,18 @@ MSVCRT_size_t CDECL MSVCRT_wcslen(const MSVCRT_wchar_t *str) /********************************************************************* * wcsstr (MSVCRT.@) */ -MSVCRT_wchar_t* CDECL MSVCRT_wcsstr(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *sub) +wchar_t* CDECL MSVCRT_wcsstr(const wchar_t *str, const wchar_t *sub) { while(*str) { - const MSVCRT_wchar_t *p1 = str, *p2 = sub; + const wchar_t *p1 = str, *p2 = sub; while(*p1 && *p2 && *p1 == *p2) { p1++; p2++; } if(!*p2) - return (MSVCRT_wchar_t*)str; + return (wchar_t*)str; str++; } return NULL; @@ -2875,7 +2875,7 @@ MSVCRT_wchar_t* CDECL MSVCRT_wcsstr(const MSVCRT_wchar_t *str, const MSVCRT_wcha /********************************************************************* * _wtoi64_l (MSVCRT.@) */ -__int64 CDECL MSVCRT__wtoi64_l(const MSVCRT_wchar_t *str, _locale_t locale) +__int64 CDECL MSVCRT__wtoi64_l(const wchar_t *str, _locale_t locale) { ULONGLONG RunningTotal = 0; BOOL bMinus = FALSE; @@ -2902,7 +2902,7 @@ __int64 CDECL MSVCRT__wtoi64_l(const MSVCRT_wchar_t *str, _locale_t locale) /********************************************************************* * _wtoi64 (MSVCRT.@) */ -__int64 CDECL MSVCRT__wtoi64(const MSVCRT_wchar_t *str) +__int64 CDECL MSVCRT__wtoi64(const wchar_t *str) { return MSVCRT__wtoi64_l(str, NULL); } @@ -2910,7 +2910,7 @@ __int64 CDECL MSVCRT__wtoi64(const MSVCRT_wchar_t *str) /********************************************************************* * _wcsxfrm_l (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT__wcsxfrm_l(MSVCRT_wchar_t *dest, const MSVCRT_wchar_t *src, +MSVCRT_size_t CDECL MSVCRT__wcsxfrm_l(wchar_t *dest, const wchar_t *src, MSVCRT_size_t len, _locale_t locale) { pthreadlocinfo locinfo; @@ -2959,8 +2959,8 @@ MSVCRT_size_t CDECL MSVCRT__wcsxfrm_l(MSVCRT_wchar_t *dest, const MSVCRT_wchar_t /********************************************************************* * wcsxfrm (MSVCRT.@) */ -MSVCRT_size_t CDECL MSVCRT_wcsxfrm(MSVCRT_wchar_t *dest, - const MSVCRT_wchar_t *src, MSVCRT_size_t len) +MSVCRT_size_t CDECL MSVCRT_wcsxfrm(wchar_t *dest, + const wchar_t *src, MSVCRT_size_t len) { return MSVCRT__wcsxfrm_l(dest, src, len, NULL); }