Mercurial > emacs
changeset 57872:71ea49de0560
Use fast_string_match_ignore_case for comparing font names.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Tue, 02 Nov 2004 08:55:10 +0000 |
parents | da430e282e25 |
children | 7e43927b42a8 |
files | src/w32fns.c |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32fns.c Tue Nov 02 08:54:05 2004 +0000 +++ b/src/w32fns.c Tue Nov 02 08:55:10 2004 +0000 @@ -5607,14 +5607,12 @@ char * fontname; char * pattern; { + char *ptr; char *font_name_copy; - char *ptr; - Lisp_Object encoded_font_name; char *regex = alloca (strlen (pattern) * 2 + 3); - /* Convert fontname to unibyte for match. */ - encoded_font_name = string_make_unibyte (build_string (fontname)); - font_name_copy = SDATA (encoded_font_name); + font_name_copy = alloca (strlen (fontname) + 1); + strcpy (font_name_copy, fontname); ptr = regex; *ptr++ = '^'; @@ -5652,8 +5650,8 @@ return FALSE; } - return (fast_c_string_match_ignore_case (build_string (regex), - font_name_copy) >= 0); + return (fast_string_match_ignore_case (build_string (regex), + build_string(font_name_copy)) >= 0); } /* Callback functions, and a structure holding info they need, for