# HG changeset patch # User Jason Rumney # Date 1227532500 0 # Node ID a63d3e2ae30c437758428fdaa5fcc2415f292822 # Parent 404f28130174d47a9f0b52fce2aa56d4f1e91579 (check_face_name): Use xstrcasecmp. Avoid compiler warning. diff -r 404f28130174 -r a63d3e2ae30c src/w32font.c --- 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; }