(rep_bytes_by_first_byte): Modified for character representation
[chise/xemacs-chise.git-] / src / glyphs-msw.c
index 70b948a..646cb54 100644 (file)
@@ -247,13 +247,13 @@ mswindows_locate_pixmap_file (Lisp_Object name)
        return Qnil;
     }
 
-  if (locate_file (Vmswindows_bitmap_file_path, name, "", &found, R_OK) < 0)
+  if (locate_file (Vmswindows_bitmap_file_path, name, Qnil, &found, R_OK) < 0)
     {
       Lisp_Object temp = list1 (Vdata_directory);
       struct gcpro gcpro1;
 
       GCPRO1 (temp);
-      locate_file (temp, name, "", &found, R_OK);
+      locate_file (temp, name, Qnil, &found, R_OK);
       UNGCPRO;
     }
     
@@ -686,6 +686,7 @@ extract_xpm_color_names (Lisp_Object device,
        COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (XCDR (cons)));
 
       GET_C_STRING_OS_DATA_ALLOCA (XCAR (cons), colortbl[j].name);
+      colortbl[j].name = xstrdup (colortbl[j].name); /* mustn't lose this when we return */
       free_cons (XCONS (cons));
       cons = results;
       results = XCDR (results);
@@ -884,7 +885,13 @@ mswindows_xpm_instantiate (Lisp_Object image_instance,
     }
   
   if (color_symbols)
-    xfree(color_symbols);
+    {
+      while (nsymbols--)
+       {
+         xfree (color_symbols[nsymbols].name);
+       }
+      xfree(color_symbols);
+    }
   
   /* build a bitmap from the eimage */
   if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage,