Fix bogus unreal code page messages in _setmbcp

Rein Klazes wijn at wanadoo.nl
Sun Nov 20 07:03:34 CST 2005


Hi,

Changelog;
dlls/msvcrt	: locale.c
Fix bogus unreal code page messages in _setmbcp();

Rein.
-------------- next part --------------
--- wine/dlls/msvcrt/locale.c	2005-09-20 10:46:26.000000000 +0200
+++ mywine/dlls/msvcrt/locale.c	2005-11-20 12:53:42.000000000 +0100
@@ -519,10 +519,11 @@ const char* _Strftime(char *out, unsigne
 int _setmbcp(int cp)
 {
   LOCK_LOCALE;
-  if ((msvcrt_current_lc_all_cp != cp) && (cp > _MB_CP_SBCS))
+  if ( cp > _MB_CP_SBCS)
   {
-    /* FIXME: set ctype behaviour for this cp */
-    msvcrt_current_lc_all_cp = cp;
+    if( msvcrt_current_lc_all_cp != cp)
+      /* FIXME: set ctype behaviour for this cp */
+      msvcrt_current_lc_all_cp = cp;
   }
   else if(cp == _MB_CP_ANSI)
   {
@@ -539,13 +540,14 @@ int _setmbcp(int cp)
   }
   else if(cp == _MB_CP_SBCS)
   {
-    FIXME ("SBCS codepages (e.g. %d) not implemented\n", cp);
+    FIXME ("SBCS codepages not implemented\n");
   }
   else
   {
     FIXME ("Unreal codepages (e.g. %d) not implemented\n", cp);
   }
   UNLOCK_LOCALE;
+  TRACE("(%d) -> %d\n", cp, msvcrt_current_lc_all_cp);
   return 0;
 }
 


More information about the wine-patches mailing list