ReactOS 0.4.16-dev-2104-gb84fa49
mbctype.h File Reference
#include <corecrt.h>
Include dependency graph for mbctype.h:

Go to the source code of this file.

Macros

#define _MS   0x01
 
#define _MP   0x02
 
#define _M1   0x04
 
#define _M2   0x08
 
#define _SBUP   0x10
 
#define _SBLOW   0x20
 
#define _MBC_SINGLE   0
 
#define _MBC_LEAD   1
 
#define _MBC_TRAIL   2
 
#define _MBC_ILLEGAL   -1
 
#define _KANJI_CP   932
 
#define _MB_CP_SBCS   0
 
#define _MB_CP_OEM   -2
 
#define _MB_CP_ANSI   -3
 
#define _MB_CP_LOCALE   -4
 
#define _MBLEADTRAIL_DEFINED
 

Functions

_ACRTIMP int __cdecl _getmbcp (void)
 
_ACRTIMP int __cdecl _ismbbalnum (unsigned int)
 
_ACRTIMP int __cdecl _ismbbalpha (unsigned int)
 
_ACRTIMP int __cdecl _ismbbgraph (unsigned int)
 
_ACRTIMP int __cdecl _ismbbkalnum (unsigned int)
 
_ACRTIMP int __cdecl _ismbbkana (unsigned int)
 
_ACRTIMP int __cdecl _ismbbkprint (unsigned int)
 
_ACRTIMP int __cdecl _ismbbkpunct (unsigned int)
 
_ACRTIMP int __cdecl _ismbbprint (unsigned int)
 
_ACRTIMP int __cdecl _ismbbpunct (unsigned int)
 
_ACRTIMP int __cdecl _setmbcp (int)
 
_ACRTIMP int __cdecl _ismbblead (unsigned int)
 
_ACRTIMP int __cdecl _ismbblead_l (unsigned int, _locale_t)
 
_ACRTIMP int __cdecl _ismbbtrail (unsigned int)
 
_ACRTIMP int __cdecl _ismbslead (const unsigned char *, const unsigned char *)
 
_ACRTIMP int __cdecl _ismbstrail (const unsigned char *, const unsigned char *)
 

Variables

unsigned char MSVCRT_mbctype []
 

Macro Definition Documentation

◆ _KANJI_CP

#define _KANJI_CP   932

Definition at line 49 of file mbctype.h.

◆ _M1

#define _M1   0x04

Definition at line 38 of file mbctype.h.

◆ _M2

#define _M2   0x08

Definition at line 39 of file mbctype.h.

◆ _MB_CP_ANSI

#define _MB_CP_ANSI   -3

Definition at line 53 of file mbctype.h.

◆ _MB_CP_LOCALE

#define _MB_CP_LOCALE   -4

Definition at line 54 of file mbctype.h.

◆ _MB_CP_OEM

#define _MB_CP_OEM   -2

Definition at line 52 of file mbctype.h.

◆ _MB_CP_SBCS

#define _MB_CP_SBCS   0

Definition at line 51 of file mbctype.h.

◆ _MBC_ILLEGAL

#define _MBC_ILLEGAL   -1

Definition at line 47 of file mbctype.h.

◆ _MBC_LEAD

#define _MBC_LEAD   1

Definition at line 45 of file mbctype.h.

◆ _MBC_SINGLE

#define _MBC_SINGLE   0

Definition at line 44 of file mbctype.h.

◆ _MBC_TRAIL

#define _MBC_TRAIL   2

Definition at line 46 of file mbctype.h.

◆ _MBLEADTRAIL_DEFINED

#define _MBLEADTRAIL_DEFINED

Definition at line 69 of file mbctype.h.

◆ _MP

#define _MP   0x02

Definition at line 37 of file mbctype.h.

◆ _MS

#define _MS   0x01

Definition at line 36 of file mbctype.h.

◆ _SBLOW

#define _SBLOW   0x20

Definition at line 42 of file mbctype.h.

◆ _SBUP

#define _SBUP   0x10

Definition at line 41 of file mbctype.h.

Function Documentation

◆ _getmbcp()

◆ _ismbbalnum()

_ACRTIMP int __cdecl _ismbbalnum ( unsigned int  c)

Definition at line 20 of file ismbaln.c.

21{
22 return (isalnum(c) || _ismbbkalnum(c));
23}
int CDECL isalnum(int c)
Definition: ctype.c:214
const GLubyte * c
Definition: glext.h:8905
int _ismbbkalnum(unsigned int c)
Definition: ismbkaln.c:17

Referenced by _ismbcalnum().

◆ _ismbbalpha()

_ACRTIMP int __cdecl _ismbbalpha ( unsigned int  c)

Definition at line 16 of file ismbal.c.

17{
18 return (isalpha(c) || _ismbbkalnum(c));
19}
#define isalpha(c)
Definition: acclib.h:74
_ACRTIMP int __cdecl _ismbbkalnum(unsigned int)
Definition: ismbkaln.c:17

◆ _ismbbgraph()

_ACRTIMP int __cdecl _ismbbgraph ( unsigned int  c)

Definition at line 8 of file ismbgra.c.

9{
10 return (isgraph(c) || _ismbbkana(c));
11}
int CDECL isgraph(int c)
Definition: ctype.c:278
_ACRTIMP int __cdecl _ismbbkana(unsigned int)
Definition: mbcs.c:1831

◆ _ismbbkalnum()

_ACRTIMP int __cdecl _ismbbkalnum ( unsigned int  c)

Definition at line 17 of file ismbkaln.c.

18{
19 return (get_mbcinfo()->mbctype[c & 0xff] & _MKMOJI);
20}
#define _MKMOJI
Definition: mbstring.h:7

Referenced by _ismbbalpha().

◆ _ismbbkana()

_ACRTIMP int __cdecl _ismbbkana ( unsigned int  c)

Definition at line 1831 of file mbcs.c.

1832{
1833 return _ismbbkana_l( c, NULL );
1834}
#define NULL
Definition: types.h:112
int CDECL _ismbbkana_l(unsigned int c, _locale_t locale)
Definition: mbcs.c:1811

Referenced by _ismbbgraph(), _ismbbprint(), and _ismbcprint().

◆ _ismbbkprint()

_ACRTIMP int __cdecl _ismbbkprint ( unsigned int  c)

Definition at line 15 of file stubs.c.

17{
19 return 0;
20}
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15

◆ _ismbbkpunct()

_ACRTIMP int __cdecl _ismbbkpunct ( unsigned int  c)

Definition at line 17 of file iskpun.c.

18{
19 return (_mbctype[c & 0xff] & _MKPNCT);
20}
#define _mbctype
Definition: mbctype.h:33
#define _MKPNCT
Definition: mbstring.h:8

◆ _ismbblead()

◆ _ismbblead_l()

_ACRTIMP int __cdecl _ismbblead_l ( unsigned int  c,
_locale_t  locale 
)

Definition at line 2062 of file mbcs.c.

2063{
2064 pthreadmbcinfo mbcinfo;
2065
2066 if(!locale)
2067 mbcinfo = get_mbcinfo();
2068 else
2069 mbcinfo = locale->mbcinfo;
2070
2071 return (mbcinfo->mbctype[(c&0xff) + 1] & _M1) != 0;
2072}
Definition: _locale.h:75
#define _M1
Definition: mbctype.h:38
unsigned char mbctype[257]
Definition: msvcrt.h:138

◆ _ismbbprint()

_ACRTIMP int __cdecl _ismbbprint ( unsigned int  c)

Definition at line 8 of file ismbpri.c.

9{
10 return (isprint(c) || _ismbbkana(c));
11}
#define isprint(c)
Definition: acclib.h:73

◆ _ismbbpunct()

_ACRTIMP int __cdecl _ismbbpunct ( unsigned int  c)

Definition at line 18 of file ismbpun.c.

19{
20// (0xA1 <= c <= 0xA6)
21 return (get_mbcinfo()->mbctype[c & 0xff] & _MBPUNCT);
22}
#define _MBPUNCT
Definition: mbstring.h:18

