From: Paul Eggert Date: Sun, 15 Dec 2013 04:20:53 +0000 (-0800) Subject: Use bool for boolean (GLYPH_DEBUG case). X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~404 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b4dd49e0faee3ff97b544cab2ef82898310c8999;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index a063d2d51d6..ebf715e9374 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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): diff --git a/src/dispextern.h b/src/dispextern.h index ded11e58dfb..d3ee2472dc6 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -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 diff --git a/src/gnutls.c b/src/gnutls.c index a14d3ef31c5..dd9f30f4de9 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -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); diff --git a/src/xdisp.c b/src/xdisp.c index 97fa0ce5fe7..b5274b53229 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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;