ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

wcstok.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 doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.