◆ _ismbbtrail()

_ACRTIMP int __cdecl _ismbbtrail ( unsigned int  c)

Definition at line 2100 of file mbcs.c.

2101{
2102 return _ismbbtrail_l(c, NULL);
2103}
#define _ismbbtrail_l(_c, p)

Referenced by _ismbclegal(), _mbclen2(), _mbsbtype(), test__mbbtype(), and test_mbcp().

◆ _ismbslead()

_ACRTIMP int __cdecl _ismbslead ( const unsigned char start,
const unsigned char str 
)

Definition at line 2156 of file mbcs.c.

2157{
2158 return _ismbslead_l(start, str, NULL);
2159}
GLuint start
Definition: gl.h:1545
int CDECL _ismbslead_l(const unsigned char *start, const unsigned char *str, _locale_t locale)
Definition: mbcs.c:2124
const WCHAR * str

Referenced by _ismbstrail(), and test_mbcp().

◆ _ismbstrail()

_ACRTIMP int __cdecl _ismbstrail ( const unsigned char start,
const unsigned char str 
)

Definition at line 2179 of file mbcs.c.

2180{
2181 return _ismbstrail_l(start, str, NULL);
2182}
int CDECL _ismbstrail_l(const unsigned char *start, const unsigned char *str, _locale_t locale)
Definition: mbcs.c:2164

Referenced by common_mktemp_s_continue(), and test_mbcp().

◆ _setmbcp()

_ACRTIMP int __cdecl _setmbcp ( int  cp)

Definition at line 400 of file mbcs.c.

401{
403 threadmbcinfo *mbcinfo;
404
405 mbcinfo = create_mbcinfo(cp, -1, get_mbcinfo());
406 if(!mbcinfo)
407 {
408 *_errno() = EINVAL;
409 return -1;
410 }
411
412 if(data->locale_flags & LOCALE_THREAD)
413 {
414 if(data->locale_flags & LOCALE_FREE)
415 free_mbcinfo(data->mbcinfo);
416 data->mbcinfo = mbcinfo;
417 }
418 else
419 {
421 free_mbcinfo(MSVCRT_locale->mbcinfo);
422 MSVCRT_locale->mbcinfo = mbcinfo;
423 memcpy(MSVCRT_mbctype, MSVCRT_locale->mbcinfo->mbctype, sizeof(MSVCRT_mbctype));
425 }
426 return 0;
427}
int *CDECL _errno(void)
Definition: errno.c:215
#define EINVAL
Definition: errno.h:44
void free_mbcinfo(pthreadmbcinfo mbcinfo)
Definition: locale.c:1138
void CDECL _lock(int locknum)
Definition: lock.c:85
void CDECL _unlock(int locknum)
Definition: lock.c:114
thread_data_t *CDECL msvcrt_get_thread_data(void)
Definition: thread.c:45
#define LOCALE_FREE
Definition: msvcrt.h:172
#define LOCALE_THREAD
Definition: msvcrt.h:173
#define _MB_CP_LOCK
Definition: mtdll.h:49
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
POINT cp
Definition: magnifier.c:59
unsigned char MSVCRT_mbctype[257]
Definition: mbcs.c:38
threadmbcinfo * create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
Definition: mbcs.c:219
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define MSVCRT_locale
Definition: locale.h:80

Referenced by __init_global_locale(), msvcrt_init_locale(), test__ismbclx(), test__mbbtype(), test__mbbtype_l(), test__mbscat_s(), test__mbslwr_s(), test__mbsncpy_s(), test__mbsupr_s(), test_btowc(), test_cp_table(), test_ismbckata(), test_ismbclegal(), test_mbbtombc(), test_mbcjisjms(), test_mbcjmsjis(), test_mbcp(), test_mbctohira(), test_mbctokata(), test_mbctombb(), test_mbsrev(), test_mbsspn(), test_mbsspnp(), test_splitpath(), and test_wctob().

Variable Documentation

◆ MSVCRT_mbctype

unsigned char MSVCRT_mbctype[]
extern

Definition at line 38 of file mbcs.c.

Referenced by _setmbcp().