* xftfont.c (xftfont_open): Rename locals to avoid shadowing.
[bpt/emacs.git] / src / xftfont.c
index 695527c..c27a4fc 100644 (file)
@@ -280,7 +280,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
 {
   FcResult result;
   Display *display = FRAME_X_DISPLAY (f);
-  Lisp_Object val, filename, index, font_object;
+  Lisp_Object val, filename, idx, font_object;
   FcPattern *pat = NULL, *match;
   struct xftfont_info *xftfont_info = NULL;
   struct font *font;
@@ -298,7 +298,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
     return Qnil;
   val = XCDR (val);
   filename = XCAR (val);
-  index = XCDR (val);
+  idx = XCDR (val);
   size = XINT (AREF (entity, FONT_SIZE_INDEX));
   if (size == 0)
     size = pixel_size;
@@ -335,7 +335,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
   xftfont_add_rendering_parameters (pat, entity);
 
   FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename));
-  FcPatternAddInteger (pat, FC_INDEX, XINT (index));
+  FcPatternAddInteger (pat, FC_INDEX, XINT (idx));
 
 
   BLOCK_INPUT;
@@ -409,9 +409,9 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
     spacing = FC_PROPORTIONAL;
   if (! ascii_printable[0])
     {
-      int i;
-      for (i = 0; i < 95; i++)
-       ascii_printable[i] = ' ' + i;
+      int ch;
+      for (ch = 0; ch < 95; ch++)
+       ascii_printable[ch] = ' ' + ch;
     }
   BLOCK_INPUT;
   if (spacing != FC_PROPORTIONAL
@@ -672,7 +672,8 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
   return len;
 }
 
-Lisp_Object
+#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
+static Lisp_Object
 xftfont_shape (Lisp_Object lgstring)
 {
   struct font *font;
@@ -688,6 +689,7 @@ xftfont_shape (Lisp_Object lgstring)
   XftUnlockFace (xftfont_info->xftfont);
   return val;
 }
+#endif
 
 static int
 xftfont_end_for_frame (FRAME_PTR f)