Commit b4dd49e0 authored by Paul Eggert's avatar Paul Eggert
Browse files

Use bool for boolean (GLYPH_DEBUG case).

* xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
Use bool for boolean.
* dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
Args must now be expressions; all callers changed.
parent f629af54
......@@ -77,6 +77,7 @@
(sync_frame_with_window_matrix_rows, try_window_id)
(display_menu_bar, display_tty_menu_item, display_mode_line)
(coords_in_mouse_face_p, cursor_in_mouse_face_p):
* xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
* xmenu.c (xmenu_show):
* xterm.c (use_xim, x_term_init):
* xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
......@@ -118,6 +119,8 @@
* dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
* interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE)
Surround statement macro with proper 'do { ... } while (false)' brackets.
* dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
Args must now be expressions; all callers changed.
(SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
(PRODUCE_GLYPHS): Simplify use of boolean.
* fileio.c (Fcopy_file):
......
......@@ -139,7 +139,7 @@ enum window_part
/* Macros to include code only if GLYPH_DEBUG is defined. */
#ifdef GLYPH_DEBUG
#define IF_DEBUG(X) (X)
#define IF_DEBUG(X) ((void) (X))
#else
#define IF_DEBUG(X) ((void) 0)
#endif
......
......@@ -825,8 +825,7 @@ one trustfile (usually a CA bundle). */)
verify_error = Fplist_get (proplist, QCgnutls_bootprop_verify_error);
prime_bits = Fplist_get (proplist, QCgnutls_bootprop_min_prime_bits);
if (!Flistp (verify_error))
error ("gnutls-boot: invalid :verify_error parameter (not a list)");
CHECK_LIST_CONS (verify_error, verify_error);
if (!STRINGP (hostname))
error ("gnutls-boot: invalid :hostname parameter (not a string)");
......@@ -1071,8 +1070,7 @@ one trustfile (usually a CA bundle). */)
if (peer_verification != 0)
{
if (EQ (verify_error, Qt)
|| !NILP (Fmember (QCgnutls_bootprop_trustfiles, verify_error)))
if (!NILP (Fmember (QCgnutls_bootprop_trustfiles, verify_error)))
{
emacs_gnutls_deinit (proc);
error ("Certificate validation failed %s, verification code %d",
......@@ -1121,8 +1119,7 @@ one trustfile (usually a CA bundle). */)
if (!fn_gnutls_x509_crt_check_hostname (gnutls_verify_cert, c_hostname))
{
if (EQ (verify_error, Qt)
|| !NILP (Fmember (QCgnutls_bootprop_hostname, verify_error)))
if (!NILP (Fmember (QCgnutls_bootprop_hostname, verify_error)))
{
fn_gnutls_x509_crt_deinit (gnutls_verify_cert);
emacs_gnutls_deinit (proc);
......
......@@ -662,7 +662,7 @@ bset_update_mode_line (struct buffer *b)
/* Non-zero means print traces of redisplay if compiled with
GLYPH_DEBUG defined. */
 
int trace_redisplay_p;
bool trace_redisplay_p;
 
#endif /* GLYPH_DEBUG */
 
......@@ -17723,7 +17723,7 @@ try_window_id (struct window *w)
= run.current_y = run.desired_y = run.height = 0;
first_unchanged_at_end_row = NULL;
}
IF_DEBUG (debug_dvpos = dvpos; debug_dy = dy);
IF_DEBUG ((debug_dvpos = dvpos, debug_dy = dy));
 
 
/* Find the cursor if not already found. We have to decide whether
......@@ -18019,8 +18019,8 @@ try_window_id (struct window *w)
else
emacs_abort ();
 
IF_DEBUG (debug_end_pos = w->window_end_pos;
debug_end_vpos = w->window_end_vpos);
IF_DEBUG ((debug_end_pos = w->window_end_pos,
debug_end_vpos = w->window_end_vpos));
 
/* Record that display has not been completed. */
w->window_end_valid = 0;
......
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