From: Jason Rumney Date: Tue, 2 Nov 2004 08:55:10 +0000 (+0000) Subject: Use fast_string_match_ignore_case for comparing font names. X-Git-Tag: ttn-vms-21-2-B4~4252 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe4dcb868e1371946b675415fdf19249a606281f;p=emacs.git Use fast_string_match_ignore_case for comparing font names. --- diff --git a/src/w32fns.c b/src/w32fns.c index 41bd6a9b9f9..08780e05b1f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5607,14 +5607,12 @@ w32_font_match (fontname, pattern) char * fontname; char * pattern; { - char *font_name_copy; char *ptr; - Lisp_Object encoded_font_name; + char *font_name_copy; 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 @@ w32_font_match (fontname, pattern) 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