Alexandre Julliard : usp10: Build with msvcrt.

Alexandre Julliard julliard at winehq.org
Tue Jun 25 17:25:50 CDT 2019


Module: wine
Branch: master
Commit: 8355a2018921bc9018a7c5622324ab0da083af14
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8355a2018921bc9018a7c5622324ab0da083af14

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 25 08:34:11 2019 +0200

usp10: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/usp10/Makefile.in |  2 ++
 dlls/usp10/bidi.c      |  4 +---
 dlls/usp10/breaking.c  |  2 +-
 dlls/usp10/indic.c     |  2 +-
 dlls/usp10/opentype.c  |  2 +-
 dlls/usp10/usp10.c     | 15 +++++++--------
 6 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/dlls/usp10/Makefile.in b/dlls/usp10/Makefile.in
index 68d85fb..5b705e7 100644
--- a/dlls/usp10/Makefile.in
+++ b/dlls/usp10/Makefile.in
@@ -2,6 +2,8 @@ MODULE    = usp10.dll
 IMPORTLIB = usp10
 IMPORTS   = advapi32 user32 gdi32
 
+EXTRADLLFLAGS = -mno-cygwin
+
 C_SRCS = \
 	bidi.c \
 	bracket.c \
diff --git a/dlls/usp10/bidi.c b/dlls/usp10/bidi.c
index 1f04dd4..7de2be5 100644
--- a/dlls/usp10/bidi.c
+++ b/dlls/usp10/bidi.c
@@ -41,8 +41,6 @@
  * has been modified.
  */
 
-#include "config.h"
-
 #include <stdarg.h>
 #include <stdlib.h>
 #include "windef.h"
@@ -640,7 +638,7 @@ typedef struct tagBracketPair
     int end;
 } BracketPair;
 
-static int compr(const void *a, const void* b)
+static int __cdecl compr(const void *a, const void* b)
 {
     return ((BracketPair*)a)->start - ((BracketPair*)b)->start;
 }
diff --git a/dlls/usp10/breaking.c b/dlls/usp10/breaking.c
index 9b12d9e..480d692 100644
--- a/dlls/usp10/breaking.c
+++ b/dlls/usp10/breaking.c
@@ -18,7 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
  */
-#include "config.h"
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/dlls/usp10/indic.c b/dlls/usp10/indic.c
index 5a228e8..b537eb2 100644
--- a/dlls/usp10/indic.c
+++ b/dlls/usp10/indic.c
@@ -18,7 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
  */
-#include "config.h"
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c
index 5363271..a6ce760 100644
--- a/dlls/usp10/opentype.c
+++ b/dlls/usp10/opentype.c
@@ -658,7 +658,7 @@ static VOID *load_CMAP_format12_table(HDC hdc, ScriptCache *psc)
     return NULL;
 }
 
-static int compare_group(const void *a, const void* b)
+static int __cdecl compare_group(const void *a, const void* b)
 {
     const DWORD *chr = a;
     const CMAP_SegmentedCoverage_group *group = b;
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index a2e1a73..3cc6665 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -40,7 +40,6 @@
 
 #include "wine/debug.h"
 #include "wine/heap.h"
-#include "wine/unicode.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
 
@@ -876,7 +875,7 @@ static HRESULT init_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
         return E_INVALIDARG;
     }
     /* Ensure canonical result by zeroing extra space in lfFaceName */
-    size = strlenW(lf.lfFaceName);
+    size = lstrlenW(lf.lfFaceName);
     memset(lf.lfFaceName + size, 0, sizeof(lf.lfFaceName) - size * sizeof(WCHAR));
 
     EnterCriticalSection(&cs_script_cache);
@@ -952,7 +951,7 @@ static DWORD decode_surrogate_pair(const WCHAR *str, unsigned int index, unsigne
     return 0;
 }
 
-static int usp10_compare_script_range(const void *key, const void *value)
+static int __cdecl usp10_compare_script_range(const void *key, const void *value)
 {
     const struct usp10_script_range *range = value;
     const DWORD *ch = key;
@@ -978,7 +977,7 @@ static enum usp10_script get_char_script(const WCHAR *str, unsigned int index,
         return Script_CR;
 
     /* These punctuation characters are separated out as Latin punctuation */
-    if (strchrW(latin_punc,str[index]))
+    if (wcschr(latin_punc,str[index]))
         return Script_Punctuation2;
 
     /* These chars are itemized as Punctuation by Windows */
@@ -1023,7 +1022,7 @@ static enum usp10_script get_char_script(const WCHAR *str, unsigned int index,
     return range->script;
 }
 
-static int compare_FindGlyph(const void *a, const void* b)
+static int __cdecl compare_FindGlyph(const void *a, const void* b)
 {
     const FindGlyph_struct *find = (FindGlyph_struct*)a;
     const WORD *idx= (WORD*)b;
@@ -1534,7 +1533,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
             {
                 if (i > 0 && i < cInChars-1 &&
                     script_is_numeric(scripts[i-1]) &&
-                    strchrW(math_punc, pwcInChars[i]))
+                    wcschr(math_punc, pwcInChars[i]))
                 {
                     if (script_is_numeric(scripts[i+1]))
                     {
@@ -1543,7 +1542,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
                         strength[i] = strength[i-1];
                         i++;
                     }
-                    else if (strchrW(repeatable_math_punc, pwcInChars[i]))
+                    else if (wcschr(repeatable_math_punc, pwcInChars[i]))
                     {
                         int j;
                         for (j = i+1; j < cInChars; j++)
@@ -1967,7 +1966,7 @@ static void find_fallback_font(enum usp10_script scriptid, WCHAR *FaceName)
         DWORD count = LF_FACESIZE * sizeof(WCHAR);
         DWORD type;
 
-        sprintfW(value, szFmt, scriptInformation[scriptid].scriptTag);
+        swprintf(value, ARRAY_SIZE(value), szFmt, scriptInformation[scriptid].scriptTag);
         if (RegQueryValueExW(hkey, value, 0, &type, (BYTE *)FaceName, &count))
             lstrcpyW(FaceName,scriptInformation[scriptid].fallbackFont);
         RegCloseKey(hkey);




More information about the wine-cvs mailing list