X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/a0b5606ec769968b10c765f8ff50f312d691ef62..3f13130005dfc51fa4982659aa289cb8753cfd26:/src/ftxfont.c?ds=sidebyside diff --git a/src/ftxfont.c b/src/ftxfont.c index 63d03b0e24..6669bda164 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -1,5 +1,5 @@ /* ftxfont.c -- FreeType font driver on X (without using XFT). - Copyright (C) 2006-2013 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H13PRO009 @@ -37,9 +37,6 @@ along with GNU Emacs. If not, see . */ static Lisp_Object Qftx; -#if defined HAVE_XFT || !defined HAVE_FREETYPE -static -#endif struct font_driver ftxfont_driver; struct ftxfont_frame_data @@ -57,7 +54,7 @@ struct ftxfont_frame_data /* Return an array of 6 GCs for antialiasing. */ static GC * -ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned int background) +ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long background) { XColor color; XGCValues xgcv; @@ -81,7 +78,7 @@ ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned in } } - new = malloc (sizeof *new); + new = xmalloc_unsafe (sizeof *new); if (! new) return NULL; new->next = this; @@ -91,7 +88,7 @@ ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned in } else if (font_put_frame_data (f, &ftxfont_driver, new) < 0) { - free (new); + xfree (new); return NULL; } @@ -127,7 +124,7 @@ ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned in prev->next = new->next; else if (data) font_put_frame_data (f, &ftxfont_driver, new->next); - free (new); + xfree (new); return NULL; } return new->gcs; @@ -260,9 +257,9 @@ ftxfont_open (struct frame *f, Lisp_Object entity, int pixel_size) } static void -ftxfont_close (struct frame *f, struct font *font) +ftxfont_close (struct font *font) { - ftfont_driver.close (f, font); + ftfont_driver.close (font); } static int @@ -350,7 +347,7 @@ ftxfont_end_for_frame (struct frame *f) for (i = 0; i < 6; i++) XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); - free (data); + xfree (data); data = next; } unblock_input ();