mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 05:48:29 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
36
sdk/lib/crt/wstring/wcstok.c
Normal file
36
sdk/lib/crt/wstring/wcstok.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
/* taken from wine wcs.c */
|
||||
|
||||
#include <precomp.h>
|
||||
|
||||
/*********************************************************************
|
||||
* wcstok_s (MSVCRT.@)
|
||||
*/
|
||||
wchar_t * CDECL wcstok_s( wchar_t *str, const wchar_t *delim,
|
||||
wchar_t **next_token )
|
||||
{
|
||||
wchar_t *ret;
|
||||
|
||||
if (!MSVCRT_CHECK_PMT(delim != NULL) || !MSVCRT_CHECK_PMT(next_token != NULL) ||
|
||||
!MSVCRT_CHECK_PMT(str != NULL || *next_token != NULL))
|
||||
{
|
||||
_set_errno(EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
if (!str) str = *next_token;
|
||||
|
||||
while (*str && strchrW( delim, *str )) str++;
|
||||
if (!*str) return NULL;
|
||||
ret = str++;
|
||||
while (*str && !strchrW( delim, *str )) str++;
|
||||
if (*str) *str++ = 0;
|
||||
*next_token = str;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* wcstok (MSVCRT.@)
|
||||
*/
|
||||
wchar_t * CDECL wcstok( wchar_t *str, const wchar_t *delim )
|
||||
{
|
||||
return wcstok_s(str, delim, &msvcrt_get_thread_data()->wcstok_next);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue