[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src w32font.c
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] emacs/src w32font.c |
Date: |
Mon, 24 Nov 2008 13:15:00 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Jason Rumney <jasonr> 08/11/24 13:15:00
Modified files:
src : w32font.c
Log message:
(check_face_name): Use xstrcasecmp. Avoid compiler warning.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/w32font.c?cvsroot=emacs&r1=1.55&r2=1.56
Patches:
Index: w32font.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32font.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- w32font.c 23 Nov 2008 15:07:25 -0000 1.55
+++ w32font.c 24 Nov 2008 13:15:00 -0000 1.56
@@ -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");
+ else if (!xstrcasecmp (font->lfFaceName, "times"))
+ return xstrcasecmp (full_name, "times") == 0;
return 1;
}