Commit 5f31b329 authored by Alexandre Julliard's avatar Alexandre Julliard

Use MSVCRT_wchar_t instead of WCHAR so that the implementation matches

the prototypes.
parent 041756d8
......@@ -218,7 +218,7 @@ int MSVCRT___toascii(int c)
* iswascii (MSVCRT.@)
*
*/
int MSVCRT_iswascii(WCHAR c)
int MSVCRT_iswascii(MSVCRT_wchar_t c)
{
return ((unsigned)c < 0x80);
}
......
......@@ -53,13 +53,13 @@ unsigned int MSVCRT___setlc_active;
unsigned int MSVCRT___unguarded_readlc_active;
double MSVCRT__HUGE;
char **MSVCRT___argv;
WCHAR **MSVCRT___wargv;
MSVCRT_wchar_t **MSVCRT___wargv;
char *MSVCRT__acmdln;
WCHAR *MSVCRT__wcmdln;
MSVCRT_wchar_t *MSVCRT__wcmdln;
char **MSVCRT__environ = 0;
WCHAR **MSVCRT__wenviron = 0;
MSVCRT_wchar_t **MSVCRT__wenviron = 0;
char **MSVCRT___initenv = 0;
WCHAR **MSVCRT___winitenv = 0;
MSVCRT_wchar_t **MSVCRT___winitenv = 0;
int MSVCRT_timezone;
int MSVCRT_app_type;
......@@ -104,11 +104,11 @@ char ** msvcrt_SnapshotOfEnvironmentA(char **blk)
return blk;
}
WCHAR ** msvcrt_SnapshotOfEnvironmentW(WCHAR **wblk)
MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **wblk)
{
WCHAR* wenviron_strings = GetEnvironmentStringsW();
MSVCRT_wchar_t* wenviron_strings = GetEnvironmentStringsW();
int count = 1, len = 1, i = 0; /* keep space for the trailing NULLS */
WCHAR *wptr;
MSVCRT_wchar_t *wptr;
for (wptr = wenviron_strings; *wptr; wptr += strlenW(wptr) + 1)
{
......@@ -116,15 +116,15 @@ WCHAR ** msvcrt_SnapshotOfEnvironmentW(WCHAR **wblk)
len += strlenW(wptr) + 1;
}
if (wblk)
wblk = HeapReAlloc( GetProcessHeap(), 0, wblk, count* sizeof(WCHAR*) + len * sizeof(WCHAR));
wblk = HeapReAlloc( GetProcessHeap(), 0, wblk, count* sizeof(MSVCRT_wchar_t*) + len * sizeof(MSVCRT_wchar_t));
else
wblk = HeapAlloc(GetProcessHeap(), 0, count* sizeof(WCHAR*) + len * sizeof(WCHAR));
wblk = HeapAlloc(GetProcessHeap(), 0, count* sizeof(MSVCRT_wchar_t*) + len * sizeof(MSVCRT_wchar_t));
if (wblk)
{
if (count)
{
memcpy(&wblk[count],wenviron_strings,len * sizeof(WCHAR));
for (wptr = (WCHAR*)&wblk[count]; *wptr; wptr += strlenW(wptr) + 1)
memcpy(&wblk[count],wenviron_strings,len * sizeof(MSVCRT_wchar_t));
for (wptr = (MSVCRT_wchar_t*)&wblk[count]; *wptr; wptr += strlenW(wptr) + 1)
{
wblk[i++] = wptr;
}
......@@ -180,7 +180,7 @@ char** __p__acmdln(void) { return &MSVCRT__acmdln; }
/*********************************************************************
* __p__wcmdln (MSVCRT.@)
*/
WCHAR** __p__wcmdln(void) { return &MSVCRT__wcmdln; }
MSVCRT_wchar_t** __p__wcmdln(void) { return &MSVCRT__wcmdln; }
/*********************************************************************
* __p___argv (MSVCRT.@)
......@@ -190,7 +190,7 @@ char*** __p___argv(void) { return &MSVCRT___argv; }
/*********************************************************************
* __p___wargv (MSVCRT.@)
*/
WCHAR*** __p___wargv(void) { return &MSVCRT___wargv; }
MSVCRT_wchar_t*** __p___wargv(void) { return &MSVCRT___wargv; }
/*********************************************************************
* __p__environ (MSVCRT.@)
......@@ -205,7 +205,7 @@ char*** __p__environ(void)
/*********************************************************************
* __p__wenviron (MSVCRT.@)
*/
WCHAR*** __p__wenviron(void)
MSVCRT_wchar_t*** __p__wenviron(void)
{
if (!MSVCRT__wenviron)
MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(NULL);
......@@ -220,7 +220,7 @@ char*** __p___initenv(void) { return &MSVCRT___initenv; }
/*********************************************************************
* __p___winitenv (MSVCRT.@)
*/
WCHAR*** __p___winitenv(void) { return &MSVCRT___winitenv; }
MSVCRT_wchar_t*** __p___winitenv(void) { return &MSVCRT___winitenv; }
/*********************************************************************
* __p__timezone (MSVCRT.@)
......@@ -228,13 +228,13 @@ WCHAR*** __p___winitenv(void) { return &MSVCRT___winitenv; }
int* __p__timezone(void) { return &MSVCRT_timezone; }
/* INTERNAL: Create a wide string from an ascii string */
static WCHAR *wstrdupa(const char *str)
static MSVCRT_wchar_t *wstrdupa(const char *str)
{
const size_t len = strlen(str) + 1 ;
WCHAR *wstr = MSVCRT_malloc(len* sizeof (WCHAR));
MSVCRT_wchar_t *wstr = MSVCRT_malloc(len* sizeof (MSVCRT_wchar_t));
if (!wstr)
return NULL;
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,str,len*sizeof(char),wstr,len* sizeof (WCHAR));
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,str,len,wstr,len);
return wstr;
}
......@@ -308,8 +308,8 @@ void __getmainargs(int *argc, char** *argv, char** *envp,
/*********************************************************************
* __wgetmainargs (MSVCRT.@)
*/
void __wgetmainargs(int *argc, WCHAR** *wargv, WCHAR** *wenvp,
int expand_wildcards, int *new_mode)
void __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** *wenvp,
int expand_wildcards, int *new_mode)
{
TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenvp, expand_wildcards, new_mode);
*argc = MSVCRT___argc;
......
......@@ -97,7 +97,7 @@ int _chdir(const char * newdir)
/*********************************************************************
* _wchdir (MSVCRT.@)
*/
int _wchdir(const WCHAR * newdir)
int _wchdir(const MSVCRT_wchar_t * newdir)
{
if (!SetCurrentDirectoryW(newdir))
{
......@@ -160,7 +160,7 @@ long _findfirst(const char * fspec, struct _finddata_t* ft)
/*********************************************************************
* _wfindfirst (MSVCRT.@)
*/
long _wfindfirst(const WCHAR * fspec, struct _wfinddata_t* ft)
long _wfindfirst(const MSVCRT_wchar_t * fspec, struct _wfinddata_t* ft)
{
WIN32_FIND_DATAW find_data;
HANDLE hfind;
......@@ -239,9 +239,9 @@ char* _getcwd(char * buf, int size)
/*********************************************************************
* _wgetcwd (MSVCRT.@)
*/
WCHAR* _wgetcwd(WCHAR * buf, int size)
MSVCRT_wchar_t* _wgetcwd(MSVCRT_wchar_t * buf, int size)
{
WCHAR dir[MAX_PATH];
MSVCRT_wchar_t dir[MAX_PATH];
int dir_len = GetCurrentDirectoryW(MAX_PATH,dir);
if (dir_len < 1)
......@@ -316,9 +316,9 @@ char* _getdcwd(int drive, char * buf, int size)
/*********************************************************************
* _wgetdcwd (MSVCRT.@)
*/
WCHAR* _wgetdcwd(int drive, WCHAR * buf, int size)
MSVCRT_wchar_t* _wgetdcwd(int drive, MSVCRT_wchar_t * buf, int size)
{
static WCHAR* dummy;
static MSVCRT_wchar_t* dummy;
TRACE(":drive %d(%c), size %d\n",drive, drive + 'A' - 1, size);
......@@ -326,8 +326,8 @@ WCHAR* _wgetdcwd(int drive, WCHAR * buf, int size)
return _wgetcwd(buf,size); /* current */
else
{
WCHAR dir[MAX_PATH];
WCHAR drivespec[4] = {'A', ':', '\\', 0};
MSVCRT_wchar_t dir[MAX_PATH];
MSVCRT_wchar_t drivespec[4] = {'A', ':', '\\', 0};
int dir_len;
drivespec[0] += drive - 1;
......@@ -393,7 +393,7 @@ int _mkdir(const char * newdir)
/*********************************************************************
* _wmkdir (MSVCRT.@)
*/
int _wmkdir(const WCHAR* newdir)
int _wmkdir(const MSVCRT_wchar_t* newdir)
{
if (CreateDirectoryW(newdir,NULL))
return 0;
......@@ -415,7 +415,7 @@ int _rmdir(const char * dir)
/*********************************************************************
* _wrmdir (MSVCRT.@)
*/
int _wrmdir(const WCHAR * dir)
int _wrmdir(const MSVCRT_wchar_t * dir)
{
if (RemoveDirectoryW(dir))
return 0;
......@@ -426,45 +426,45 @@ int _wrmdir(const WCHAR * dir)
/*********************************************************************
* _wsplitpath (MSVCRT.@)
*/
void _wsplitpath(const WCHAR *inpath, WCHAR *drv, WCHAR *dir,
WCHAR *fname, WCHAR *ext )
void _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir,
MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext )
{
/* Modified PD code from 'snippets' collection. */
WCHAR ch, *ptr, *p;
WCHAR pathbuff[MAX_PATH],*path=pathbuff;
MSVCRT_wchar_t ch, *ptr, *p;
MSVCRT_wchar_t pathbuff[MAX_PATH],*path=pathbuff;
TRACE(":splitting path %s\n",debugstr_w(path));
/* FIXME: Should be an strncpyW or something */
strcpyW(pathbuff, inpath);
/* convert slashes to backslashes for searching */
for (ptr = (WCHAR*)path; *ptr; ++ptr)
if (*ptr == (WCHAR)L'/')
*ptr = (WCHAR)L'\\';
for (ptr = (MSVCRT_wchar_t*)path; *ptr; ++ptr)
if (*ptr == '/')
*ptr = '\\';
/* look for drive spec */
if ((ptr = strchrW(path, (WCHAR)L':')) != (WCHAR)L'\0')
if ((ptr = strchrW(path, ':')) != 0)
{
++ptr;
if (drv)
{
strncpyW(drv, path, ptr - path);
drv[ptr - path] = (WCHAR)L'\0';
drv[ptr - path] = 0;
}
path = ptr;
}
else if (drv)
*drv = (WCHAR)L'\0';
*drv = 0;
/* find rightmost backslash or leftmost colon */
if ((ptr = strrchrW(path, (WCHAR)L'\\')) == NULL)
ptr = (strchrW(path, (WCHAR)L':'));
if ((ptr = strrchrW(path, '\\')) == NULL)
ptr = (strchrW(path, ':'));
if (!ptr)
{
ptr = (WCHAR *)path; /* no path */
ptr = (MSVCRT_wchar_t *)path; /* no path */
if (dir)
*dir = (WCHAR)L'\0';
*dir = 0;
}
else
{
......@@ -472,25 +472,25 @@ void _wsplitpath(const WCHAR *inpath, WCHAR *drv, WCHAR *dir,
if (dir)
{
ch = *ptr;
*ptr = (WCHAR)L'\0';
*ptr = 0;
strcpyW(dir, path);
*ptr = ch;
}
}
if ((p = strrchrW(ptr, (WCHAR)L'.')) == NULL)
if ((p = strrchrW(ptr, '.')) == NULL)
{
if (fname)
strcpyW(fname, ptr);
if (ext)
*ext = (WCHAR)L'\0';
*ext = 0;
}
else
{
*p = (WCHAR)L'\0';
*p = 0;
if (fname)
strcpyW(fname, ptr);
*p = (WCHAR)L'.';
*p = '.';
if (ext)
strcpyW(ext, p);
}
......@@ -498,13 +498,13 @@ void _wsplitpath(const WCHAR *inpath, WCHAR *drv, WCHAR *dir,
/* Fix pathological case - Win returns ':' as part of the
* directory when no drive letter is given.
*/
if (drv && drv[0] == (WCHAR)L':')
if (drv && drv[0] == ':')
{
*drv = (WCHAR)L'\0';
*drv = 0;
if (dir)
{
pathbuff[0] = (WCHAR)L':';
pathbuff[1] = (WCHAR)L'\0';
pathbuff[0] = ':';
pathbuff[1] = 0;
strcatW(pathbuff,dir);
strcpyW(dir, pathbuff);
}
......@@ -714,10 +714,10 @@ VOID _makepath(char * path, const char * drive,
/*********************************************************************
* _wmakepath (MSVCRT.@)
*/
VOID _wmakepath(WCHAR *path, const WCHAR *drive, const WCHAR *directory,
const WCHAR *filename, const WCHAR *extension)
VOID _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)
{
WCHAR ch;
MSVCRT_wchar_t ch;
TRACE("%s %s %s %s\n", debugstr_w(drive), debugstr_w(directory),
debugstr_w(filename), debugstr_w(extension));
......@@ -737,7 +737,7 @@ VOID _wmakepath(WCHAR *path, const WCHAR *drive, const WCHAR *directory,
ch = path[strlenW(path) - 1];
if (ch != '/' && ch != '\\')
{
static const WCHAR backslashW[] = {'\\',0};
static const MSVCRT_wchar_t backslashW[] = {'\\',0};
strcatW(path, backslashW);
}
}
......@@ -748,7 +748,7 @@ VOID _wmakepath(WCHAR *path, const WCHAR *drive, const WCHAR *directory,
{
if ( extension[0] != '.' )
{
static const WCHAR dotW[] = {'.',0};
static const MSVCRT_wchar_t dotW[] = {'.',0};
strcatW(path, dotW);
}
strcatW(path, extension);
......
......@@ -61,10 +61,10 @@ char *MSVCRT_getenv(const char *name)
/*********************************************************************
* _wgetenv (MSVCRT.@)
*/
WCHAR *_wgetenv(const WCHAR *name)
MSVCRT_wchar_t *_wgetenv(const MSVCRT_wchar_t *name)
{
WCHAR* environ = GetEnvironmentStringsW();
WCHAR* pp,*pos = NULL;
MSVCRT_wchar_t* environ = GetEnvironmentStringsW();
MSVCRT_wchar_t* pp,*pos = NULL;
unsigned int length=strlenW(name);
for (pp = environ; (*pp); pp = pp + strlenW(pp) + 1)
......@@ -122,25 +122,25 @@ int _putenv(const char *str)
/*********************************************************************
* _wputenv (MSVCRT.@)
*/
int _wputenv(const WCHAR *str)
int _wputenv(const MSVCRT_wchar_t *str)
{
WCHAR name[256], value[512];
WCHAR *dst = name;
MSVCRT_wchar_t name[256], value[512];
MSVCRT_wchar_t *dst = name;
int ret;
TRACE("%s\n", debugstr_w(str));
if (!str)
return -1;
while (*str && *str != (WCHAR)L'=')
while (*str && *str != '=')
*dst++ = *str++;
if (!*str++)
return -1;
*dst = (WCHAR)L'\0';
*dst = 0;
dst = value;
while (*str)
*dst++ = *str++;
*dst = (WCHAR)L'\0';
*dst = 0;
ret = !SetEnvironmentVariableW(name, value[0] ? value : NULL);
/* Update the __p__environ array only when already initialized */
......
......@@ -39,9 +39,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
unsigned char MSVCRT_mbctype[257];
int MSVCRT___mb_cur_max = 1;
static WCHAR msvcrt_mbc_to_wc(unsigned int ch)
static MSVCRT_wchar_t msvcrt_mbc_to_wc(unsigned int ch)
{
WCHAR chW;
MSVCRT_wchar_t chW;
char mbch[2];
int n_chars;
......@@ -527,7 +527,7 @@ unsigned char* _mbsrchr(const unsigned char* s, unsigned int x)
/*********************************************************************
* mbtowc(MSVCRT.@)
*/
int MSVCRT_mbtowc(WCHAR *dst, const char* str, MSVCRT_size_t n)
int MSVCRT_mbtowc(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n)
{
if(n <= 0 || !str)
return 0;
......@@ -575,7 +575,7 @@ int _ismbbkana(unsigned int c)
*/
int _ismbcdigit(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & C1_DIGIT);
}
......@@ -584,7 +584,7 @@ int _ismbcdigit(unsigned int ch)
*/
int _ismbcgraph(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & (C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA));
}
......@@ -593,7 +593,7 @@ int _ismbcgraph(unsigned int ch)
*/
int _ismbcalpha(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & C1_ALPHA);
}
......@@ -602,7 +602,7 @@ int _ismbcalpha(unsigned int ch)
*/
int _ismbclower(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & C1_UPPER);
}
......@@ -611,7 +611,7 @@ int _ismbclower(unsigned int ch)
*/
int _ismbcupper(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & C1_LOWER);
}
......@@ -620,7 +620,7 @@ int _ismbcupper(unsigned int ch)
*/
int _ismbcsymbol(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
WORD ctype;
if (!GetStringTypeW(CT_CTYPE3, &wch, 1, &ctype))
{
......@@ -635,7 +635,7 @@ int _ismbcsymbol(unsigned int ch)
*/
int _ismbcalnum(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & (C1_ALPHA | C1_DIGIT));
}
......@@ -644,7 +644,7 @@ int _ismbcalnum(unsigned int ch)
*/
int _ismbcspace(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & C1_SPACE);
}
......@@ -653,7 +653,7 @@ int _ismbcspace(unsigned int ch)
*/
int _ismbcprint(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & (C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA | C1_SPACE));
}
......@@ -662,7 +662,7 @@ int _ismbcprint(unsigned int ch)
*/
int _ismbcpunct(unsigned int ch)
{
WCHAR wch = msvcrt_mbc_to_wc( ch );
MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch );
return (get_char_typeW( wch ) & C1_PUNCT);
}
......
......@@ -28,6 +28,7 @@
#include "winerror.h"
#include "winnls.h"
#include "msvcrt/string.h"
#include "msvcrt/eh.h"
/* TLS data */
......@@ -50,15 +51,15 @@ extern int MSVCRT_current_lc_all_cp;
void _purecall(void);
void MSVCRT__set_errno(int);
char* msvcrt_strndup(const char*,unsigned int);
LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int);
MSVCRT_wchar_t *msvcrt_wstrndup(const MSVCRT_wchar_t*, unsigned int);
void MSVCRT__amsg_exit(int errnum);
extern char **MSVCRT__environ;
extern WCHAR **MSVCRT__wenviron;
extern MSVCRT_wchar_t **MSVCRT__wenviron;
extern char ** msvcrt_SnapshotOfEnvironmentA(char **);
extern WCHAR ** msvcrt_SnapshotOfEnvironmentW(WCHAR **);
extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **);
/* FIXME: This should be declared in new.h but it's not an extern "C" so
* it would not be much use anyway. Even for Winelib applications.
......
......@@ -48,7 +48,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(WCHAR c, int base) {
static int wchar2digit(MSVCRT_wchar_t c, int base) {
if ((c>=L'0') && (c<=L'9') && (c<=L'0'+base-1)) return (c-L'0');
if (base<=10) return -1;
if ((c>=L'A') && (c<=L'Z') && (c<=L'A'+base-11)) return (c-L'A'+10);
......
......@@ -25,7 +25,7 @@
#ifdef WIDE_SCANF
#define _L_(x) L##x
#define _CHAR_ WCHAR
#define _CHAR_ MSVCRT_wchar_t
#define _EOF_ MSVCRT_WEOF
#define _ISSPACE_(c) MSVCRT_iswspace(c)
#define _ISDIGIT_(c) MSVCRT_iswdigit(c)
......@@ -52,7 +52,7 @@
#define _GETC_(file) *file++
#define _UNGETC_(nch, file) file--
#ifdef WIDE_SCANF
#define _FUNCTION_ MSVCRT_swscanf(const WCHAR *file, const WCHAR *format, ...)
#define _FUNCTION_ MSVCRT_swscanf(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, ...)
#else /* WIDE_SCANF */
#define _FUNCTION_ MSVCRT_sscanf(const char *file, const char *format, ...)
#endif /* WIDE_SCANF */
......@@ -60,7 +60,7 @@
#ifdef WIDE_SCANF
#define _GETC_(file) MSVCRT_fgetwc(file)
#define _UNGETC_(nch, file) MSVCRT_ungetwc(nch, file)
#define _FUNCTION_ MSVCRT_fwscanf(MSVCRT_FILE* file, const WCHAR *format, ...)
#define _FUNCTION_ MSVCRT_fwscanf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...)
#else /* WIDE_SCANF */
#define _GETC_(file) MSVCRT_fgetc(file)
#define _UNGETC_(nch, file) MSVCRT_ungetc(nch, file)
......@@ -369,10 +369,10 @@ int _FUNCTION_ {
if (!suppress) *sptr = 0;
}
break;
widecharstring: { /* read a word into a WCHAR * */
WCHAR*str =
suppress ? NULL : va_arg(ap, WCHAR*);
WCHAR*sptr = str;
widecharstring: { /* read a word into a wchar_t* */
MSVCRT_wchar_t*str =
suppress ? NULL : va_arg(ap, MSVCRT_wchar_t*);
MSVCRT_wchar_t*sptr = str;
/* skip initial whitespace */
while ((nch!=_EOF_) && _ISSPACE_(nch))
nch = _GETC_(file);
......@@ -423,8 +423,8 @@ int _FUNCTION_ {
}
break;
widecharacter: {
if (!suppress) { /* read single character into WCHAR */
WCHAR*c = va_arg(ap, WCHAR*);
if (!suppress) { /* read single character into a wchar_t */
MSVCRT_wchar_t*c = va_arg(ap, MSVCRT_wchar_t*);
#ifdef WIDE_SCANF
*c = nch;
#else /* WIDE_SCANF */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment