From: Geoff Voelker Date: Fri, 9 Oct 1998 06:09:52 +0000 (+0000) Subject: (x_create_bitmap_from_file): Skip special files. X-Git-Tag: emacs-20.4~1542 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d7fed93b5d148c37a7392253240e666083725d7;p=emacs.git (x_create_bitmap_from_file): Skip special files. --- diff --git a/src/w32fns.c b/src/w32fns.c index 1253ecda0a7..0221dd290e4 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -442,6 +442,9 @@ x_create_bitmap_from_file (f, file) fd = openp (Vx_bitmap_file_path, file, "", &found, 0); if (fd < 0) return -1; + /* LoadLibraryEx won't handle special files handled by Emacs handler. */ + if (fd == 0) + return -1; close (fd); filename = (char *) XSTRING (found)->data; @@ -1298,6 +1301,38 @@ w32_color_map_lookup (colorname) return ret; } +COLORREF +w32_color_map_lookup (colorname) + char *colorname; +{ + Lisp_Object tail, ret = Qnil; + + BLOCK_INPUT; + + for (tail = Vw32_color_map; !NILP (tail); tail = Fcdr (tail)) + { + register Lisp_Object elt, tem; + + elt = Fcar (tail); + if (!CONSP (elt)) continue; + + tem = Fcar (elt); + + if (lstrcmpi (XSTRING (tem)->data, colorname) == 0) + { + ret = XUINT (Fcdr (elt)); + break; + } + + QUIT; + } + + + UNBLOCK_INPUT; + + return ret; +} + COLORREF x_to_w32_color (colorname) char * colorname;