79635: [PATCH 2/5] gdi32: Move the font list initialisation to a separate function.

buildbot at kegel.com buildbot at kegel.com
Thu Oct 6 19:51:12 CDT 2011


This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.

For more info about this message, see http://wiki.winehq.org/BuildBot

The Buildbot has detected a failed build on builder runtests-default while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-default/builds/34 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed git

Errors:
error: patch failed: dlls/gdi32/freetype.c:282
error: dlls/gdi32/freetype.c: patch does not apply
error: patch failed: dlls/gdi32/freetype.c:2745
error: dlls/gdi32/freetype.c: patch does not apply

-------------- next part --------------
From: Huw Davies <huw at codeweavers.com>
Subject: [PATCH 1/5] gdi32: Keep track of the english family name if there's a localised name as well.
Message-Id: <1317936368-4103-1-git-send-email-huw at codeweavers.com>
Date: Thu,  6 Oct 2011 16:26:04 -0500

---
 dlls/gdi32/freetype.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 81c704b..ae8ca41 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -282,6 +282,7 @@ typedef struct tagFace {
 typedef struct tagFamily {
     struct list entry;
     const WCHAR *FamilyName;
+    const WCHAR *EnglishName;
     struct list faces;
 } Family;
 
@@ -1378,6 +1379,7 @@ static INT AddFontToList(const char *file, void *font_data_ptr, DWORD font_data_
             if(!family) {
                 family = HeapAlloc(GetProcessHeap(), 0, sizeof(*family));
                 family->FamilyName = strdupW(localised_family ? localised_family : english_family);
+                family->EnglishName = localised_family ? strdupW(english_family) : NULL;
                 list_init(&family->faces);
                 list_add_tail(&font_list, &family->entry);
 

From: Huw Davies <huw at codeweavers.com>
Subject: [PATCH 2/5] gdi32: Move the font list initialisation to a separate function.
Message-Id: <1317936368-4103-2-git-send-email-huw at codeweavers.com>
Date: Thu,  6 Oct 2011 16:26:05 -0500

---
 dlls/gdi32/freetype.c |   64 +++++++++++++++++++++++++++---------------------
 1 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index ae8ca41..62c0504 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -2745,12 +2745,7 @@ sym_not_found:
     return FALSE;
 }
 
-/*************************************************************
- *    WineEngInit
- *
- * Initialize FreeType library and create a list of available faces
- */
-BOOL WineEngInit(void)
+static void init_font_list(void)
 {
     static const WCHAR dot_fonW[] = {'.','f','o','n','\0'};
     static const WCHAR pathW[] = {'P','a','t','h',0};
@@ -2758,22 +2753,8 @@ BOOL WineEngInit(void)
     DWORD valuelen, datalen, i = 0, type, dlen, vlen;
     WCHAR windowsdir[MAX_PATH];
     char *unixname;
-    HANDLE font_mutex;
     const char *data_dir;
 
-    TRACE("\n");
-
-    /* update locale dependent font info in registry */
-    update_font_info();
-
-    if(!init_freetype()) return FALSE;
-
-    if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL) {
-        ERR("Failed to create font mutex\n");
-        return FALSE;
-    }
-    WaitForSingleObject(font_mutex, INFINITE);
-
     delete_external_font_keys();
 
     /* load the system bitmap fonts */
@@ -2791,7 +2772,8 @@ BOOL WineEngInit(void)
     /* load the system truetype fonts */
     data_dir = wine_get_data_dir();
     if (!data_dir) data_dir = wine_get_build_dir();
-    if (data_dir && (unixname = HeapAlloc(GetProcessHeap(), 0, strlen(data_dir) + sizeof("/fonts/")))) {
+    if (data_dir && (unixname = HeapAlloc(GetProcessHeap(), 0, strlen(data_dir) + sizeof("/fonts/"))))
+    {
         strcpy(unixname, data_dir);
         strcat(unixname, "/fonts/");
         ReadFontDir(unixname, TRUE);
@@ -2804,20 +2786,22 @@ BOOL WineEngInit(void)
        will skip these. */
     if(RegOpenKeyW(HKEY_LOCAL_MACHINE,
                    is_win9x() ? win9x_font_reg_key : winnt_font_reg_key,
-		   &hkey) == ERROR_SUCCESS) {
+                   &hkey) == ERROR_SUCCESS)
+    {
         LPWSTR data, valueW;
         RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-			 &valuelen, &datalen, NULL, NULL);
+                         &valuelen, &datalen, NULL, NULL);
 
-	valuelen++; /* returned value doesn't include room for '\0' */
-	valueW = HeapAlloc(GetProcessHeap(), 0, valuelen * sizeof(WCHAR));
-	data = HeapAlloc(GetProcessHeap(), 0, datalen * sizeof(WCHAR));
+        valuelen++; /* returned value doesn't include room for '\0' */
+        valueW = HeapAlloc(GetProcessHeap(), 0, valuelen * sizeof(WCHAR));
+        data = HeapAlloc(GetProcessHeap(), 0, datalen * sizeof(WCHAR));
         if (valueW && data)
         {
             dlen = datalen * sizeof(WCHAR);
             vlen = valuelen;
             while(RegEnumValueW(hkey, i++, valueW, &vlen, NULL, &type, (LPBYTE)data,
-                                &dlen) == ERROR_SUCCESS) {
+                                &dlen) == ERROR_SUCCESS)
+            {
                 if(data[0] && (data[1] == ':'))
                 {
                     if((unixname = wine_get_unix_file_name(data)))
@@ -2848,7 +2832,7 @@ BOOL WineEngInit(void)
         }
         HeapFree(GetProcessHeap(), 0, data);
         HeapFree(GetProcessHeap(), 0, valueW);
-	RegCloseKey(hkey);
+        RegCloseKey(hkey);
     }
 
     load_fontconfig_fonts();
@@ -2885,6 +2869,30 @@ BOOL WineEngInit(void)
         }
         RegCloseKey(hkey);
     }
+}
+
+/*************************************************************
+ *    WineEngInit
+ *
+ * Initialize FreeType library and create a list of available faces
+ */
+BOOL WineEngInit(void)
+{
+    HANDLE font_mutex;
+
+    /* update locale dependent font info in registry */
+    update_font_info();
+
+    if(!init_freetype()) return FALSE;
+
+    if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL)
+    {
+        ERR("Failed to create font mutex\n");
+        return FALSE;
+    }
+    WaitForSingleObject(font_mutex, INFINITE);
+
+    init_font_list();
 
     DumpFontList();
     LoadSubstList();



More information about the wine-tests-results mailing list