From: Jason Rumney Date: Mon, 24 Nov 2008 13:15:48 +0000 (+0000) Subject: (check_face_name): Use xstrcasecmp. Avoid compiler warning. X-Git-Tag: emacs-pretest-23.0.90~1579 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c285743c0651420bf02fb73a77817728a2da0f06;p=emacs.git (check_face_name): Use xstrcasecmp. Avoid compiler warning. --- diff --git a/src/ChangeLog b/src/ChangeLog index 21f54c61dfa..1c2b0b94ff6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-11-24 Jason Rumney + + * w32font.c (check_face_name): Use xstrcasecmp. Avoid compiler + warning. + 2008-11-23 Jason Rumney * w32uniscribe.c (uniscribe_encode_char): Ensure context is diff --git a/src/w32font.c b/src/w32font.c index 94dad4367f6..63cd5c2de47 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -1316,17 +1316,18 @@ check_face_name (font, full_name) 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; }