mirror of
https://github.com/reactos/reactos.git
synced 2025-07-06 19:31:22 +00:00

Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3 License: MIT
27 lines
550 B
C++
27 lines
550 B
C++
//
|
|
// common_utf8.cpp
|
|
//
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//
|
|
// Common UTF-8 utilities
|
|
//
|
|
|
|
#include <corecrt_internal.h>
|
|
#include <corecrt_internal_mbstring.h>
|
|
#include <corecrt_internal_ptd_propagation.h>
|
|
|
|
namespace __crt_mbstring
|
|
{
|
|
size_t return_illegal_sequence(mbstate_t* ps, __crt_cached_ptd_host& ptd)
|
|
{
|
|
*ps = {};
|
|
ptd.get_errno().set(EILSEQ);
|
|
return INVALID;
|
|
}
|
|
|
|
size_t reset_and_return(size_t retval, mbstate_t* ps)
|
|
{
|
|
*ps = {};
|
|
return retval;
|
|
}
|
|
}
|