[UCRT] Import Microsoft.Windows.SDK.CRTSource version 10.0.22621.3

Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3
License: MIT
This commit is contained in:
Timo Kreuzer 2024-05-11 07:03:12 +02:00
parent f1b60c66f0
commit 04e0dc4a7a
568 changed files with 115483 additions and 0 deletions

View file

@ -0,0 +1,34 @@
//
// wcstok.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Defines wcstok(), which tokenizes a string via repeated calls. See strtok()
// for more details.
//
#include <corecrt_internal.h>
#include <string.h>
_Check_return_
extern "C" wchar_t* __cdecl __acrt_wcstok_s_novalidation(
_Inout_opt_z_ wchar_t* string,
_In_z_ wchar_t const* control,
_Inout_ _Deref_prepost_opt_z_ wchar_t** context
);
extern "C" wchar_t* __cdecl wcstok(
wchar_t* const string,
wchar_t const* const control,
wchar_t** const context
)
{
wchar_t** const context_to_use = context != nullptr
? context
: &__acrt_getptd()->_wcstok_token;
return __acrt_wcstok_s_novalidation(string, control, context_to_use);
}