]> code.delx.au - gnu-emacs/commitdiff
(x_create_bitmap_from_file): Skip special files.
authorGeoff Voelker <voelker@cs.washington.edu>
Fri, 9 Oct 1998 06:09:52 +0000 (06:09 +0000)
committerGeoff Voelker <voelker@cs.washington.edu>
Fri, 9 Oct 1998 06:09:52 +0000 (06:09 +0000)
src/w32fns.c

index 1253ecda0a7ac4950d0974f4069ab5d3cb2fe16d..0221dd290e4c019c1c1c7a9ac1a212f9055961a9 100644 (file)
@@ -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;