emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115532: Use bool for boolean (GLYPH_DEBUG case).


From: Paul Eggert
Subject: [Emacs-diffs] trunk r115532: Use bool for boolean (GLYPH_DEBUG case).
Date: Sun, 15 Dec 2013 04:21:00 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115532
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sat 2013-12-14 20:20:53 -0800
message:
  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.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/dispextern.h               
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
  src/gnutls.c                   gnutls.c-20100926054902-dzayyj6wycit6kzn-3
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-12-14 21:36:44 +0000
+++ b/src/ChangeLog     2013-12-15 04:20:53 +0000
@@ -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):

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-12-14 21:36:44 +0000
+++ b/src/dispextern.h  2013-12-15 04:20:53 +0000
@@ -139,7 +139,7 @@
 /* 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

=== modified file 'src/gnutls.c'
--- a/src/gnutls.c      2013-12-14 18:04:09 +0000
+++ b/src/gnutls.c      2013-12-15 04:20:53 +0000
@@ -825,8 +825,7 @@
   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 @@
 
   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 @@
 
       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);

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-12-14 21:36:44 +0000
+++ b/src/xdisp.c       2013-12-15 04:20:53 +0000
@@ -662,7 +662,7 @@
 /* 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 @@
        = 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 @@
   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;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]