diff src/objects-msw.c @ 4959:bd169a24a554

merge
author Ben Wing <ben@xemacs.org>
date Thu, 28 Jan 2010 04:27:30 -0600
parents 304aebb79cd3
children 16112448d484 4aebb0131297
line wrap: on
line diff
--- a/src/objects-msw.c	Thu Jan 28 04:02:14 2010 -0600
+++ b/src/objects-msw.c	Thu Jan 28 04:27:30 2010 -0600
@@ -1016,11 +1016,11 @@
 
   for (i = 0; i < countof (mswindows_X_color_map); i++)
     if (pcolor == (mswindows_X_color_map[i].colorref))
-      return  build_string (mswindows_X_color_map[i].name);
+      return  build_ascstring (mswindows_X_color_map[i].name);
 
   sprintf (buf, "#%02X%02X%02X",
 	   GetRValue (color), GetGValue (color), GetBValue (color));
-  return build_string (buf);
+  return build_ascstring (buf);
 }
 
 /*
@@ -1141,7 +1141,7 @@
     return 1;
 
   /* Add the font name to the list if not already there */
-  fontname_lispstr = build_intstring (fontname);
+  fontname_lispstr = build_istring (fontname);
   if (NILP (Fassoc (fontname_lispstr, font_enum->list)))
     font_enum->list =
       Fcons (Fcons (fontname_lispstr,
@@ -1797,7 +1797,7 @@
 			    ERROR_ME_DEBUG_WARN, &logfont, fontname, weight,
 			    points, effects, charset))
 	signal_error (Qinternal_error, "Bad value in device font list?",
-		      build_intstring (truername));
+		      build_istring (truername));
     }
   else if (!parse_font_spec (namestr, hdc, name_for_errors,
 			     errb, &logfont, fontname, weight, points,
@@ -1817,7 +1817,7 @@
   qxesprintf (truename, "%s:%s:%s:%s:%s", fontname, weight,
 	      points, effects, charset);
   
-  *truename_ret = build_intstring (truename);
+  *truename_ret = build_istring (truename);
   return hfont;
 }
 
@@ -1837,6 +1837,8 @@
 
   hfont = create_hfont_from_font_spec (namestr, hdc, name, device_font_list,
 				       errb, &truename);
+  if (!hfont)
+    return 0;
   f->truename = truename;
   f->data = xnew_and_zero (struct mswindows_font_instance_data);
   FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0) = hfont;
@@ -1946,7 +1948,7 @@
       if (match_font (XSTRING_DATA (XCAR (XCAR (fonttail))),
 		      XSTRING_DATA (pattern),
 		      fontname))
-	result = Fcons (build_intstring (fontname), result);
+	result = Fcons (build_istring (fontname), result);
     }
 
   return Fnreverse (result);
@@ -2052,7 +2054,7 @@
      spec.  See if the FONTSIGNATURE data is already cached.  If not, get
      it and cache it. */
   if (!STRINGP (reloc) || the_nonreloc != XSTRING_DATA (reloc))
-    reloc = build_intstring (the_nonreloc);
+    reloc = build_istring (the_nonreloc);
   GCPRO1 (reloc);
   fontsig = Fgethash (reloc, Vfont_signature_data, Qunbound);
 
@@ -2240,7 +2242,7 @@
   int i;
 
   for (i = 0; i < countof (mswindows_X_color_map); i++)
-    result = Fcons (build_string (mswindows_X_color_map[i].name), result);
+    result = Fcons (build_ascstring (mswindows_X_color_map[i].name), result);
 
   return Fnreverse (result);
 }