diff options
| author | Paul Eggert | 2011-04-12 01:42:29 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-12 01:42:29 -0700 |
| commit | 1675728f009404df6bc79b7e0933bc675afa1be1 (patch) | |
| tree | fb59d49bf354757f72dd2ef06c53882a04fb8257 | |
| parent | e4cebfca13580f80fb0ecee27afb81b55c031535 (diff) | |
| download | emacs-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.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/font.h | 5 | ||||
| -rw-r--r-- | src/ftxfont.c | 14 |
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 @@ | |||
| 1 | 2011-04-12 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-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 |
| 823 | extern struct font_driver xfont_driver; | 823 | extern struct font_driver xfont_driver; |
| 824 | extern struct font_driver ftxfont_driver; | ||
| 825 | extern void syms_of_xfont (void); | 824 | extern void syms_of_xfont (void); |
| 826 | extern void syms_of_ftxfont (void); | 825 | extern void syms_of_ftxfont (void); |
| 827 | #ifdef HAVE_XFT | 826 | #ifdef HAVE_XFT |
| 828 | extern struct font_driver xftfont_driver; | 827 | extern struct font_driver xftfont_driver; |
| 829 | extern void syms_of_xftfont (void); | 828 | extern void syms_of_xftfont (void); |
| 830 | #endif /* HAVE_XFT */ | 829 | #elif defined HAVE_FREETYPE |
| 830 | extern struct font_driver ftxfont_driver; | ||
| 831 | #endif | ||
| 831 | #ifdef HAVE_BDFFONT | 832 | #ifdef HAVE_BDFFONT |
| 832 | extern void syms_of_bdffont (void); | 833 | extern 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 | ||
| 39 | static Lisp_Object Qftx; | 39 | static Lisp_Object Qftx; |
| 40 | 40 | ||
| 41 | #if defined HAVE_XFT || !defined HAVE_FREETYPE | ||
| 42 | static | ||
| 43 | #endif | ||
| 44 | struct font_driver ftxfont_driver; | ||
| 45 | |||
| 41 | /* Prototypes for helper function. */ | 46 | /* Prototypes for helper function. */ |
| 42 | static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); | 47 | static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); |
| 43 | static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, | 48 | static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, |
| @@ -233,13 +238,11 @@ static Lisp_Object ftxfont_open (FRAME_PTR, Lisp_Object, int); | |||
| 233 | static void ftxfont_close (FRAME_PTR, struct font *); | 238 | static void ftxfont_close (FRAME_PTR, struct font *); |
| 234 | static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); | 239 | static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); |
| 235 | 240 | ||
| 236 | struct font_driver ftxfont_driver; | ||
| 237 | |||
| 238 | static Lisp_Object | 241 | static Lisp_Object |
| 239 | ftxfont_list (Lisp_Object frame, Lisp_Object spec) | 242 | ftxfont_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 | |||
| 350 | ftxfont_end_for_frame (FRAME_PTR f) | 353 | ftxfont_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 | |||