Commit 59ea14cd authored by Paul Eggert's avatar Paul Eggert

* dispnew.c: Use bool for boolean.

(frame_garbaged, display_completed, delayed_size_change)
(fonts_changed_p, add_window_display_history)
(add_frame_display_history, verify_row_hash)
(adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
(row_equal_p, realloc_glyph_pool)
(allocate_matrices_for_frame_redisplay)
(showing_window_margins_p)
(adjust_frame_glyphs_for_frame_redisplay)
(build_frame_matrix_from_leaf_window, make_current)
(mirrored_line_dance, mirror_line_dance, update_frame)
(update_window_tree, update_single_window)
(check_current_matrix_flags, update_window, update_text_area)
(update_window_line, set_window_update_flags, scrolling_window)
(update_frame_1, scrolling, buffer_posn_from_coords)
(do_pending_window_change, change_frame_size)
(change_frame_size_1, sit_for):
Use bool for boolean.
(clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
and remove last int (actually boolean) argument, which was always 0.
All callers changed.
* dispextern.h, frame.h, lisp.h: Reflect above API changes.
* dispextern.h (struct composition_it): Use bool for boolean.
(struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
(struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
* dired.c (file_name_completion):
Use bool for boolean.  (This was missed in an earlier change.)
parent 95072a94
2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
* dispnew.c: Use bool for boolean.
(frame_garbaged, display_completed, delayed_size_change)
(fonts_changed_p, add_window_display_history)
(add_frame_display_history, verify_row_hash)
(adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
(row_equal_p, realloc_glyph_pool)
(allocate_matrices_for_frame_redisplay)
(showing_window_margins_p)
(adjust_frame_glyphs_for_frame_redisplay)
(build_frame_matrix_from_leaf_window, make_current)
(mirrored_line_dance, mirror_line_dance, update_frame)
(update_window_tree, update_single_window)
(check_current_matrix_flags, update_window, update_text_area)
(update_window_line, set_window_update_flags, scrolling_window)
(update_frame_1, scrolling, buffer_posn_from_coords)
(do_pending_window_change, change_frame_size)
(change_frame_size_1, sit_for):
Use bool for boolean.
(clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
and remove last int (actually boolean) argument, which was always 0.
All callers changed.
* dispextern.h, frame.h, lisp.h: Reflect above API changes.
* dispextern.h (struct composition_it): Use bool for boolean.
(struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
(struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
* dired.c (file_name_completion):
Use bool for boolean. (This was missed in an earlier change.)
2012-08-27 Martin Rudalics <rudalics@gmx.at>
* window.c (Fset_window_configuration): Revert first part of
......
......@@ -460,7 +460,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
Lisp_Object encoded_file;
Lisp_Object encoded_dir;
struct stat st;
int directoryp;
bool directoryp;
/* If not INCLUDEALL, exclude files in completion-ignored-extensions as
well as "." and "..". Until shown otherwise, assume we can't exclude
anything. */
......@@ -530,7 +530,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
if (file_name_completion_stat (encoded_dir, dp, &st) < 0)
continue;
directoryp = S_ISDIR (st.st_mode);
directoryp = S_ISDIR (st.st_mode) != 0;
tem = Qnil;
/* If all_flag is set, always include all.
It would not actually be helpful to the user to ignore any possible
......@@ -718,7 +718,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
/* This tests that the current file is an exact match
but BESTMATCH is not (it is too long). */
if ((matchsize == SCHARS (name)
&& matchsize + !!directoryp < SCHARS (bestmatch))
&& matchsize + directoryp < SCHARS (bestmatch))
||
/* If there is no exact match ignoring case,
prefer a match that does not change the case
......@@ -730,7 +730,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
either both or neither are exact. */
(((matchsize == SCHARS (name))
==
(matchsize + !!directoryp == SCHARS (bestmatch)))
(matchsize + directoryp == SCHARS (bestmatch)))
&& (cmp = Fcompare_strings (name, zero,
make_number (SCHARS (file)),
file, zero,
......
......@@ -671,7 +671,7 @@ struct glyph_matrix
/* Values of BEGV and ZV as of last redisplay. Set in
mark_window_display_accurate_1. */
int begv, zv;
ptrdiff_t begv, zv;
};
......@@ -1126,11 +1126,11 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
((ROW)->phys_height - (ROW)->phys_ascent \
> (ROW)->height - (ROW)->ascent)
/* Non-zero means that fonts have been loaded since the last glyph
/* True means that fonts have been loaded since the last glyph
matrix adjustments. The function redisplay_internal adjusts glyph
matrices when this flag is non-zero. */
matrices when this flag is true. */
extern int fonts_changed_p;
extern bool fonts_changed_p;
/* A glyph for a space. */
......@@ -1149,7 +1149,7 @@ extern int updated_area;
/* Non-zero means last display completed. Zero means it was
preempted. */
extern int display_completed;
extern bool display_completed;
......@@ -1415,7 +1415,7 @@ struct glyph_string
&& !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1)
/* Value is non-zero if window W wants a header line. */
/* Value is true if window W wants a header line. */
#define WINDOW_WANTS_HEADER_LINE_P(W) \
(!MINI_WINDOW_P ((W)) \
......@@ -1856,7 +1856,6 @@ struct bidi_it {
int resolved_level; /* final resolved level of this character */
int invalid_levels; /* how many PDFs to ignore */
int invalid_rl_levels; /* how many PDFs from RLE/RLO to ignore */
int prev_was_pdf; /* if non-zero, previous char was PDF */
struct bidi_saved_info prev; /* info about previous character */
struct bidi_saved_info last_strong; /* last-seen strong directional char */
struct bidi_saved_info next_for_neutral; /* surrounding characters for... */
......@@ -1879,6 +1878,7 @@ struct bidi_it {
struct bidi_string_data string; /* string to reorder */
bidi_dir_t paragraph_dir; /* current paragraph direction */
ptrdiff_t separator_limit; /* where paragraph separator should end */
unsigned prev_was_pdf : 1; /* if non-zero, previous char was PDF */
unsigned first_elt : 1; /* if non-zero, examine current char first */
unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */
unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */
......@@ -2085,10 +2085,10 @@ struct composition_it
ptrdiff_t lookback;
/* If non-negative, number of glyphs of the glyph-string. */
int nglyphs;
/* Nonzero iff the composition is created while buffer is scanned in
/* True iff the composition is created while buffer is scanned in
reverse order, and thus the grapheme clusters must be rendered
from the last to the first. */
int reversed_p;
bool reversed_p;
/** The following members contain information about the current
grapheme cluster. */
......@@ -3304,7 +3304,7 @@ extern Lisp_Object marginal_area_string (struct window *, enum window_part,
extern void redraw_frame (struct frame *);
extern void cancel_line (int, struct frame *);
extern void init_desired_glyphs (struct frame *);
extern int update_frame (struct frame *, int, int);
extern bool update_frame (struct frame *, bool, bool);
extern void bitch_at_user (void);
void adjust_glyphs (struct frame *);
void free_glyphs (struct frame *);
......@@ -3320,13 +3320,13 @@ void rotate_matrix (struct glyph_matrix *, int, int, int);
void increment_matrix_positions (struct glyph_matrix *,
int, int, ptrdiff_t, ptrdiff_t);
void blank_row (struct window *, struct glyph_row *, int);
void enable_glyph_matrix_rows (struct glyph_matrix *, int, int, int);
void clear_glyph_matrix_rows (struct glyph_matrix *, int, int);
void clear_glyph_row (struct glyph_row *);
void prepare_desired_row (struct glyph_row *);
void set_window_update_flags (struct window *, int);
void update_single_window (struct window *, int);
void do_pending_window_change (int);
void change_frame_size (struct frame *, int, int, int, int, int);
void set_window_update_flags (struct window *, bool);
void update_single_window (struct window *, bool);
void do_pending_window_change (bool);
void change_frame_size (struct frame *, int, int, bool, bool, bool);
void init_display (void);
void syms_of_display (void);
extern Lisp_Object Qredisplay_dont_pause;
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ INLINE_HEADER_BEGIN
/* Miscellanea. */
/* Nonzero means there is at least one garbaged frame. */
extern int frame_garbaged;
extern bool frame_garbaged;
/* The structure representing a frame. */
......
......@@ -2766,7 +2766,7 @@ _Noreturn void __executable_start (void);
#endif
extern Lisp_Object selected_frame;
extern Lisp_Object Vwindow_system;
extern Lisp_Object sit_for (Lisp_Object, int, int);
extern Lisp_Object sit_for (Lisp_Object, bool, int);
extern void init_display (void);
extern void syms_of_display (void);
......
......@@ -15380,7 +15380,7 @@ set_vertical_scroll_bar (struct window *w)
selected_window is redisplayed.
We can return without actually redisplaying the window if
fonts_changed_p is nonzero. In that case, redisplay_internal will
fonts_changed_p. In that case, redisplay_internal will
retry. */
static void
......@@ -16224,7 +16224,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
}
#endif /* HAVE_WINDOW_SYSTEM */
/* We go to this label, with fonts_changed_p nonzero,
/* We go to this label, with fonts_changed_p set,
if it is necessary to try again using larger glyph matrices.
We have to redeem the scroll bar even in this case,
because the loop in redisplay_internal expects that. */
......@@ -17705,15 +17705,15 @@ try_window_id (struct window *w)
{
rotate_matrix (current_matrix, first_unchanged_at_end_vpos + dvpos,
bottom_vpos, dvpos);
enable_glyph_matrix_rows (current_matrix, bottom_vpos + dvpos,
bottom_vpos, 0);
clear_glyph_matrix_rows (current_matrix, bottom_vpos + dvpos,
bottom_vpos);
}
else if (dvpos > 0)
{
rotate_matrix (current_matrix, first_unchanged_at_end_vpos,
bottom_vpos, dvpos);
enable_glyph_matrix_rows (current_matrix, first_unchanged_at_end_vpos,
first_unchanged_at_end_vpos + dvpos, 0);
clear_glyph_matrix_rows (current_matrix, first_unchanged_at_end_vpos,
first_unchanged_at_end_vpos + dvpos);
}
/* For frame-based redisplay, make sure that current frame and window
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment