changeset 23407:4587be644789

(x_create_bitmap_from_file): Skip special files.
author Geoff Voelker <voelker@cs.washington.edu>
date Fri, 09 Oct 1998 06:09:52 +0000
parents 37457777218a
children 063b2599a0fd
files src/w32fns.c
diffstat 1 files changed, 35 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Fri Oct 09 01:55:02 1998 +0000
+++ b/src/w32fns.c	Fri Oct 09 06:09:52 1998 +0000
@@ -442,6 +442,9 @@
   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 @@
   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;