[MLANG]
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 23 Apr 2014 14:10:33 +0000 (14:10 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 23 Apr 2014 14:10:33 +0000 (14:10 +0000)
* Sync with Wine 1.7.17.
CORE-8080

svn path=/trunk/; revision=62908

reactos/dll/win32/mlang/mlang.c
reactos/dll/win32/mlang/mlang_classes.idl
reactos/media/doc/README.WINE

index 0df3c27..0b6e741 100644 (file)
@@ -39,6 +39,7 @@
 //#include "objbase.h"
 #include <rpcproxy.h>
 #include <mlang.h>
+#include <mimeole.h>
 
 #include <wine/unicode.h>
 #include <wine/debug.h>
@@ -47,8 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mlang);
 
 //#include "initguid.h"
 
-#define CP_UNICODE 1200
-
 static HRESULT MultiLanguage_create(IUnknown *pUnkOuter, LPVOID *ppObj);
 static HRESULT MLangConvertCharset_create(IUnknown *outer, void **obj);
 static HRESULT EnumRfc1766_create(LANGID LangId, IEnumRfc1766 **ppEnum);
@@ -577,8 +576,8 @@ static inline void sjis2jis(unsigned char *p1, unsigned char *p2)
 
 static int han2zen(unsigned char *p1, unsigned char *p2)
 {
-    int maru = FALSE;
-    int nigori = FALSE;
+    BOOL maru = FALSE;
+    BOOL nigori = FALSE;
     static const unsigned char char1[] = {129,129,129,129,129,131,131,131,131,
         131,131,131,131,131,131,129,131,131,131,131,131,131,131,131,131,131,
         131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,
@@ -625,7 +624,7 @@ static UINT ConvertJIS2SJIS(LPCSTR input, DWORD count, LPSTR output)
     DWORD i = 0;
     int j = 0;
     unsigned char p2,p;
-    int shifted = FALSE;
+    BOOL shifted = FALSE;
 
     while (i < count)
     {
@@ -693,7 +692,7 @@ static UINT ConvertSJIS2JIS(LPCSTR input, DWORD count, LPSTR output)
     DWORD i = 0;
     int j = 0;
     unsigned char p2,p;
-    int shifted = FALSE;
+    BOOL shifted = FALSE;
 
     while (i < count)
     {
@@ -3487,10 +3486,28 @@ static HRESULT WINAPI fnIMLangLineBreakConsole_BreakLineA(
     LONG* pcchLine,
     LONG* pcchSkip)
 {
+    LONG i, line = cchSrc, skip = 0;
+
     FIXME("(%p)->%i %i %s %i %i %p %p\n", iface, locale, uCodePage, debugstr_an(pszSrc,cchSrc), cchSrc, cMaxColumns, pcchLine, pcchSkip);
 
-    *pcchLine = cchSrc;
-    *pcchSkip = 0;
+    if (uCodePage == CP_USASCII && cchSrc > cMaxColumns)
+    {
+        for (line = cMaxColumns, i = cMaxColumns - 1; i >= 0; i--)
+        {
+            if (pszSrc[i] == ' ')
+            {
+                while (i >= 0 && pszSrc[i] == ' ')
+                {
+                    i--;
+                    line--;
+                    skip++;
+                }
+                break;
+            }
+        }
+    }
+    *pcchLine = line;
+    *pcchSkip = skip;
     return S_OK;
 }
 
index 1832e2b..645ff00 100644 (file)
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#pragma makedep register
+
 [
     helpstring("Multi Language Support"),
     threading(both),
index d71459e..3e41901 100644 (file)
@@ -103,7 +103,7 @@ reactos/dll/win32/mcicda           # Synced to Wine-1.7.1
 reactos/dll/win32/mciqtz32         # Synced to Wine-1.7.17
 reactos/dll/win32/mciseq           # Synced to Wine-1.7.1
 reactos/dll/win32/mciwave          # Synced to Wine-1.7.1
-reactos/dll/win32/mlang            # Synced to Wine-1.7.1
+reactos/dll/win32/mlang            # Synced to Wine-1.7.17
 reactos/dll/win32/mmdevapi         # Synced to Wine-1.7.1
 reactos/dll/win32/mpr              # Synced to Wine-1.7.1
 reactos/dll/win32/mprapi           # Synced to Wine-1.7.1