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

Kusanagi Kouichi slash at ac.auone-net.jp
Tue Mar 27 05:07:55 CDT 2012


Clarify that it's a list of font families.

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

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 461d646..2f2104d 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
 {
@@ -909,7 +909,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))
@@ -939,7 +939,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;
@@ -952,7 +952,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;
@@ -1335,7 +1335,7 @@ static void load_font_list_from_cache(HKEY hkey_font_cache)
         family->EnglishName = english_family;
         list_init(&family->faces);
         family->replacement = &family->faces;
-        list_add_tail(&font_list, &family->entry);
+        list_add_tail(&family_list, &family->entry);
 
         if(english_family)
         {
@@ -1545,7 +1545,7 @@ static void AddFaceToList(FT_Face ft_face, const char *file, void *font_data_ptr
             family->EnglishName = localised_family ? strdupW(english_family) : NULL;
             list_init(&family->faces);
             family->replacement = &family->faces;
-            list_add_tail(&font_list, &family->entry);
+            list_add_tail(&family_list, &family->entry);
 
             if(localised_family) {
                 FontSubst *subst = HeapAlloc(GetProcessHeap(), 0, sizeof(*subst));
@@ -1825,7 +1825,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) {
@@ -1890,7 +1890,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
@@ -2437,7 +2437,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) {
@@ -3151,12 +3151,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;
         }
     }
@@ -3950,7 +3950,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;
@@ -4007,7 +4007,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)))
@@ -4030,7 +4030,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) {
@@ -4104,7 +4104,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);
@@ -4122,7 +4122,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);
@@ -4145,7 +4145,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) {
@@ -4742,7 +4742,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);
@@ -4754,7 +4754,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.9.1




More information about the wine-patches mailing list