Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenwcstok.c
Go to the documentation of this file.
00001 /* taken from wine wcs.c */ 00002 00003 #include <precomp.h> 00004 00005 /********************************************************************* 00006 * wcstok_s (MSVCRT.@) 00007 */ 00008 wchar_t * CDECL wcstok_s( wchar_t *str, const wchar_t *delim, 00009 wchar_t **next_token ) 00010 { 00011 wchar_t *ret; 00012 00013 if (!MSVCRT_CHECK_PMT(delim != NULL) || !MSVCRT_CHECK_PMT(next_token != NULL) || 00014 !MSVCRT_CHECK_PMT(str != NULL || *next_token != NULL)) 00015 { 00016 _set_errno(EINVAL); 00017 return NULL; 00018 } 00019 if (!str) str = *next_token; 00020 00021 while (*str && strchrW( delim, *str )) str++; 00022 if (!*str) return NULL; 00023 ret = str++; 00024 while (*str && !strchrW( delim, *str )) str++; 00025 if (*str) *str++ = 0; 00026 *next_token = str; 00027 return ret; 00028 } 00029 00030 /********************************************************************* 00031 * wcstok (MSVCRT.@) 00032 */ 00033 wchar_t * CDECL wcstok( wchar_t *str, const wchar_t *delim ) 00034 { 00035 return wcstok_s(str, delim, &msvcrt_get_thread_data()->wcstok_next); 00036 } Generated on Sun May 27 2012 04:36:47 for ReactOS by
1.7.6.1
|