diff options
| author | Kenichi Handa | 2008-05-22 02:23:03 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-22 02:23:03 +0000 |
| commit | 960d80b9c4c02990d0bbfda316ac47d44d04e242 (patch) | |
| tree | 0bcee3b53e485001987ab6a3673a045976e80757 /src | |
| parent | 7ae2e7f020a969c423305e641db3a0327b77fdef (diff) | |
| download | emacs-960d80b9c4c02990d0bbfda316ac47d44d04e242.tar.gz emacs-960d80b9c4c02990d0bbfda316ac47d44d04e242.zip | |
(xfont_get_pcm): Change xassert to font_assert.
(xfont_list_family): Call font_add_log.
(xfont_match): Likewise.
(memq_no_quit): Deleted.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfont.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/xfont.c b/src/xfont.c index 3a49d7246d3..e9e42e134be 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -50,9 +50,6 @@ extern void x_clear_errors P_ ((Display *)); | |||
| 50 | 50 | ||
| 51 | static XCharStruct *xfont_get_pcm P_ ((XFontStruct *, XChar2b *)); | 51 | static XCharStruct *xfont_get_pcm P_ ((XFontStruct *, XChar2b *)); |
| 52 | static void xfont_find_ccl_program P_ ((struct font *)); | 52 | static void xfont_find_ccl_program P_ ((struct font *)); |
| 53 | static int xfont_registry_charsets P_ ((Lisp_Object, struct charset **, | ||
| 54 | struct charset **)); | ||
| 55 | |||
| 56 | 53 | ||
| 57 | /* Get metrics of character CHAR2B in XFONT. Value is null if CHAR2B | 54 | /* Get metrics of character CHAR2B in XFONT. Value is null if CHAR2B |
| 58 | is not contained in the font. */ | 55 | is not contained in the font. */ |
| @@ -65,7 +62,7 @@ xfont_get_pcm (xfont, char2b) | |||
| 65 | /* The result metric information. */ | 62 | /* The result metric information. */ |
| 66 | XCharStruct *pcm = NULL; | 63 | XCharStruct *pcm = NULL; |
| 67 | 64 | ||
| 68 | xassert (xfont && char2b); | 65 | font_assert (xfont && char2b); |
| 69 | 66 | ||
| 70 | if (xfont->per_char != NULL) | 67 | if (xfont->per_char != NULL) |
| 71 | { | 68 | { |
| @@ -298,6 +295,7 @@ xfont_list_pattern (frame, display, pattern) | |||
| 298 | x_uncatch_errors (); | 295 | x_uncatch_errors (); |
| 299 | UNBLOCK_INPUT; | 296 | UNBLOCK_INPUT; |
| 300 | 297 | ||
| 298 | font_add_log ("xfont-list", build_string (pattern), list); | ||
| 301 | return list; | 299 | return list; |
| 302 | } | 300 | } |
| 303 | 301 | ||
| @@ -307,8 +305,7 @@ xfont_list (frame, spec) | |||
| 307 | { | 305 | { |
| 308 | FRAME_PTR f = XFRAME (frame); | 306 | FRAME_PTR f = XFRAME (frame); |
| 309 | Display *display = FRAME_X_DISPLAY_INFO (f)->display; | 307 | Display *display = FRAME_X_DISPLAY_INFO (f)->display; |
| 310 | Lisp_Object registry, list, val, extra, font_name; | 308 | Lisp_Object registry, list, val, extra; |
| 311 | Lisp_Object dpi, avgwidth; | ||
| 312 | int len; | 309 | int len; |
| 313 | char name[256]; | 310 | char name[256]; |
| 314 | 311 | ||
| @@ -421,18 +418,10 @@ xfont_match (frame, spec) | |||
| 421 | } | 418 | } |
| 422 | UNBLOCK_INPUT; | 419 | UNBLOCK_INPUT; |
| 423 | 420 | ||
| 421 | font_add_log ("xfont-match", spec, entity); | ||
| 424 | return entity; | 422 | return entity; |
| 425 | } | 423 | } |
| 426 | 424 | ||
| 427 | static int | ||
| 428 | memq_no_quit (elt, list) | ||
| 429 | Lisp_Object elt, list; | ||
| 430 | { | ||
| 431 | while (CONSP (list) && ! EQ (XCAR (list), elt)) | ||
| 432 | list = XCDR (list); | ||
| 433 | return (CONSP (list)); | ||
| 434 | } | ||
| 435 | |||
| 436 | static Lisp_Object | 425 | static Lisp_Object |
| 437 | xfont_list_family (frame) | 426 | xfont_list_family (frame) |
| 438 | Lisp_Object frame; | 427 | Lisp_Object frame; |
| @@ -570,7 +559,7 @@ xfont_open (f, entity, pixel_size) | |||
| 570 | font_object = font_make_object (VECSIZE (struct xfont_info)); | 559 | font_object = font_make_object (VECSIZE (struct xfont_info)); |
| 571 | ASET (font_object, FONT_TYPE_INDEX, Qx); | 560 | ASET (font_object, FONT_TYPE_INDEX, Qx); |
| 572 | if (STRINGP (fullname)) | 561 | if (STRINGP (fullname)) |
| 573 | font_parse_xlfd (SDATA (fullname), font_object); | 562 | font_parse_xlfd ((char *) SDATA (fullname), font_object); |
| 574 | for (i = 1; i < FONT_ENTITY_MAX; i++) | 563 | for (i = 1; i < FONT_ENTITY_MAX; i++) |
| 575 | ASET (font_object, i, AREF (entity, i)); | 564 | ASET (font_object, i, AREF (entity, i)); |
| 576 | ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); | 565 | ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); |