aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfont.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/xfont.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/xfont.c')
-rw-r--r--src/xfont.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/xfont.c b/src/xfont.c
index be9556d585a..7755b780815 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -126,7 +126,7 @@ static int xfont_has_char (Lisp_Object, int);
126static unsigned xfont_encode_char (struct font *, int); 126static unsigned xfont_encode_char (struct font *, int);
127static int xfont_text_extents (struct font *, unsigned *, int, 127static int xfont_text_extents (struct font *, unsigned *, int,
128 struct font_metrics *); 128 struct font_metrics *);
129static int xfont_draw (struct glyph_string *, int, int, int, int, int); 129static int xfont_draw (struct glyph_string *, int, int, int, int, bool);
130static int xfont_check (FRAME_PTR, struct font *); 130static int xfont_check (FRAME_PTR, struct font *);
131 131
132struct font_driver xfont_driver = 132struct font_driver xfont_driver =
@@ -217,9 +217,9 @@ xfont_encode_coding_xlfd (char *xlfd)
217/* Check if CHARS (cons or vector) is supported by XFONT whose 217/* Check if CHARS (cons or vector) is supported by XFONT whose
218 encoding charset is ENCODING (XFONT is NULL) or by a font whose 218 encoding charset is ENCODING (XFONT is NULL) or by a font whose
219 registry corresponds to ENCODING and REPERTORY. 219 registry corresponds to ENCODING and REPERTORY.
220 Return 1 if supported, return 0 otherwise. */ 220 Return true if supported. */
221 221
222static int 222static bool
223xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont, 223xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
224 struct charset *encoding, struct charset *repertory) 224 struct charset *encoding, struct charset *repertory)
225{ 225{
@@ -1019,7 +1019,8 @@ xfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct f
1019} 1019}
1020 1020
1021static int 1021static int
1022xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background) 1022xfont_draw (struct glyph_string *s, int from, int to, int x, int y,
1023 bool with_background)
1023{ 1024{
1024 XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont; 1025 XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont;
1025 int len = to - from; 1026 int len = to - from;
@@ -1040,7 +1041,7 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_bac
1040 for (i = 0; i < len ; i++) 1041 for (i = 0; i < len ; i++)
1041 str[i] = XCHAR2B_BYTE2 (s->char2b + from + i); 1042 str[i] = XCHAR2B_BYTE2 (s->char2b + from + i);
1042 BLOCK_INPUT; 1043 BLOCK_INPUT;
1043 if (with_background > 0) 1044 if (with_background)
1044 { 1045 {
1045 if (s->padding_p) 1046 if (s->padding_p)
1046 for (i = 0; i < len; i++) 1047 for (i = 0; i < len; i++)
@@ -1066,7 +1067,7 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_bac
1066 } 1067 }
1067 1068
1068 BLOCK_INPUT; 1069 BLOCK_INPUT;
1069 if (with_background > 0) 1070 if (with_background)
1070 { 1071 {
1071 if (s->padding_p) 1072 if (s->padding_p)
1072 for (i = 0; i < len; i++) 1073 for (i = 0; i < len; i++)