Alexandre Julliard : gdiplus: Build with msvcrt.

Alexandre Julliard julliard at winehq.org
Wed Jun 5 16:12:37 CDT 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jun  5 08:32:33 2019 +0200

gdiplus: Build with msvcrt.

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

---

 dlls/gdiplus/Makefile.in | 2 ++
 dlls/gdiplus/font.c      | 9 ++++-----
 dlls/gdiplus/graphics.c  | 9 ++++-----
 dlls/gdiplus/metafile.c  | 1 -
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/dlls/gdiplus/Makefile.in b/dlls/gdiplus/Makefile.in
index ac12bd1..e73e7d4 100644
--- a/dlls/gdiplus/Makefile.in
+++ b/dlls/gdiplus/Makefile.in
@@ -3,6 +3,8 @@ IMPORTLIB = gdiplus
 IMPORTS   = uuid shlwapi ole32 user32 gdi32
 DELAYIMPORTS = windowscodecs
 
+EXTRADLLFLAGS = -mno-cygwin
+
 C_SRCS = \
 	brush.c \
 	customlinecap.c \
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 5e6aa54..eee2720 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -25,7 +25,6 @@
 #include "winnls.h"
 #include "winreg.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL (gdiplus);
 
@@ -507,7 +506,7 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW
     lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
     lf->lfQuality = DEFAULT_QUALITY;
     lf->lfPitchAndFamily = 0;
-    strcpyW(lf->lfFaceName, font->family->FamilyName);
+    lstrcpyW(lf->lfFaceName, font->family->FamilyName);
 
     TRACE("=> %s,%d\n", debugstr_w(lf->lfFaceName), lf->lfHeight);
 
@@ -710,7 +709,7 @@ static GpStatus find_installed_font(const WCHAR *name, struct font_metrics *fm)
     {
         HFONT hfont, old_font;
 
-        strcpyW(fm->facename, lf.lfFaceName);
+        lstrcpyW(fm->facename, lf.lfFaceName);
 
         hfont = CreateFontIndirectW(&lf);
         old_font = SelectObject(hdc, hfont);
@@ -1632,7 +1631,7 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm,
     if (lfw->lfFaceName[0] == '@')
         return 1;
 
-    if (fonts->count && strcmpiW(lfw->lfFaceName, fonts->FontFamilies[fonts->count-1]->FamilyName) == 0)
+    if (fonts->count && wcsicmp(lfw->lfFaceName, fonts->FontFamilies[fonts->count-1]->FamilyName) == 0)
         return 1;
 
     if (fonts->allocated == fonts->count)
@@ -1664,7 +1663,7 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm,
     /* skip duplicates */
     for (i=0; i<fonts->count; i++)
     {
-        if (strcmpiW(family->FamilyName, fonts->FontFamilies[i]->FamilyName) == 0)
+        if (wcsicmp(family->FamilyName, fonts->FontFamilies[i]->FamilyName) == 0)
         {
             GdipDeleteFontFamily(family);
             return 1;
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 3216a3e..3c83278 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -24,7 +24,6 @@
 #include "winbase.h"
 #include "winuser.h"
 #include "wingdi.h"
-#include "wine/unicode.h"
 
 #define COBJMACROS
 #include "objbase.h"
@@ -2225,7 +2224,7 @@ void get_log_fontW(const GpFont *font, GpGraphics *graphics, LOGFONTW *lf)
     lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
     lf->lfQuality = DEFAULT_QUALITY;
     lf->lfPitchAndFamily = 0;
-    strcpyW(lf->lfFaceName, font->family->FamilyName);
+    lstrcpyW(lf->lfFaceName, font->family->FamilyName);
 }
 
 static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font,
@@ -5114,7 +5113,7 @@ GpStatus gdip_format_string(HDC hdc,
 
     for(i = 0, j = 0; i < length; i++){
         /* FIXME: This makes the indexes passed to callback inaccurate. */
-        if(!isprintW(string[i]) && (string[i] != '\n'))
+        if(!iswprint(string[i]) && (string[i] != '\n'))
             continue;
 
         /* FIXME: tabs should be handled using tabstops from stringformat */
@@ -6941,7 +6940,7 @@ GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics *graphics, GDIPCONST UINT
         return InvalidParameter;
 
     if (length == -1)
-        length = strlenW(text);
+        length = lstrlenW(text);
 
     if (length == 0)
     {
@@ -7302,7 +7301,7 @@ static GpStatus draw_driver_string(GpGraphics *graphics, GDIPCONST UINT16 *text,
     GpStatus stat = NotImplemented;
 
     if (length == -1)
-        length = strlenW(text);
+        length = lstrlenW(text);
 
     if (graphics->hdc && !graphics->alpha_hdc &&
         ((flags & DriverStringOptionsRealizedAdvance) || length <= 1) &&
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index b65e456..47d5ac5 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -25,7 +25,6 @@
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
-#include "wine/unicode.h"
 
 #define COBJMACROS
 #include "objbase.h"




More information about the wine-cvs mailing list