ReactOS 0.4.16-dev-959-g2ec3a19
ismbprn.cpp
Go to the documentation of this file.
1/***
2*ismbprn.c - Test character for display character (MBCS)
3*
4* Copyright (c) Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* Test character for display character (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
18/***
19* _ismbcprint - Test character for display character (MBCS)
20*
21*Purpose:
22* Test if the character is a display character.
23* Handles MBCS chars correctly.
24*
25* Note: Use test against 0x00FF to ensure that we don't
26* call SBCS routine with a two-byte value.
27*
28*Entry:
29* unsigned int c = character to test
30*
31*Exit:
32* Returns TRUE if character is display character, else FALSE
33*
34*Exceptions:
35*
36*******************************************************************************/
37
38extern "C" int __cdecl _ismbcprint_l(unsigned int const c, _locale_t const locale)
39{
40 _LocaleUpdate locale_update(locale);
41
42 if (c <= 0x00FF)
43 {
44 return _ismbbprint_l(c, locale_update.GetLocaleT());
45 }
46
47 return __dcrt_multibyte_check_type(c, locale_update.GetLocaleT(), _CONTROL, false);
48}
49
50extern "C" int __cdecl _ismbcprint(unsigned int const c)
51{
52 return _ismbcprint_l(c, nullptr);
53}
#define __cdecl
Definition: accygwin.h:79
Definition: _locale.h:75
#define _ismbbprint_l(_c, pt)
const GLubyte * c
Definition: glext.h:8905
#define _CONTROL
Definition: ctype.h:71
int __cdecl _ismbcprint_l(unsigned int const c, _locale_t const locale)
Definition: ismbprn.cpp:38
int __cdecl _ismbcprint(unsigned int const c)
Definition: ismbprn.cpp:50