Use bool for boolean in xfaces.c
* dispextern.h: Adjust to signature changes. * font.c (font_at, font_range): * fontset.c (Finternal_char_font): * fringe.c (draw_fringe_bitmap_1): * xdisp.c (handle_face_prop, face_before_or_after_it_pos) (get_next_display_element, highlight_trailing_whitespace) (display_string, calc_line_height_property) (note_mode_line_or_margin_highlight, note_mouse_highlight): * xfaces.c (tty_suppress_bold_inverse_default_colors_p) (menu_face_changed_default, recompute_basic_faces) (Fbitmap_spec_p, parse_rgb_list, tty_lookup_color) (tty_defined_color, defined_color, face_color_gray_p) (face_color_supported_p, load_color2, load_face_colors) (Fx_list_fonts, LFACEP, push_named_merge_point) (resolve_face_name, lface_from_face_name_no_resolve) (lface_from_face_name, get_lface_attributes_no_remap) (get_lface_attributes, lface_fully_specified_p) (set_lface_from_font, merge_face_vectors, merge_named_face) (merge_face_ref, Finternal_make_lisp_face) (Finternal_lisp_face_p, Finternal_copy_lisp_face) (Finternal_set_lisp_face_attribute) (update_face_from_frame_parameter, set_font_frame_param) (face_boolean_x_resource_value) (Finternal_set_lisp_face_attribute_from_resource) (x_update_menu_appearance, Finternal_get_lisp_face_attribute) (Finternal_merge_in_global_face, Fface_font, face_attr_equal_p) (lface_equal_p, Finternal_lisp_face_equal_p) (Finternal_lisp_face_empty_p, lface_same_font_attributes_p) (Fcolor_distance, lookup_named_face, lookup_basic_face) (lookup_derived_face, Fface_attributes_as_vector) (x_supports_face_attributes_p, tty_supports_face_attributes_p) (Fdisplay_supports_face_attributes_p, realize_basic_faces) (realize_default_face, realize_named_face) (realize_non_ascii_face, realize_x_face, map_tty_color) (realize_tty_face, compute_char_face, face_at_buffer_position) (face_for_overlay_string, face_at_string_position): Use bool for boolean. * xfaces.c (set_lface_from_font): Return void, since callers never use the result.
This commit is contained in:
parent
81f7fcb4b8
commit
2639c2ed08
7 changed files with 328 additions and 288 deletions
|
@ -1,3 +1,46 @@
|
|||
2015-01-27 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Use bool for boolean in xfaces.c
|
||||
* dispextern.h: Adjust to signature changes.
|
||||
* font.c (font_at, font_range):
|
||||
* fontset.c (Finternal_char_font):
|
||||
* fringe.c (draw_fringe_bitmap_1):
|
||||
* xdisp.c (handle_face_prop, face_before_or_after_it_pos)
|
||||
(get_next_display_element, highlight_trailing_whitespace)
|
||||
(display_string, calc_line_height_property)
|
||||
(note_mode_line_or_margin_highlight, note_mouse_highlight):
|
||||
* xfaces.c (tty_suppress_bold_inverse_default_colors_p)
|
||||
(menu_face_changed_default, recompute_basic_faces)
|
||||
(Fbitmap_spec_p, parse_rgb_list, tty_lookup_color)
|
||||
(tty_defined_color, defined_color, face_color_gray_p)
|
||||
(face_color_supported_p, load_color2, load_face_colors)
|
||||
(Fx_list_fonts, LFACEP, push_named_merge_point)
|
||||
(resolve_face_name, lface_from_face_name_no_resolve)
|
||||
(lface_from_face_name, get_lface_attributes_no_remap)
|
||||
(get_lface_attributes, lface_fully_specified_p)
|
||||
(set_lface_from_font, merge_face_vectors, merge_named_face)
|
||||
(merge_face_ref, Finternal_make_lisp_face)
|
||||
(Finternal_lisp_face_p, Finternal_copy_lisp_face)
|
||||
(Finternal_set_lisp_face_attribute)
|
||||
(update_face_from_frame_parameter, set_font_frame_param)
|
||||
(face_boolean_x_resource_value)
|
||||
(Finternal_set_lisp_face_attribute_from_resource)
|
||||
(x_update_menu_appearance, Finternal_get_lisp_face_attribute)
|
||||
(Finternal_merge_in_global_face, Fface_font, face_attr_equal_p)
|
||||
(lface_equal_p, Finternal_lisp_face_equal_p)
|
||||
(Finternal_lisp_face_empty_p, lface_same_font_attributes_p)
|
||||
(Fcolor_distance, lookup_named_face, lookup_basic_face)
|
||||
(lookup_derived_face, Fface_attributes_as_vector)
|
||||
(x_supports_face_attributes_p, tty_supports_face_attributes_p)
|
||||
(Fdisplay_supports_face_attributes_p, realize_basic_faces)
|
||||
(realize_default_face, realize_named_face)
|
||||
(realize_non_ascii_face, realize_x_face, map_tty_color)
|
||||
(realize_tty_face, compute_char_face, face_at_buffer_position)
|
||||
(face_for_overlay_string, face_at_string_position):
|
||||
Use bool for boolean.
|
||||
* xfaces.c (set_lface_from_font):
|
||||
Return void, since callers never use the result.
|
||||
|
||||
2015-01-26 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* image.c (lookup_pixel_color): Reorder conditions that are
|
||||
|
|
|
@ -3380,23 +3380,20 @@ char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
|
|||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
void prepare_face_for_display (struct frame *, struct face *);
|
||||
#endif
|
||||
int lookup_named_face (struct frame *, Lisp_Object, int);
|
||||
int lookup_named_face (struct frame *, Lisp_Object, bool);
|
||||
int lookup_basic_face (struct frame *, int);
|
||||
int smaller_face (struct frame *, int, int);
|
||||
int face_with_height (struct frame *, int, int);
|
||||
int lookup_derived_face (struct frame *, Lisp_Object, int, int);
|
||||
int lookup_derived_face (struct frame *, Lisp_Object, int, bool);
|
||||
void init_frame_faces (struct frame *);
|
||||
void free_frame_faces (struct frame *);
|
||||
void recompute_basic_faces (struct frame *);
|
||||
int face_at_buffer_position (struct window *w, ptrdiff_t pos,
|
||||
ptrdiff_t *endptr, ptrdiff_t limit,
|
||||
int mouse, int base_face_id);
|
||||
int face_for_overlay_string (struct window *w, ptrdiff_t pos,
|
||||
ptrdiff_t *endptr, ptrdiff_t limit,
|
||||
int mouse, Lisp_Object overlay);
|
||||
int face_at_string_position (struct window *w, Lisp_Object string,
|
||||
ptrdiff_t pos, ptrdiff_t bufpos,
|
||||
ptrdiff_t *endptr, enum face_id, int mouse);
|
||||
int face_at_buffer_position (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
|
||||
bool, int);
|
||||
int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
|
||||
bool, Lisp_Object);
|
||||
int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t,
|
||||
ptrdiff_t *, enum face_id, bool);
|
||||
int merge_faces (struct frame *, Lisp_Object, int, int);
|
||||
int compute_char_face (struct frame *, int, Lisp_Object);
|
||||
void free_all_realized_faces (Lisp_Object);
|
||||
|
|
|
@ -3707,10 +3707,10 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w,
|
|||
|
||||
if (STRINGP (string))
|
||||
face_id = face_at_string_position (w, string, pos, 0, &endptr,
|
||||
DEFAULT_FACE_ID, 0);
|
||||
DEFAULT_FACE_ID, false);
|
||||
else
|
||||
face_id = face_at_buffer_position (w, pos, &endptr,
|
||||
pos + 100, 0, -1);
|
||||
pos + 100, false, -1);
|
||||
face = FACE_FROM_ID (f, face_id);
|
||||
}
|
||||
if (multibyte)
|
||||
|
@ -3754,7 +3754,7 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit,
|
|||
int face_id;
|
||||
|
||||
face_id = face_at_buffer_position (w, pos, &ignore,
|
||||
*limit, 0, -1);
|
||||
*limit, false, -1);
|
||||
face = FACE_FROM_ID (XFRAME (w->frame), face_id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1828,7 +1828,7 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
|
|||
w = XWINDOW (window);
|
||||
f = XFRAME (w->frame);
|
||||
face_id = face_at_buffer_position (w, pos, &dummy,
|
||||
pos + 100, 0, -1);
|
||||
pos + 100, false, -1);
|
||||
}
|
||||
if (! CHAR_VALID_P (c))
|
||||
return Qnil;
|
||||
|
|
|
@ -587,7 +587,7 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o
|
|||
if (face_id == DEFAULT_FACE_ID)
|
||||
{
|
||||
Lisp_Object face = fringe_faces[which];
|
||||
face_id = NILP (face) ? lookup_named_face (f, Qfringe, 0)
|
||||
face_id = NILP (face) ? lookup_named_face (f, Qfringe, false)
|
||||
: lookup_derived_face (f, face, FRINGE_FACE_ID, 0);
|
||||
if (face_id < 0)
|
||||
face_id = FRINGE_FACE_ID;
|
||||
|
|
22
src/xdisp.c
22
src/xdisp.c
|
@ -3877,7 +3877,7 @@ handle_face_prop (struct it *it)
|
|||
&next_stop,
|
||||
(IT_CHARPOS (*it)
|
||||
+ TEXT_PROP_DISTANCE_LIMIT),
|
||||
0, it->base_face_id);
|
||||
false, it->base_face_id);
|
||||
|
||||
/* Is this a start of a run of characters with box face?
|
||||
Caveat: this can be called for a freshly initialized
|
||||
|
@ -3953,7 +3953,7 @@ handle_face_prop (struct it *it)
|
|||
&next_stop,
|
||||
(IT_CHARPOS (*it)
|
||||
+ TEXT_PROP_DISTANCE_LIMIT),
|
||||
0,
|
||||
false,
|
||||
from_overlay);
|
||||
}
|
||||
else
|
||||
|
@ -3988,7 +3988,7 @@ handle_face_prop (struct it *it)
|
|||
IT_STRING_CHARPOS (*it),
|
||||
bufpos,
|
||||
&next_stop,
|
||||
base_face_id, 0);
|
||||
base_face_id, false);
|
||||
|
||||
/* Is this a start of a run of characters with box? Caveat:
|
||||
this can be called for a freshly allocated iterator; face_id
|
||||
|
@ -4130,7 +4130,7 @@ face_before_or_after_it_pos (struct it *it, int before_p)
|
|||
charpos,
|
||||
bufpos,
|
||||
&next_check_charpos,
|
||||
base_face_id, 0);
|
||||
base_face_id, false);
|
||||
|
||||
/* Correct the face for charsets different from ASCII. Do it
|
||||
for the multibyte case only. The face returned above is
|
||||
|
@ -4219,7 +4219,7 @@ face_before_or_after_it_pos (struct it *it, int before_p)
|
|||
face_id = face_at_buffer_position (it->w,
|
||||
CHARPOS (pos),
|
||||
&next_check_charpos,
|
||||
limit, 0, -1);
|
||||
limit, false, -1);
|
||||
|
||||
/* Correct the face for charsets different from ASCII. Do it
|
||||
for the multibyte case only. The face returned above is
|
||||
|
@ -7165,7 +7165,7 @@ get_next_display_element (struct it *it)
|
|||
{
|
||||
next_face_id = face_at_buffer_position
|
||||
(it->w, CHARPOS (pos), &ignore,
|
||||
CHARPOS (pos) + TEXT_PROP_DISTANCE_LIMIT, 0, -1);
|
||||
CHARPOS (pos) + TEXT_PROP_DISTANCE_LIMIT, false, -1);
|
||||
it->end_of_box_run_p
|
||||
= (FACE_FROM_ID (it->f, next_face_id)->box
|
||||
== FACE_NO_BOX);
|
||||
|
@ -19551,7 +19551,7 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row)
|
|||
&& glyph->u.ch == ' '))
|
||||
&& trailing_whitespace_p (glyph->charpos))
|
||||
{
|
||||
int face_id = lookup_named_face (f, Qtrailing_whitespace, 0);
|
||||
int face_id = lookup_named_face (f, Qtrailing_whitespace, false);
|
||||
if (face_id < 0)
|
||||
return;
|
||||
|
||||
|
@ -23561,7 +23561,7 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st
|
|||
|
||||
it->face_id
|
||||
= face_at_string_position (it->w, face_string, face_string_pos,
|
||||
0, &endptr, it->base_face_id, 0);
|
||||
0, &endptr, it->base_face_id, false);
|
||||
face = FACE_FROM_ID (it->f, it->face_id);
|
||||
it->face_box_p = face->box != FACE_NO_BOX;
|
||||
}
|
||||
|
@ -26067,7 +26067,7 @@ calc_line_height_property (struct it *it, Lisp_Object val, struct font *font,
|
|||
int face_id;
|
||||
struct face *face;
|
||||
|
||||
face_id = lookup_named_face (it->f, face_name, 0);
|
||||
face_id = lookup_named_face (it->f, face_name, false);
|
||||
if (face_id < 0)
|
||||
return make_number (-1);
|
||||
|
||||
|
@ -29283,7 +29283,7 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
|
|||
charpos,
|
||||
0, &ignore,
|
||||
glyph->face_id,
|
||||
1);
|
||||
true);
|
||||
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
|
||||
|
||||
if (NILP (pointer))
|
||||
|
@ -29611,7 +29611,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
|
|||
hlinfo->mouse_face_window = window;
|
||||
hlinfo->mouse_face_face_id
|
||||
= face_at_string_position (w, object, pos, 0, &ignore,
|
||||
glyph->face_id, 1);
|
||||
glyph->face_id, true);
|
||||
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
|
||||
cursor = No_Cursor;
|
||||
}
|
||||
|
|
522
src/xfaces.c
522
src/xfaces.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue