USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
[bpt/emacs.git] / src / xfont.c
index 5dd6aae..cc06e27 100644 (file)
@@ -1,5 +1,5 @@
 /* xfont.c -- X core font driver.
-   Copyright (C) 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 2006-2012 Free Software Foundation, Inc.
    Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H13PRO009
@@ -132,7 +132,7 @@ static int xfont_check (FRAME_PTR, struct font *);
 
 struct font_driver xfont_driver =
   {
-    0,                         /* Qx */
+    LISP_INITIALLY_ZERO,       /* Qx */
     0,                         /* case insensitive */
     xfont_get_cache,
     xfont_list,
@@ -248,7 +248,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
     }
   else if (VECTORP (chars))
     {
-      int i;
+      ptrdiff_t i;
 
       for (i = ASIZE (chars) - 1; i >= 0; i--)
        {
@@ -272,8 +272,8 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
   return 0;
 }
 
-/* A hash table recoding which font supports which scritps.  Each key
-   is a vector of characteristic font propertis FOUNDRY to WIDTH and
+/* A hash table recoding which font supports which scripts.  Each key
+   is a vector of characteristic font properties FOUNDRY to WIDTH and
    ADDSTYLE, and each value is a list of script symbols.
 
    We assume that fonts that have the same value in the above
@@ -281,7 +281,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
 
 static Lisp_Object xfont_scripts_cache;
 
-/* Re-usable vector to store characteristic font properites.   */
+/* Re-usable vector to store characteristic font properties.   */
 static Lisp_Object xfont_scratch_props;
 
 /* Return a list of scripts supported by the font of FONTNAME whose
@@ -594,16 +594,14 @@ xfont_match (Lisp_Object frame, Lisp_Object spec)
     {
       if (XGetFontProperty (xfont, XA_FONT, &value))
        {
-         int len;
          char *s;
 
          s = (char *) XGetAtomName (display, (Atom) value);
-         len = strlen (s);
 
          /* If DXPC (a Differential X Protocol Compressor)
             Ver.3.7 is running, XGetAtomName will return null
             string.  We must avoid such a name.  */
-         if (len > 0)
+         if (*s)
            {
              entity = font_make_entity ();
              ASET (entity, FONT_TYPE_INDEX, Qx);