ReactOS 0.4.16-dev-959-g2ec3a19
ismbupr.cpp
Go to the documentation of this file.
1/***
2*ismbupr - Test if character is upper case (MBCS)
3*
4* Copyright (c) Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* Test if character is upper case (MBCS)
8*
9*******************************************************************************/
10#ifndef _MBCS
11 #error This file should only be compiled with _MBCS defined
12#endif
13
15#include <locale.h>
16/***
17* _ismbcupper - Test if character is upper case (MBCS)
18*
19*Purpose:
20* Test if the supplied character is upper case or not.
21* Handles MBCS characters correctly.
22*
23* Note: Use test against 0x00FF instead of _ISLEADBYTE
24* to ensure that we don't call SBCS routine with a two-byte
25* value.
26*
27*Entry:
28* unsigned int c = character to test
29*
30*Exit:
31* Returns TRUE if c is an upper case character; else FALSE
32*
33*Exceptions:
34*
35*******************************************************************************/
36
37extern "C" int __cdecl _ismbcupper_l(unsigned int const c, _locale_t const locale)
38{
39 _LocaleUpdate locale_update(locale);
40
41 if (c <= 0x00FF)
42 {
43 return _mbbisupper_l(c, locale_update.GetLocaleT());
44 }
45
46 return __dcrt_multibyte_check_type(c, locale_update.GetLocaleT(), _UPPER, true);
47}
48
49extern "C" int __cdecl _ismbcupper(unsigned int const c)
50{
51 return _ismbcupper_l(c, nullptr);
52}
#define __cdecl
Definition: accygwin.h:79
Definition: _locale.h:75
#define _mbbisupper_l(_c, p)
const GLubyte * c
Definition: glext.h:8905
#define _UPPER
Definition: ctype.h:65
int __cdecl _ismbcupper_l(unsigned int const c, _locale_t const locale)
Definition: ismbupr.cpp:37
int __cdecl _ismbcupper(unsigned int const c)
Definition: ismbupr.cpp:49