mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-22 18:35:09 +00:00
Use bool for boolean in xdisp.c
* dispextern.h (display_prop_intangible_p, resize_mini_window) (pixel_to_glyph_coords, mark_window_display_accurate) (compute_display_string_pos, handle_tool_bar_click) (x_intersect_rectangles, clear_mouse_face, display_tty_menu_item): * lisp.h (setup_echo_area_for_printing, message_with_string) (pos_visible_p): Use bool for boolean. * xdisp.c: Use bool, true, false intstead of int, 1, 0. Remove unnecessary forward decls. (trace_move) [DEBUG_TRACE_MOVE]: Now static. (CHECK_IT, CHECK_WINDOW_END): Now an inline function that is always defined. (check_it) [0]: (check_window_end) [oGLYPH_DEBUG && ENABLE_CHECKING]: Remove; no longer needed. (handle_stop): Prefer (X && !Y) to (X ? !Y : 0). (get_overlay_strings): Omit unnecessary casts. (forward_to_next_line_start): (Ftool_bar_height): Prefer !BOOL to (BOOL ? 0 : 1). (next_element_function): New typedef. (get_next_element): Use it. Now const. (IT_POS_VALID_AFTER_MOVE_P): Prefer !X || Y==0 to (X ? Y==0 : 1). (vmessage): Now ATTRIBUTE_FORMAT_PRINTF (1, 0), to pacify GCC 4.9.2 (display_echo_area): Prefer BOOLEXPR to BOOLEXPR ? 1 : 0. (tool_bar_item_info): Simplify. (invisible_prop): Rename from invisible_p, since it doesn't return bool. All callers changed. (x_produce_glyphs): Simplify.
This commit is contained in:
parent
d5111d525f
commit
f0ed1d6336
@ -1,3 +1,35 @@
|
||||
2015-02-10 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Use bool for boolean in xdisp.c
|
||||
* dispextern.h (display_prop_intangible_p, resize_mini_window)
|
||||
(pixel_to_glyph_coords, mark_window_display_accurate)
|
||||
(compute_display_string_pos, handle_tool_bar_click)
|
||||
(x_intersect_rectangles, clear_mouse_face, display_tty_menu_item):
|
||||
* lisp.h (setup_echo_area_for_printing, message_with_string)
|
||||
(pos_visible_p): Use bool for boolean.
|
||||
* xdisp.c: Use bool, true, false intstead of int, 1, 0.
|
||||
Remove unnecessary forward decls.
|
||||
(trace_move) [DEBUG_TRACE_MOVE]: Now static.
|
||||
(CHECK_IT, CHECK_WINDOW_END):
|
||||
Now an inline function that is always defined.
|
||||
(check_it) [0]:
|
||||
(check_window_end) [oGLYPH_DEBUG && ENABLE_CHECKING]:
|
||||
Remove; no longer needed.
|
||||
(handle_stop): Prefer (X && !Y) to (X ? !Y : 0).
|
||||
(get_overlay_strings): Omit unnecessary casts.
|
||||
(forward_to_next_line_start):
|
||||
(Ftool_bar_height):
|
||||
Prefer !BOOL to (BOOL ? 0 : 1).
|
||||
(next_element_function): New typedef.
|
||||
(get_next_element): Use it. Now const.
|
||||
(IT_POS_VALID_AFTER_MOVE_P): Prefer !X || Y==0 to (X ? Y==0 : 1).
|
||||
(vmessage): Now ATTRIBUTE_FORMAT_PRINTF (1, 0), to pacify GCC 4.9.2
|
||||
(display_echo_area): Prefer BOOLEXPR to BOOLEXPR ? 1 : 0.
|
||||
(tool_bar_item_info): Simplify.
|
||||
(invisible_prop): Rename from invisible_p, since it doesn't
|
||||
return bool. All callers changed.
|
||||
(x_produce_glyphs): Simplify.
|
||||
|
||||
2015-02-09 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Check for some overflows in vertical-motion
|
||||
|
@ -3182,9 +3182,9 @@ struct glyph_row *row_containing_pos (struct window *, ptrdiff_t,
|
||||
struct glyph_row *, int);
|
||||
int line_bottom_y (struct it *);
|
||||
int default_line_pixel_height (struct window *);
|
||||
int display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t);
|
||||
bool display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t);
|
||||
void resize_echo_area_exactly (void);
|
||||
int resize_mini_window (struct window *, int);
|
||||
bool resize_mini_window (struct window *, bool);
|
||||
void set_vertical_scroll_bar (struct window *);
|
||||
void set_horizontal_scroll_bar (struct window *);
|
||||
int try_window (Lisp_Object, struct text_pos, int);
|
||||
@ -3199,10 +3199,10 @@ int window_box_right (struct window *, enum glyph_row_area);
|
||||
int estimate_mode_line_height (struct frame *, enum face_id);
|
||||
int move_it_to (struct it *, ptrdiff_t, int, int, int, int);
|
||||
void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
|
||||
NativeRectangle *, int);
|
||||
NativeRectangle *, bool);
|
||||
void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *);
|
||||
|
||||
void mark_window_display_accurate (Lisp_Object, int);
|
||||
void mark_window_display_accurate (Lisp_Object, bool);
|
||||
void redisplay_preserve_echo_area (int);
|
||||
void init_iterator (struct it *, struct window *, ptrdiff_t,
|
||||
ptrdiff_t, struct glyph_row *, enum face_id);
|
||||
@ -3228,7 +3228,7 @@ extern void reseat_at_previous_visible_line_start (struct it *);
|
||||
extern Lisp_Object lookup_glyphless_char_display (int, struct it *);
|
||||
extern ptrdiff_t compute_display_string_pos (struct text_pos *,
|
||||
struct bidi_string_data *,
|
||||
struct window *, int, int *);
|
||||
struct window *, bool, int *);
|
||||
extern ptrdiff_t compute_display_string_end (ptrdiff_t,
|
||||
struct bidi_string_data *);
|
||||
extern void produce_stretch_glyph (struct it *);
|
||||
@ -3271,21 +3271,20 @@ extern void get_glyph_string_clip_rect (struct glyph_string *,
|
||||
extern Lisp_Object find_hot_spot (Lisp_Object, int, int);
|
||||
|
||||
extern void handle_tool_bar_click (struct frame *,
|
||||
int, int, int, int);
|
||||
int, int, bool, int);
|
||||
|
||||
extern void expose_frame (struct frame *, int, int, int, int);
|
||||
extern int x_intersect_rectangles (XRectangle *, XRectangle *,
|
||||
XRectangle *);
|
||||
extern bool x_intersect_rectangles (XRectangle *, XRectangle *, XRectangle *);
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
||||
extern void note_mouse_highlight (struct frame *, int, int);
|
||||
extern void x_clear_window_mouse_face (struct window *);
|
||||
extern void cancel_mouse_face (struct frame *);
|
||||
extern int clear_mouse_face (Mouse_HLInfo *);
|
||||
extern bool clear_mouse_face (Mouse_HLInfo *);
|
||||
extern bool cursor_in_mouse_face_p (struct window *w);
|
||||
extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *,
|
||||
int, int, enum draw_glyphs_face);
|
||||
extern void display_tty_menu_item (const char *, int, int, int, int, int);
|
||||
extern void display_tty_menu_item (const char *, int, int, int, int, bool);
|
||||
|
||||
/* Flags passed to try_window. */
|
||||
#define TRY_WINDOW_CHECK_MARGINS (1 << 0)
|
||||
|
@ -223,7 +223,7 @@ set_interval_plist (INTERVAL i, Lisp_Object plist)
|
||||
#define TEXT_PROP_MEANS_INVISIBLE(prop) \
|
||||
(EQ (BVAR (current_buffer, invisibility_spec), Qt) \
|
||||
? !NILP (prop) \
|
||||
: invisible_p (prop, BVAR (current_buffer, invisibility_spec)))
|
||||
: invisible_prop (prop, BVAR (current_buffer, invisibility_spec)))
|
||||
|
||||
/* Declared in alloc.c. */
|
||||
|
||||
@ -269,7 +269,7 @@ extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *,
|
||||
extern INTERVAL interval_of (ptrdiff_t, Lisp_Object);
|
||||
|
||||
/* Defined in xdisp.c. */
|
||||
extern int invisible_p (Lisp_Object, Lisp_Object);
|
||||
extern int invisible_prop (Lisp_Object, Lisp_Object);
|
||||
|
||||
/* Defined in textprop.c. */
|
||||
extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object,
|
||||
|
@ -3640,7 +3640,7 @@ extern bool noninteractive_need_newline;
|
||||
extern Lisp_Object echo_area_buffer[2];
|
||||
extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
|
||||
extern void check_message_stack (void);
|
||||
extern void setup_echo_area_for_printing (int);
|
||||
extern void setup_echo_area_for_printing (bool);
|
||||
extern bool push_message (void);
|
||||
extern void pop_message_unwind (void);
|
||||
extern Lisp_Object restore_message_unwind (Lisp_Object);
|
||||
@ -3653,7 +3653,7 @@ extern void message1_nolog (const char *);
|
||||
extern void message3 (Lisp_Object);
|
||||
extern void message3_nolog (Lisp_Object);
|
||||
extern void message_dolog (const char *, ptrdiff_t, bool, bool);
|
||||
extern void message_with_string (const char *, Lisp_Object, int);
|
||||
extern void message_with_string (const char *, Lisp_Object, bool);
|
||||
extern void message_log_maybe_newline (void);
|
||||
extern void update_echo_area (void);
|
||||
extern void truncate_echo_area (ptrdiff_t);
|
||||
@ -3663,8 +3663,8 @@ void set_frame_cursor_types (struct frame *, Lisp_Object);
|
||||
extern void syms_of_xdisp (void);
|
||||
extern void init_xdisp (void);
|
||||
extern Lisp_Object safe_eval (Lisp_Object);
|
||||
extern int pos_visible_p (struct window *, ptrdiff_t, int *,
|
||||
int *, int *, int *, int *, int *);
|
||||
extern bool pos_visible_p (struct window *, ptrdiff_t, int *,
|
||||
int *, int *, int *, int *, int *);
|
||||
|
||||
/* Defined in xsettings.c. */
|
||||
extern void syms_of_xsettings (void);
|
||||
|
2393
src/xdisp.c
2393
src/xdisp.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user