Don't mess up the msvcrt codepage on e.g. _MB_CP_ANSI.

This commit is contained in:
Bill Medland 2004-11-21 15:42:03 +00:00 committed by Alexandre Julliard
parent f81b6517b8
commit 2ea15a5673
1 changed files with 7 additions and 1 deletions

View File

@ -515,8 +515,13 @@ const char* _Strftime(char *out, unsigned int len, const char *fmt,
/*********************************************************************
* _setmbcp (MSVCRT.@)
*/
void _setmbcp(int cp)
int _setmbcp(int cp)
{
if (cp < 0)
{
FIXME ("Unreal codepages (e.g. %d) not implemented\n", cp);
return 0; /* Let's not confuse the caller by returning -1 */
}
LOCK_LOCALE;
if (msvcrt_current_lc_all_cp != cp)
{
@ -524,6 +529,7 @@ void _setmbcp(int cp)
msvcrt_current_lc_all_cp = cp;
}
UNLOCK_LOCALE;
return 0;
}
/*********************************************************************