aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-12 01:42:29 -0700
committerPaul Eggert2011-04-12 01:42:29 -0700
commit1675728f009404df6bc79b7e0933bc675afa1be1 (patch)
treefb59d49bf354757f72dd2ef06c53882a04fb8257 /src
parente4cebfca13580f80fb0ecee27afb81b55c031535 (diff)
downloademacs-1675728f009404df6bc79b7e0933bc675afa1be1.tar.gz
emacs-1675728f009404df6bc79b7e0933bc675afa1be1.zip
* ftxfont.c: Make symbols static if they're not exported.
(ftxfont_driver): Export only if !defined HAVE_XFT && def8ined HAVE_FREETYPE. * font.h (ftxfont_driver): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/font.h5
-rw-r--r--src/ftxfont.c14
3 files changed, 16 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9b145d865db..1498d267775 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12011-04-12 Paul Eggert <eggert@cs.ucla.edu> 12011-04-12 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * ftxfont.c: Make symbols static if they're not exported.
4 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
5 HAVE_FREETYPE.
6 * font.h (ftxfont_driver): Likewise.
7
3 * xfns.c: Make symbols static if they're not exported. 8 * xfns.c: Make symbols static if they're not exported.
4 (x_last_font_name, x_display_info_for_name): 9 (x_last_font_name, x_display_info_for_name):
5 (x_set_foreground_color, x_set_background_color, x_set_mouse_color): 10 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
diff --git a/src/font.h b/src/font.h
index ead5223a6cb..efcd56b0365 100644
--- a/src/font.h
+++ b/src/font.h
@@ -821,13 +821,14 @@ extern void syms_of_ftfont (void);
821#endif /* HAVE_FREETYPE */ 821#endif /* HAVE_FREETYPE */
822#ifdef HAVE_X_WINDOWS 822#ifdef HAVE_X_WINDOWS
823extern struct font_driver xfont_driver; 823extern struct font_driver xfont_driver;
824extern struct font_driver ftxfont_driver;
825extern void syms_of_xfont (void); 824extern void syms_of_xfont (void);
826extern void syms_of_ftxfont (void); 825extern void syms_of_ftxfont (void);
827#ifdef HAVE_XFT 826#ifdef HAVE_XFT
828extern struct font_driver xftfont_driver; 827extern struct font_driver xftfont_driver;
829extern void syms_of_xftfont (void); 828extern void syms_of_xftfont (void);
830#endif /* HAVE_XFT */ 829#elif defined HAVE_FREETYPE
830extern struct font_driver ftxfont_driver;
831#endif
831#ifdef HAVE_BDFFONT 832#ifdef HAVE_BDFFONT
832extern void syms_of_bdffont (void); 833extern void syms_of_bdffont (void);
833#endif /* HAVE_BDFFONT */ 834#endif /* HAVE_BDFFONT */
diff --git a/src/ftxfont.c b/src/ftxfont.c
index c6fa858af74..bbba3ca8163 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -38,6 +38,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
38 38
39static Lisp_Object Qftx; 39static Lisp_Object Qftx;
40 40
41#if defined HAVE_XFT || !defined HAVE_FREETYPE
42static
43#endif
44struct font_driver ftxfont_driver;
45
41/* Prototypes for helper function. */ 46/* Prototypes for helper function. */
42static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); 47static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long);
43static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, 48static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *,
@@ -233,13 +238,11 @@ static Lisp_Object ftxfont_open (FRAME_PTR, Lisp_Object, int);
233static void ftxfont_close (FRAME_PTR, struct font *); 238static void ftxfont_close (FRAME_PTR, struct font *);
234static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); 239static int ftxfont_draw (struct glyph_string *, int, int, int, int, int);
235 240
236struct font_driver ftxfont_driver;
237
238static Lisp_Object 241static Lisp_Object
239ftxfont_list (Lisp_Object frame, Lisp_Object spec) 242ftxfont_list (Lisp_Object frame, Lisp_Object spec)
240{ 243{
241 Lisp_Object list = ftfont_driver.list (frame, spec), tail; 244 Lisp_Object list = ftfont_driver.list (frame, spec), tail;
242 245
243 for (tail = list; CONSP (tail); tail = XCDR (tail)) 246 for (tail = list; CONSP (tail); tail = XCDR (tail))
244 ASET (XCAR (tail), FONT_TYPE_INDEX, Qftx); 247 ASET (XCAR (tail), FONT_TYPE_INDEX, Qftx);
245 return list; 248 return list;
@@ -350,13 +353,13 @@ static int
350ftxfont_end_for_frame (FRAME_PTR f) 353ftxfont_end_for_frame (FRAME_PTR f)
351{ 354{
352 struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); 355 struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver);
353 356
354 BLOCK_INPUT; 357 BLOCK_INPUT;
355 while (data) 358 while (data)
356 { 359 {
357 struct ftxfont_frame_data *next = data->next; 360 struct ftxfont_frame_data *next = data->next;
358 int i; 361 int i;
359 362
360 for (i = 0; i < 6; i++) 363 for (i = 0; i < 6; i++)
361 XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); 364 XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]);
362 free (data); 365 free (data);
@@ -384,4 +387,3 @@ syms_of_ftxfont (void)
384 ftxfont_driver.end_for_frame = ftxfont_end_for_frame; 387 ftxfont_driver.end_for_frame = ftxfont_end_for_frame;
385 register_font_driver (&ftxfont_driver, NULL); 388 register_font_driver (&ftxfont_driver, NULL);
386} 389}
387