mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 02:43:09 +00:00
[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:
parent
f1b60c66f0
commit
04e0dc4a7a
568 changed files with 115483 additions and 0 deletions
52
sdk/lib/ucrt/mbstring/mbtokata.cpp
Normal file
52
sdk/lib/ucrt/mbstring/mbtokata.cpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
/***
|
||||
*mbtokata.c - Converts character to katakana.
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*
|
||||
*Purpose:
|
||||
* Converts a character from hiragana to katakana.
|
||||
*
|
||||
*******************************************************************************/
|
||||
#ifndef _MBCS
|
||||
#error This file should only be compiled with _MBCS defined
|
||||
#endif
|
||||
|
||||
#include <corecrt_internal_mbstring.h>
|
||||
#include <locale.h>
|
||||
|
||||
|
||||
/***
|
||||
*unsigned short _mbctokata(c) - Converts character to katakana.
|
||||
*
|
||||
*Purpose:
|
||||
* If the character c is hiragana, convert to katakana.
|
||||
*
|
||||
*Entry:
|
||||
* unsigned int c - Character to convert.
|
||||
*
|
||||
*Exit:
|
||||
* Returns converted character.
|
||||
*
|
||||
*Exceptions:
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
extern "C" unsigned int __cdecl _mbctokata_l(
|
||||
unsigned int c,
|
||||
_locale_t plocinfo
|
||||
)
|
||||
{
|
||||
if (_ismbchira_l(c, plocinfo)) {
|
||||
c += 0xa1;
|
||||
if (c >= 0x837f)
|
||||
c++;
|
||||
}
|
||||
return(c);
|
||||
}
|
||||
|
||||
extern "C" unsigned int (__cdecl _mbctokata)(
|
||||
unsigned int c
|
||||
)
|
||||
{
|
||||
return _mbctokata_l(c, nullptr);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue