msvcrt: Implemented wcstok_s.
This commit is contained in:
parent
5437c72fe1
commit
4b6d5fd583
|
@ -1653,7 +1653,7 @@
|
||||||
@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr
|
@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr
|
||||||
@ cdecl wcstod(wstr ptr) msvcrt.wcstod
|
@ cdecl wcstod(wstr ptr) msvcrt.wcstod
|
||||||
@ cdecl wcstok(wstr wstr) msvcrt.wcstok
|
@ cdecl wcstok(wstr wstr) msvcrt.wcstok
|
||||||
@ stub wcstok_s
|
@ cdecl wcstok_s(ptr wstr ptr) msvcrt.wcstok_s
|
||||||
@ cdecl wcstol(wstr ptr long) msvcrt.wcstol
|
@ cdecl wcstol(wstr ptr long) msvcrt.wcstol
|
||||||
@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs
|
@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs
|
||||||
@ cdecl wcstombs_s(ptr ptr long wstr long) msvcrt.wcstombs_s
|
@ cdecl wcstombs_s(ptr ptr long wstr long) msvcrt.wcstombs_s
|
||||||
|
|
|
@ -1507,7 +1507,7 @@
|
||||||
@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr
|
@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr
|
||||||
@ cdecl wcstod(wstr ptr) msvcrt.wcstod
|
@ cdecl wcstod(wstr ptr) msvcrt.wcstod
|
||||||
@ cdecl wcstok(wstr wstr) msvcrt.wcstok
|
@ cdecl wcstok(wstr wstr) msvcrt.wcstok
|
||||||
@ stub wcstok_s
|
@ cdecl wcstok_s(ptr wstr ptr) msvcrt.wcstok_s
|
||||||
@ cdecl wcstol(wstr ptr long) msvcrt.wcstol
|
@ cdecl wcstol(wstr ptr long) msvcrt.wcstol
|
||||||
@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs
|
@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs
|
||||||
@ cdecl wcstombs_s(ptr ptr long wstr long) msvcrt.wcstombs_s
|
@ cdecl wcstombs_s(ptr ptr long wstr long) msvcrt.wcstombs_s
|
||||||
|
|
|
@ -1491,7 +1491,7 @@
|
||||||
@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr
|
@ cdecl wcsstr(wstr wstr) msvcrt.wcsstr
|
||||||
@ cdecl wcstod(wstr ptr) msvcrt.wcstod
|
@ cdecl wcstod(wstr ptr) msvcrt.wcstod
|
||||||
@ cdecl wcstok(wstr wstr) msvcrt.wcstok
|
@ cdecl wcstok(wstr wstr) msvcrt.wcstok
|
||||||
@ stub wcstok_s
|
@ cdecl wcstok_s(ptr wstr ptr) msvcrt.wcstok_s
|
||||||
@ cdecl wcstol(wstr ptr long) msvcrt.wcstol
|
@ cdecl wcstol(wstr ptr long) msvcrt.wcstol
|
||||||
@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs
|
@ cdecl wcstombs(ptr ptr long) msvcrt.wcstombs
|
||||||
@ cdecl wcstombs_s(ptr ptr long wstr long) msvcrt.wcstombs_s
|
@ cdecl wcstombs_s(ptr ptr long wstr long) msvcrt.wcstombs_s
|
||||||
|
|
|
@ -1457,7 +1457,7 @@
|
||||||
@ cdecl wcsstr(wstr wstr) ntdll.wcsstr
|
@ cdecl wcsstr(wstr wstr) ntdll.wcsstr
|
||||||
@ cdecl wcstod(wstr ptr) MSVCRT_wcstod
|
@ cdecl wcstod(wstr ptr) MSVCRT_wcstod
|
||||||
@ cdecl wcstok(wstr wstr) MSVCRT_wcstok
|
@ cdecl wcstok(wstr wstr) MSVCRT_wcstok
|
||||||
# stub wcstok_s
|
@ cdecl wcstok_s(ptr wstr ptr)
|
||||||
@ cdecl wcstol(wstr ptr long) ntdll.wcstol
|
@ cdecl wcstol(wstr ptr long) ntdll.wcstol
|
||||||
@ cdecl wcstombs(ptr ptr long) MSVCRT_wcstombs
|
@ cdecl wcstombs(ptr ptr long) MSVCRT_wcstombs
|
||||||
@ cdecl wcstombs_s(ptr ptr long wstr long) MSVCRT_wcstombs_s
|
@ cdecl wcstombs_s(ptr ptr long wstr long) MSVCRT_wcstombs_s
|
||||||
|
|
|
@ -1368,25 +1368,37 @@ MSVCRT_wchar_t* CDECL MSVCRT_wcspbrk( const MSVCRT_wchar_t* str, const MSVCRT_wc
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* wcstok (MSVCRT.@)
|
* wcstok_s (MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
MSVCRT_wchar_t * CDECL MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim )
|
MSVCRT_wchar_t * CDECL wcstok_s( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim,
|
||||||
|
MSVCRT_wchar_t **next_token )
|
||||||
{
|
{
|
||||||
thread_data_t *data = msvcrt_get_thread_data();
|
|
||||||
MSVCRT_wchar_t *ret;
|
MSVCRT_wchar_t *ret;
|
||||||
|
|
||||||
if (!str)
|
if (!MSVCRT_CHECK_PMT(delim != NULL) || !MSVCRT_CHECK_PMT(next_token != NULL) ||
|
||||||
if (!(str = data->wcstok_next)) return NULL;
|
!MSVCRT_CHECK_PMT(str != NULL || *next_token != NULL))
|
||||||
|
{
|
||||||
|
*MSVCRT__errno() = MSVCRT_EINVAL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (!str) str = *next_token;
|
||||||
|
|
||||||
while (*str && strchrW( delim, *str )) str++;
|
while (*str && strchrW( delim, *str )) str++;
|
||||||
if (!*str) return NULL;
|
if (!*str) return NULL;
|
||||||
ret = str++;
|
ret = str++;
|
||||||
while (*str && !strchrW( delim, *str )) str++;
|
while (*str && !strchrW( delim, *str )) str++;
|
||||||
if (*str) *str++ = 0;
|
if (*str) *str++ = 0;
|
||||||
data->wcstok_next = str;
|
*next_token = str;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* wcstok (MSVCRT.@)
|
||||||
|
*/
|
||||||
|
MSVCRT_wchar_t * CDECL MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim )
|
||||||
|
{
|
||||||
|
return wcstok_s(str, delim, &msvcrt_get_thread_data()->wcstok_next);
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* wctomb (MSVCRT.@)
|
* wctomb (MSVCRT.@)
|
||||||
|
|
Loading…
Reference in New Issue