changeset 95180:1520d3ef2a48

(xfont_get_pcm): Change xassert to font_assert. (xfont_list_family): Call font_add_log. (xfont_match): Likewise. (memq_no_quit): Deleted.
author Kenichi Handa <handa@m17n.org>
date Thu, 22 May 2008 02:23:03 +0000
parents 5c007b5b6cd8
children 4d81ef9a5f1d
files src/xfont.c
diffstat 1 files changed, 5 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfont.c	Thu May 22 02:21:54 2008 +0000
+++ b/src/xfont.c	Thu May 22 02:23:03 2008 +0000
@@ -50,9 +50,6 @@
 
 static XCharStruct *xfont_get_pcm P_ ((XFontStruct *, XChar2b *));
 static void xfont_find_ccl_program P_ ((struct font *));
-static int xfont_registry_charsets P_ ((Lisp_Object, struct charset **,
-					struct charset **));
-
 
 /* Get metrics of character CHAR2B in XFONT.  Value is null if CHAR2B
    is not contained in the font.  */
@@ -65,7 +62,7 @@
   /* The result metric information.  */
   XCharStruct *pcm = NULL;
 
-  xassert (xfont && char2b);
+  font_assert (xfont && char2b);
 
   if (xfont->per_char != NULL)
     {
@@ -298,6 +295,7 @@
   x_uncatch_errors ();
   UNBLOCK_INPUT;
 
+  font_add_log ("xfont-list", build_string (pattern), list);
   return list;
 }
 
@@ -307,8 +305,7 @@
 {
   FRAME_PTR f = XFRAME (frame);
   Display *display = FRAME_X_DISPLAY_INFO (f)->display;
-  Lisp_Object registry, list, val, extra, font_name;
-  Lisp_Object dpi, avgwidth;
+  Lisp_Object registry, list, val, extra;
   int len;
   char name[256];
   
@@ -421,18 +418,10 @@
     }
   UNBLOCK_INPUT;
 
+  font_add_log ("xfont-match", spec, entity);
   return entity;
 }
 
-static int
-memq_no_quit (elt, list)
-     Lisp_Object elt, list;
-{
-  while (CONSP (list) && ! EQ (XCAR (list), elt))
-    list = XCDR (list);
-  return (CONSP (list));
-}
-
 static Lisp_Object
 xfont_list_family (frame)
      Lisp_Object frame;
@@ -570,7 +559,7 @@
   font_object = font_make_object (VECSIZE (struct xfont_info));
   ASET (font_object, FONT_TYPE_INDEX, Qx);
   if (STRINGP (fullname))
-    font_parse_xlfd (SDATA (fullname), font_object);
+    font_parse_xlfd ((char *) SDATA (fullname), font_object);
   for (i = 1; i < FONT_ENTITY_MAX; i++)
     ASET (font_object, i, AREF (entity, i));
   ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size));