changeset 99869:a63d3e2ae30c

(check_face_name): Use xstrcasecmp. Avoid compiler warning.
author Jason Rumney <jasonr@gnu.org>
date Mon, 24 Nov 2008 13:15:00 +0000
parents 404f28130174
children 660185ec89b9
files src/w32font.c
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32font.c	Mon Nov 24 12:17:46 2008 +0000
+++ b/src/w32font.c	Mon Nov 24 13:15:00 2008 +0000
@@ -1316,17 +1316,18 @@
      to avoid non-truetype fonts, and ends up mixing the Type-1 Helvetica
      with Arial's characteristics, since that attempt to use Truetype works
      some places, but not others.  */
-  if (!stricmp (font->lfFaceName, "helvetica"))
+  if (!xstrcasecmp (font->lfFaceName, "helvetica"))
     {
       strncpy (full_iname, full_name, LF_FULLFACESIZE);
       full_iname[LF_FULLFACESIZE] = 0;
       _strlwr (full_iname);
-      return strstr ("helvetica", full_iname);
+      return strstr ("helvetica", full_iname) != NULL;
     }
-  else if (!stricmp (font->lfFaceName, "times"))
-    /* Since Times is mapped to Times New Roman, a substring
-       match is not sufficient to filter out the bogus match.  */
-    return stricmp (full_name, "times");
+
+  /* Since Times is mapped to Times New Roman, a substring
+     match is not sufficient to filter out the bogus match.  */
+  else if (!xstrcasecmp (font->lfFaceName, "times"))
+    return xstrcasecmp (full_name, "times") == 0;
 
   return 1;
 }