mirror of
https://github.com/reactos/reactos.git
synced 2025-08-10 21:15:35 +00:00

- Implement new versions of wctomb and wcstombs, which consider the language set by setlocale() and work according to all behaviours I could find when testing under WinXP SP2. This was tested with an own test suite (which I can commit as well if anyone is interested) - Do a real conversion to MultiByte characters using wctomb in fputwc and vfwprintf. (verified under WinXP SP2) - Set 'MSVCRT___lc_codepage' and 'MSVCRT___lc_collate_cp' to 1252 by default ("C" locale) and not the current active codepage (which might not work with i.e. Eastern codepages) - Add a new check for 'MultiByteCount < 0' to WideCharToMultiByte (also verified under WinXP SP2) - Change MB_LEN_MAX back to 2, the value 5 only applies to newer CRT's (msvcrt only handles single-byte and double-byte characters) - Don't compile the Wine-imported 'wcscpy_s', it isn't available in msvcrt svn path=/trunk/; revision=34557
61 lines
1.3 KiB
C
61 lines
1.3 KiB
C
#ifndef __CRT_INTERNAL_MBSTRING_H
|
|
#define __CRT_INTERNAL_MBSTRING_H
|
|
|
|
#define _MALPHA 0x01
|
|
#define _MBLANK 0x02
|
|
#define _MDIGIT 0x04
|
|
#define _MKMOJI 0x08
|
|
#define _MKPNCT 0x10
|
|
#define _MLEAD 0x20
|
|
#define _MPUNCT 0x40
|
|
#define _MTRAIL 0x80
|
|
|
|
#define _MBALNUM (_MALPHA | _MDIGIT | _MKPNCT | _MKMOJI)
|
|
#define _MBALPHA (_MALPHA | _MKPNCT | _MKMOJI)
|
|
#define _MBGRAPH (_MALPHA | _MDIGIT | _MPUNCT | _MKPNCT | _MKMOJI)
|
|
#define _MBKANA (_MKPNCT | _MKMOJI)
|
|
#define _MBPRINT (_MALPHA | _MDIGIT | _MPUNCT | _MBLANK | _MKPNCT | _MKMOJI)
|
|
#define _MBPUNCT (_MPUNCT | _MKPNCT)
|
|
|
|
#define _MBLMASK(c) ((c) & 255)
|
|
#define _MBHMASK(c) ((c) & ~255)
|
|
#define _MBGETL(c) ((c) & 255)
|
|
#define _MBGETH(c) (((c) >> 8) & 255)
|
|
|
|
#define _MBIS16(c) ((c) & 0xff00)
|
|
|
|
/* Macros */
|
|
#define B _MBLANK
|
|
#define D _MDIGIT
|
|
#define P _MPUNCT
|
|
#define T _MTRAIL
|
|
|
|
/* Macros */
|
|
#define AT (_MALPHA | _MTRAIL)
|
|
#define GT (_MKPNCT | _MTRAIL)
|
|
#define KT (_MKMOJI | _MTRAIL)
|
|
#define LT (_MLEAD | _MTRAIL)
|
|
#define PT (_MPUNCT | _MTRAIL)
|
|
|
|
#define MAX_LOCALE_LENGTH 256
|
|
extern unsigned char _mbctype[257];
|
|
extern int MSVCRT___lc_codepage;
|
|
extern char MSVCRT_current_lc_all[MAX_LOCALE_LENGTH];
|
|
|
|
#if defined (_MSC_VER)
|
|
|
|
#undef _ismbbkana
|
|
#undef _ismbbkpunct
|
|
#undef _ismbbalpha
|
|
#undef _ismbbalnum
|
|
#undef _ismbbgraph
|
|
#undef _ismbbkalnum
|
|
#undef _ismbblead
|
|
#undef _ismbbprint
|
|
#undef _ismbbpunct
|
|
#undef _ismbbtrail
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|