diff options
| author | Jason Rumney | 2008-11-24 13:15:48 +0000 |
|---|---|---|
| committer | Jason Rumney | 2008-11-24 13:15:48 +0000 |
| commit | c285743c0651420bf02fb73a77817728a2da0f06 (patch) | |
| tree | 3730772f3dee1d6c16fcd610abe1b1488727b9d3 | |
| parent | d60b1ba1dca0d6f7274f18f557babc78c930c38f (diff) | |
| download | emacs-c285743c0651420bf02fb73a77817728a2da0f06.tar.gz emacs-c285743c0651420bf02fb73a77817728a2da0f06.zip | |
(check_face_name): Use xstrcasecmp. Avoid compiler warning.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32font.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 21f54c61dfa..1c2b0b94ff6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-11-24 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32font.c (check_face_name): Use xstrcasecmp. Avoid compiler | ||
| 4 | warning. | ||
| 5 | |||
| 1 | 2008-11-23 Jason Rumney <jasonr@gnu.org> | 6 | 2008-11-23 Jason Rumney <jasonr@gnu.org> |
| 2 | 7 | ||
| 3 | * w32uniscribe.c (uniscribe_encode_char): Ensure context is | 8 | * 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) | |||
| 1316 | to avoid non-truetype fonts, and ends up mixing the Type-1 Helvetica | 1316 | to avoid non-truetype fonts, and ends up mixing the Type-1 Helvetica |
| 1317 | with Arial's characteristics, since that attempt to use Truetype works | 1317 | with Arial's characteristics, since that attempt to use Truetype works |
| 1318 | some places, but not others. */ | 1318 | some places, but not others. */ |
| 1319 | if (!stricmp (font->lfFaceName, "helvetica")) | 1319 | if (!xstrcasecmp (font->lfFaceName, "helvetica")) |
| 1320 | { | 1320 | { |
| 1321 | strncpy (full_iname, full_name, LF_FULLFACESIZE); | 1321 | strncpy (full_iname, full_name, LF_FULLFACESIZE); |
| 1322 | full_iname[LF_FULLFACESIZE] = 0; | 1322 | full_iname[LF_FULLFACESIZE] = 0; |
| 1323 | _strlwr (full_iname); | 1323 | _strlwr (full_iname); |
| 1324 | return strstr ("helvetica", full_iname); | 1324 | return strstr ("helvetica", full_iname) != NULL; |
| 1325 | } | 1325 | } |
| 1326 | else if (!stricmp (font->lfFaceName, "times")) | 1326 | |
| 1327 | /* Since Times is mapped to Times New Roman, a substring | 1327 | /* Since Times is mapped to Times New Roman, a substring |
| 1328 | match is not sufficient to filter out the bogus match. */ | 1328 | match is not sufficient to filter out the bogus match. */ |
| 1329 | return stricmp (full_name, "times"); | 1329 | else if (!xstrcasecmp (font->lfFaceName, "times")) |
| 1330 | return xstrcasecmp (full_name, "times") == 0; | ||
| 1330 | 1331 | ||
| 1331 | return 1; | 1332 | return 1; |
| 1332 | } | 1333 | } |