Implement token threading
[bpt/emacs.git] / src / ftxfont.c
index 608cfd8..6ebe079 100644 (file)
@@ -1,5 +1,5 @@
 /* ftxfont.c -- FreeType font driver on X (without using XFT).
-   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
@@ -48,8 +48,8 @@ static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long);
 static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *,
                                 unsigned, int, int, XPoint *, int, int *,
                                 int);
-static void ftxfont_draw_backgrond (FRAME_PTR, struct font *, GC,
-                                    int, int, int);
+static void ftxfont_draw_background (FRAME_PTR, struct font *, GC,
+                                    int, int, int);
 
 struct ftxfont_frame_data
 {
@@ -90,7 +90,7 @@ ftxfont_get_gcs (FRAME_PTR f, long unsigned int foreground, long unsigned int ba
        }
     }
 
-  new = malloc (sizeof (struct ftxfont_frame_data));
+  new = malloc (sizeof *new);
   if (! new)
     return NULL;
   new->next = this;
@@ -219,7 +219,8 @@ ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, unsign
 }
 
 static void
-ftxfont_draw_backgrond (FRAME_PTR f, struct font *font, GC gc, int x, int y, int width)
+ftxfont_draw_background (FRAME_PTR f, struct font *font, GC gc, int x, int y,
+                        int width)
 {
   XGCValues xgcv;
 
@@ -296,7 +297,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
 
   BLOCK_INPUT;
   if (with_background)
-    ftxfont_draw_backgrond (f, font, s->gc, x, y, s->width);
+    ftxfont_draw_background (f, font, s->gc, x, y, s->width);
   code = alloca (sizeof (unsigned) * len);
   for (i = 0; i < len; i++)
     code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)