[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:02:09 UTC 2012


The following commit has been merged in the wheezy branch:
commit 7434d6b7ba0eb4c22c9e19fbf94dc82bcd595a8f
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Thu Mar 15 23:41:33 2012 +0900

    msvcrt: Implement _mbcjmstojis.
    (cherry picked from commit c9f1489cab159c882b7110fa8475d86a5b849124)

diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index cde1e06..6d3e3fb 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -474,7 +474,23 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
      In all other cases, c is returned unchanged */
   if(get_mbcinfo()->mbcodepage == 932)
   {
-    FIXME("(%x): stub\n", c);
+    if(_ismbclegal(c) && HIBYTE(c) < 0xf0)
+    {
+      if(HIBYTE(c) >= 0xe0)
+        c -= 0x4000;
+
+      c = (((HIBYTE(c) - 0x81)*2 + 0x21) << 8) | LOBYTE(c);
+
+      if(LOBYTE(c) > 0x7f)
+        c -= 0x1;
+
+      if(LOBYTE(c) > 0x9d)
+        c += 0x83;
+      else
+        c -= 0x1f;
+    }
+    else
+      return 0; /* Codepage is 932, but c can't be converted */
   }
 
   return c;
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 76f558c..6103c1e 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -913,6 +913,7 @@ int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
 int            __cdecl MSVCRT__write(int,const void*,unsigned int);
 int            __cdecl _getch(void);
 int            __cdecl _ismbblead(unsigned int);
+int            __cdecl _ismbclegal(unsigned int c);
 int            __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str);
 MSVCRT_size_t  __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t);
 MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *);

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list