aboutsummaryrefslogtreecommitdiffstats
path: root/src/fontset.c
diff options
context:
space:
mode:
authorPaul Eggert2012-09-06 01:04:49 -0700
committerPaul Eggert2012-09-06 01:04:49 -0700
commita864ef14570715dc3233fbbf2e9da7aa8f29729e (patch)
treed350c376998ae3bf0ef69f3d708f766e515a3465 /src/fontset.c
parent0699fc18a5ea00b9a6d64b0e0ebf33b4723beb10 (diff)
downloademacs-a864ef14570715dc3233fbbf2e9da7aa8f29729e.tar.gz
emacs-a864ef14570715dc3233fbbf2e9da7aa8f29729e.zip
Use bool for booleans in font-related modules.
* font.c (font_intern_prop, font_style_to_value) (font_style_symbolic, font_parse_xlfd, font_parse_fcname) (generate_otf_features, font_check_otf_features, font_check_otf) (font_match_p, font_list_entities, font_at): * fontset.c (fontset_id_valid_p, reorder_font_vector (fontset_find_font, Fset_fontset_font) (face_suitable_for_char_p) [0]: * ftfont.c (fc_initialized, ftfont_get_open_type_spec) (ftfont_open, ftfont_text_extents, ftfont_check_otf): (m17n_flt_initialized, ftfont_shape_by_flt): * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw): * nsfont.m (nsfont_draw): * w32font.c (w32font_draw): * w32term.c (x_draw_glyphless_glyph_string_foreground): Use bool for booleans. * font.h: Adjust to above API changes. (struct font, struct font_driver, struct font_driver_list): Use bool for booleans. (struct font): Remove useless member encoding_type. All users removed. * fontset.c, xftfont.c: Omit unnecessary static decls.
Diffstat (limited to 'src/fontset.c')
-rw-r--r--src/fontset.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 01e38fe45e5..2b955fe6b11 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -185,21 +185,12 @@ void (*check_window_system_func) (void);
185 185
186 186
187/* Prototype declarations for static functions. */ 187/* Prototype declarations for static functions. */
188static void fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
189static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *,
190 int, int);
191static void reorder_font_vector (Lisp_Object, struct font *);
192static Lisp_Object fontset_font (Lisp_Object, int, struct face *, int);
193static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object); 188static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object);
194static Lisp_Object fontset_pattern_regexp (Lisp_Object);
195static void accumulate_script_ranges (Lisp_Object, Lisp_Object,
196 Lisp_Object);
197static void set_fontset_font (Lisp_Object, Lisp_Object);
198 189
199/* Return 1 if ID is a valid fontset id, else return 0. 190/* Return true if ID is a valid fontset id.
200 Optimized away if ENABLE_CHECKING is not defined. */ 191 Optimized away if ENABLE_CHECKING is not defined. */
201 192
202static int 193static bool
203fontset_id_valid_p (int id) 194fontset_id_valid_p (int id)
204{ 195{
205 return (id >= 0 && id < ASIZE (Vfontset_table) - 1); 196 return (id >= 0 && id < ASIZE (Vfontset_table) - 1);
@@ -413,7 +404,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
413 Lisp_Object vec, font_object; 404 Lisp_Object vec, font_object;
414 int size; 405 int size;
415 int i; 406 int i;
416 int score_changed = 0; 407 bool score_changed = 0;
417 408
418 if (font) 409 if (font)
419 XSETFONT (font_object, font); 410 XSETFONT (font_object, font);
@@ -544,10 +535,11 @@ fontset_get_font_group (Lisp_Object fontset, int c)
544 ID is a charset-id that must be preferred, or -1 meaning no 535 ID is a charset-id that must be preferred, or -1 meaning no
545 preference. 536 preference.
546 537
547 If FALLBACK is nonzero, search only fallback fonts. */ 538 If FALLBACK, search only fallback fonts. */
548 539
549static Lisp_Object 540static Lisp_Object
550fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fallback) 541fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id,
542 bool fallback)
551{ 543{
552 Lisp_Object vec, font_group; 544 Lisp_Object vec, font_group;
553 int i, charset_matched = 0, found_index; 545 int i, charset_matched = 0, found_index;
@@ -919,11 +911,11 @@ free_face_fontset (FRAME_PTR f, struct face *face)
919 911
920 912
921#if 0 913#if 0
922/* Return 1 if FACE is suitable for displaying character C. 914/* Return true if FACE is suitable for displaying character C.
923 Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P 915 Called from the macro FACE_SUITABLE_FOR_CHAR_P
924 when C is not an ASCII character. */ 916 when C is not an ASCII character. */
925 917
926int 918bool
927face_suitable_for_char_p (struct face *face, int c) 919face_suitable_for_char_p (struct face *face, int c)
928{ 920{
929 Lisp_Object fontset, rfont_def; 921 Lisp_Object fontset, rfont_def;
@@ -1470,7 +1462,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
1470 Lisp_Object range_list; 1462 Lisp_Object range_list;
1471 struct charset *charset = NULL; 1463 struct charset *charset = NULL;
1472 Lisp_Object fontname; 1464 Lisp_Object fontname;
1473 int ascii_changed = 0; 1465 bool ascii_changed = 0;
1474 1466
1475 fontset = check_fontset_name (name, &frame); 1467 fontset = check_fontset_name (name, &frame);
1476 1468