msvcrt: Remove MSVCRT_wchar_t type.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-11-27 14:16:49 +01:00 committed by Alexandre Julliard
parent b0b63aec47
commit c302397c73
19 changed files with 795 additions and 796 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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();

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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; i<ARRAY_SIZE(time_data); i++) {
cur->wstr.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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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;
}

View File

@ -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;

File diff suppressed because it is too large Load Diff