[PATCH 1/2] Revert "usp10: Build with msvcrt."

Jeff Smith whydoubt at gmail.com
Wed Mar 18 14:53:16 CDT 2020


This reverts commit 8355a2018921bc9018a7c5622324ab0da083af14.
Done in preparation for moving usp10 calls into gdi32.

Signed-off-by: Jeff Smith <whydoubt at gmail.com>
---
 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, 14 insertions(+), 13 deletions(-)

diff --git a/dlls/usp10/Makefile.in b/dlls/usp10/Makefile.in
index 5b705e7fe4..68d85fb443 100644
--- a/dlls/usp10/Makefile.in
+++ b/dlls/usp10/Makefile.in
@@ -2,8 +2,6 @@ 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 e1d0a11697..a4ac22e491 100644
--- a/dlls/usp10/bidi.c
+++ b/dlls/usp10/bidi.c
@@ -41,6 +41,8 @@
  * has been modified.
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 #include <stdlib.h>
 #include "windef.h"
@@ -638,7 +640,7 @@ typedef struct tagBracketPair
     int end;
 } BracketPair;
 
-static int __cdecl compr(const void *a, const void* b)
+static int 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 480d69234a..9b12d9e63d 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 b537eb232d..5a228e88de 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 a6ce76072d..53632714a4 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 __cdecl compare_group(const void *a, const void* b)
+static int 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 c9fe12a544..ea877bc19e 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -40,6 +40,7 @@
 
 #include "wine/debug.h"
 #include "wine/heap.h"
+#include "wine/unicode.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
 
@@ -875,7 +876,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 = lstrlenW(lf.lfFaceName);
+    size = strlenW(lf.lfFaceName);
     memset(lf.lfFaceName + size, 0, sizeof(lf.lfFaceName) - size * sizeof(WCHAR));
 
     EnterCriticalSection(&cs_script_cache);
@@ -952,7 +953,7 @@ static DWORD decode_surrogate_pair(const WCHAR *str, unsigned int index, unsigne
     return 0;
 }
 
-static int __cdecl usp10_compare_script_range(const void *key, const void *value)
+static int usp10_compare_script_range(const void *key, const void *value)
 {
     const struct usp10_script_range *range = value;
     const DWORD *ch = key;
@@ -978,7 +979,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 (wcschr(latin_punc,str[index]))
+    if (strchrW(latin_punc,str[index]))
         return Script_Punctuation2;
 
     /* These chars are itemized as Punctuation by Windows */
@@ -1023,7 +1024,7 @@ static enum usp10_script get_char_script(const WCHAR *str, unsigned int index,
     return range->script;
 }
 
-static int __cdecl compare_FindGlyph(const void *a, const void* b)
+static int compare_FindGlyph(const void *a, const void* b)
 {
     const FindGlyph_struct *find = (FindGlyph_struct*)a;
     const WORD *idx= (WORD*)b;
@@ -1534,7 +1535,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
             {
                 if (i > 0 && i < cInChars-1 &&
                     script_is_numeric(scripts[i-1]) &&
-                    wcschr(math_punc, pwcInChars[i]))
+                    strchrW(math_punc, pwcInChars[i]))
                 {
                     if (script_is_numeric(scripts[i+1]))
                     {
@@ -1543,7 +1544,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
                         strength[i] = strength[i-1];
                         i++;
                     }
-                    else if (wcschr(repeatable_math_punc, pwcInChars[i]))
+                    else if (strchrW(repeatable_math_punc, pwcInChars[i]))
                     {
                         int j;
                         for (j = i+1; j < cInChars; j++)
@@ -1967,7 +1968,7 @@ static void find_fallback_font(enum usp10_script scriptid, WCHAR *FaceName)
         DWORD count = LF_FACESIZE * sizeof(WCHAR);
         DWORD type;
 
-        swprintf(value, ARRAY_SIZE(value), szFmt, scriptInformation[scriptid].scriptTag);
+        sprintfW(value, szFmt, scriptInformation[scriptid].scriptTag);
         if (RegQueryValueExW(hkey, value, 0, &type, (BYTE *)FaceName, &count))
             lstrcpyW(FaceName,scriptInformation[scriptid].fallbackFont);
         RegCloseKey(hkey);
-- 
2.23.0




More information about the wine-devel mailing list