Commit cfca12e4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use ismbcodepage instead of mb_cur_max in mbcodepage dependent functions.

parent c9cdb550
......@@ -44,6 +44,7 @@ MSVCRT__locale_t MSVCRT_locale = NULL;
int MSVCRT___lc_codepage = 0;
int MSVCRT___lc_collate_cp = 0;
LCID MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1] = { 0 };
int MSVCRT___mb_cur_max = 1;
static unsigned char charmax = CHAR_MAX;
/* MT */
......@@ -209,7 +210,7 @@ find_best_locale_proc(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LO
extern int atoi(const char *);
/* Internal: Find the LCID for a locale specification */
static LCID MSVCRT_locale_to_LCID(const char *locale)
LCID MSVCRT_locale_to_LCID(const char *locale)
{
LCID lcid;
locale_search_t search;
......
......@@ -140,8 +140,8 @@ typedef struct MSVCRT_threadmbcinfostruct {
int ismbcodepage;
int mblcid;
unsigned short mbulinfo[6];
char mbctype[257];
char mbcasemap[256];
unsigned char mbctype[257];
unsigned char mbcasemap[256];
} MSVCRT_threadmbcinfo;
typedef struct MSVCRT_threadlocaleinfostruct *MSVCRT_pthreadlocinfo;
......@@ -197,9 +197,10 @@ typedef struct __thread_data thread_data_t;
extern thread_data_t *msvcrt_get_thread_data(void);
LCID MSVCRT_locale_to_LCID(const char *);
extern MSVCRT__locale_t MSVCRT_locale;
extern int MSVCRT___lc_codepage;
extern int MSVCRT___lc_collate_cp;
extern int MSVCRT___mb_cur_max;
extern WORD MSVCRT__ctype [257];
extern unsigned short *MSVCRT__pctype;
......
......@@ -1993,8 +1993,7 @@ static void test_wctob(void)
_setmbcp(1250);
ret = p_wctob(0x81);
/* wctob should not be affected by _setmbcp */
todo_wine ok(ret == EOF, "ret = %x\n", ret);
ok(ret == EOF, "ret = %x\n", ret);
setlocale(LC_ALL, "C");
ret = p_wctob(0x8141);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment