[1/5] gdi32: Rename font_list to family_list.

Kusanagi Kouichi slash at ac.auone-net.jp
Sun Apr 22 05:55:55 CDT 2012


It's a list of font families. The next patch reuse font_list.

Signed-off-by: Kusanagi Kouichi <slash at ac.auone-net.jp>
---
 dlls/gdi32/freetype.c |   38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 3875e4f..b98a843 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -377,7 +377,7 @@ static struct list system_links = LIST_INIT(system_links);
 
 static struct list font_subst_list = LIST_INIT(font_subst_list);
 
-static struct list font_list = LIST_INIT(font_list);
+static struct list family_list = LIST_INIT(family_list);
 
 struct freetype_physdev
 {
@@ -908,7 +908,7 @@ static Face *find_face_from_filename(const WCHAR *file_name, const WCHAR *face_n
     WideCharToMultiByte(CP_UNIXCP, 0, file_name, -1, file_nameA, len, NULL, NULL);
     TRACE("looking for file %s name %s\n", debugstr_a(file_nameA), debugstr_w(face_name));
 
-    LIST_FOR_EACH_ENTRY(family, &font_list, Family, entry)
+    LIST_FOR_EACH_ENTRY(family, &family_list, Family, entry)
     {
         const struct list *face_list;
         if(face_name && strcmpiW(face_name, family->FamilyName))
@@ -938,7 +938,7 @@ static Family *find_family_from_name(const WCHAR *name)
 {
     Family *family;
 
-    LIST_FOR_EACH_ENTRY(family, &font_list, Family, entry)
+    LIST_FOR_EACH_ENTRY(family, &family_list, Family, entry)
     {
         if(!strcmpiW(family->FamilyName, name))
             return family;
@@ -951,7 +951,7 @@ static Family *find_family_from_any_name(const WCHAR *name)
 {
     Family *family;
 
-    LIST_FOR_EACH_ENTRY(family, &font_list, Family, entry)
+    LIST_FOR_EACH_ENTRY(family, &family_list, Family, entry)
     {
         if(!strcmpiW(family->FamilyName, name))
             return family;
@@ -1425,7 +1425,7 @@ static void load_font_list_from_cache(HKEY hkey_font_cache)
         }
 
         family = create_family(strdupW(family_name), english_family);
-        list_add_tail(&font_list, &family->entry);
+        list_add_tail(&family_list, &family->entry);
 
         if(english_family)
         {
@@ -1582,7 +1582,7 @@ static Family *get_family( FT_Face ft_face, BOOL vertical )
     if (!family)
     {
         family = create_family( name, english_name );
-        list_add_tail( &font_list, &family->entry );
+        list_add_tail( &family_list, &family->entry );
 
         if (english_name)
         {
@@ -1924,7 +1924,7 @@ static void DumpFontList(void)
     Face *face;
     struct list *family_elem_ptr, *face_elem_ptr;
 
-    LIST_FOR_EACH(family_elem_ptr, &font_list) {
+    LIST_FOR_EACH(family_elem_ptr, &family_list) {
         family = LIST_ENTRY(family_elem_ptr, Family, entry); 
         TRACE("Family: %s\n", debugstr_w(family->FamilyName));
         LIST_FOR_EACH(face_elem_ptr, &family->faces) {
@@ -1989,7 +1989,7 @@ static void LoadReplaceList(void)
                         new_family->EnglishName = NULL;
                         list_init(&new_family->faces);
                         new_family->replacement = &family->faces;
-                        list_add_tail(&font_list, &new_family->entry);
+                        list_add_tail(&family_list, &new_family->entry);
                     }
                 }
                 else
@@ -2652,7 +2652,7 @@ static void update_reg_entries(void)
 
     /* enumerate the fonts and add external ones to the two keys */
 
-    LIST_FOR_EACH(family_elem_ptr, &font_list) {
+    LIST_FOR_EACH(family_elem_ptr, &family_list) {
         family = LIST_ENTRY(family_elem_ptr, Family, entry); 
         len_fam = strlenW(family->FamilyName) + sizeof(TrueType) / sizeof(WCHAR) + 1;
         LIST_FOR_EACH(face_elem_ptr, &family->faces) {
@@ -3675,12 +3675,12 @@ static void init_font_list(void)
 static BOOL move_to_front(const WCHAR *name)
 {
     Family *family, *cursor2;
-    LIST_FOR_EACH_ENTRY_SAFE(family, cursor2, &font_list, Family, entry)
+    LIST_FOR_EACH_ENTRY_SAFE(family, cursor2, &family_list, Family, entry)
     {
         if(!strcmpiW(family->FamilyName, name))
         {
             list_remove(&family->entry);
-            list_add_head(&font_list, &family->entry);
+            list_add_head(&family_list, &family->entry);
             return TRUE;
         }
     }
@@ -4474,7 +4474,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
         goto done;
     }
 
-    if(list_empty(&font_list)) /* No fonts installed */
+    if(list_empty(&family_list)) /* No fonts installed */
     {
 	TRACE("No fonts installed\n");
         goto done;
@@ -4531,7 +4531,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
 	   where we'll either use the charset of the current ansi codepage
 	   or if that's unavailable the first charset that the font supports.
 	*/
-        LIST_FOR_EACH(family_elem_ptr, &font_list) {
+        LIST_FOR_EACH(family_elem_ptr, &family_list) {
             family = LIST_ENTRY(family_elem_ptr, Family, entry);
             if (!strcmpiW(family->FamilyName, FaceName) ||
                 (psub && !strcmpiW(family->FamilyName, psub->to.name)))
@@ -4554,7 +4554,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
 	}
 
         /* Search by full face name. */
-        LIST_FOR_EACH(family_elem_ptr, &font_list) {
+        LIST_FOR_EACH(family_elem_ptr, &family_list) {
             family = LIST_ENTRY(family_elem_ptr, Family, entry);
             face_list = get_face_list_from_family(family);
             LIST_FOR_EACH(face_elem_ptr, face_list) {
@@ -4628,7 +4628,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
         strcpyW(lf.lfFaceName, defSans);
     else
         strcpyW(lf.lfFaceName, defSans);
-    LIST_FOR_EACH(family_elem_ptr, &font_list) {
+    LIST_FOR_EACH(family_elem_ptr, &family_list) {
         family = LIST_ENTRY(family_elem_ptr, Family, entry);
         if(!strcmpiW(family->FamilyName, lf.lfFaceName)) {
             font_link = find_font_link(family->FamilyName);
@@ -4646,7 +4646,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
     }
 
     last_resort_family = NULL;
-    LIST_FOR_EACH(family_elem_ptr, &font_list) {
+    LIST_FOR_EACH(family_elem_ptr, &family_list) {
         family = LIST_ENTRY(family_elem_ptr, Family, entry);
         font_link = find_font_link(family->FamilyName);
         face_list = get_face_list_from_family(family);
@@ -4669,7 +4669,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
         goto found;
     }
 
-    LIST_FOR_EACH(family_elem_ptr, &font_list) {
+    LIST_FOR_EACH(family_elem_ptr, &family_list) {
         family = LIST_ENTRY(family_elem_ptr, Family, entry);
         face_list = get_face_list_from_family(family);
         LIST_FOR_EACH(face_elem_ptr, face_list) {
@@ -5266,7 +5266,7 @@ static BOOL freetype_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc,
             plf = &lf;
         }
 
-        LIST_FOR_EACH(family_elem_ptr, &font_list) {
+        LIST_FOR_EACH(family_elem_ptr, &family_list) {
             family = LIST_ENTRY(family_elem_ptr, Family, entry);
             if(family_matches(family, plf)) {
                 face_list = get_face_list_from_family(family);
@@ -5278,7 +5278,7 @@ static BOOL freetype_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc,
 	    }
 	}
     } else {
-        LIST_FOR_EACH(family_elem_ptr, &font_list) {
+        LIST_FOR_EACH(family_elem_ptr, &family_list) {
             family = LIST_ENTRY(family_elem_ptr, Family, entry);
             face_list = get_face_list_from_family(family);
             face_elem_ptr = list_head(face_list);
-- 
1.7.10




More information about the wine-patches mailing list