[Gdiplus 2/6] Janitorial: Fix a typo, and improve comments, and function indentation (try 2)

Adam Petaccia adam at tpetaccia.com
Fri Jun 27 19:08:20 CDT 2008


---
 dlls/gdiplus/font.c       |    7 ++++---
 dlls/gdiplus/tests/font.c |    6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 4ebc6ac..43bde5d 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -95,10 +95,10 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST
GpFontFamily *fontFamily,
 {
     WCHAR facename[LF_FACESIZE];
     LOGFONTW* lfw;
-    const TEXTMETRICW* tmw;
+    GDIPCONST TEXTMETRICW* tmw;
     GpStatus stat;
 
-    if ((!fontFamily && fontFamily->FamilyName && font))
+    if (!(fontFamily && fontFamily->FamilyName && font))
         return InvalidParameter;
 
     TRACE("%p (%s), %f, %d, %d, %p\n", fontFamily,
@@ -130,7 +130,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST
GpFontFamily *fontFamily,
             /* FIXME: Figure out how this works...
              * MSDN says that if "DISPLAY" is a monitor, then pixel
should be
              * used. That's not what I got. Tests on Windows revealed
no output,
-             * and the tests in tests/font crash windows */
+             * and the tests in tests/font.c crash windows */
             lfw->lfHeight = 0; break;
         case UnitPixel:
             lfw->lfHeight = emSize; break;
@@ -176,6 +176,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC
hdc,
     (*font)->lfw.lfUnderline = logfont->lfUnderline;
     (*font)->lfw.lfStrikeOut = logfont->lfStrikeOut;
 
+    /* Just set these to defaults */
     (*font)->emSize = logfont->lfHeight;
     (*font)->unit = UnitPixel;
 
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 93efbc4..90fce18 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -33,9 +33,9 @@ static const WCHAR CourierNew[] =
{'C','o','u','r','i','e','r',' ','N','e','w','
 
 static const char *debugstr_w(LPCWSTR str)
 {
-   static char buf[1024];
-   WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL,
NULL);
-   return buf;
+    static char buf[1024];
+    WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL,
NULL);
+    return buf;
 }
 
 
-- 
1.5.4.3





More information about the wine-patches mailing list