emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112287: More debugging code to inves


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112287: More debugging code to investigate bug #14062.
Date: Mon, 15 Apr 2013 10:27:56 +0300
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 112287
fixes bug: http://debbugs.gnu.org/14062
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2013-04-15 10:27:56 +0300
message:
  More debugging code to investigate bug #14062.
  
   src/w32fns.c (w32_wnd_proc): Add more assertions to investigate
   bug#14062.
   src/frame.h (WINDOW_FRAME): Protect macro and its argument with
   parentheses.
   src/dispextern.h (CURRENT_MODE_LINE_HEIGHT)
   (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
   (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
   parentheses where appropriate.
modified:
  src/ChangeLog
  src/dispextern.h
  src/frame.h
  src/w32fns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-04-14 20:33:57 +0000
+++ b/src/ChangeLog     2013-04-15 07:27:56 +0000
@@ -1,3 +1,16 @@
+2013-04-15  Eli Zaretskii  <address@hidden>
+
+       * w32fns.c (w32_wnd_proc): Add more assertions to investigate
+       bug#14205.
+
+       * frame.h (WINDOW_FRAME): Protect macro and its argument with
+       parentheses.
+
+       * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
+       (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
+       (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
+       parentheses where appropriate.
+
 2013-04-14  Paul Eggert  <address@hidden>
 
        * keyboard.c (timer_start_idle): Remove no-longer-used local.

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-03-28 14:04:49 +0000
+++ b/src/dispextern.h  2013-04-15 07:27:56 +0000
@@ -1384,7 +1384,7 @@
       ? current_mode_line_height                               \
       : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)         \
         ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)        \
-        : estimate_mode_line_height (XFRAME (W->frame),        \
+        : estimate_mode_line_height (XFRAME ((W)->frame),      \
                                      CURRENT_MODE_LINE_FACE_ID (W))))
 
 /* Return the current height of the header line of window W.  If not
@@ -1397,7 +1397,7 @@
        ? current_header_line_height                            \
        : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix)      \
          ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix)     \
-         : estimate_mode_line_height (XFRAME (W->frame),\
+         : estimate_mode_line_height (XFRAME ((W)->frame),     \
                                       HEADER_LINE_FACE_ID)))
 
 /* Return the height of the desired mode line of window W.  */
@@ -1416,20 +1416,20 @@
   (!MINI_WINDOW_P ((W))                                                \
    && !(W)->pseudo_window_p                                    \
    && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W))))     \
-   && BUFFERP (W->contents)                                    \
-   && !NILP (BVAR (XBUFFER (W->contents), mode_line_format))   \
+   && BUFFERP ((W)->contents)                                  \
+   && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \
    && WINDOW_TOTAL_LINES (W) > 1)
 
 /* Value is true if window W wants a header line.  */
 
-#define WINDOW_WANTS_HEADER_LINE_P(W)                          \
-  (!MINI_WINDOW_P ((W))                                                \
-   && !(W)->pseudo_window_p                                    \
-   && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W))))     \
-   && BUFFERP (W->contents)                                    \
-   && !NILP (BVAR (XBUFFER (W->contents), header_line_format)) \
-   && WINDOW_TOTAL_LINES (W) > 1                               \
-   + !NILP (BVAR (XBUFFER (W->contents), mode_line_format)))
+#define WINDOW_WANTS_HEADER_LINE_P(W)                                  \
+  (!MINI_WINDOW_P ((W))                                                        
\
+   && !(W)->pseudo_window_p                                            \
+   && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W))))             \
+   && BUFFERP ((W)->contents)                                          \
+   && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format))       \
+   && WINDOW_TOTAL_LINES (W) > 1                                       \
+   + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)))
 
 /* Return proper value to be used as baseline offset of font that has
    ASCENT and DESCENT to draw characters by the font at the vertical

=== modified file 'src/frame.h'
--- a/src/frame.h       2013-04-07 04:41:19 +0000
+++ b/src/frame.h       2013-04-15 07:27:56 +0000
@@ -598,7 +598,7 @@
 #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
 
 /* Given a window, return its frame as a Lisp_Object.  */
-#define WINDOW_FRAME(w) w->frame
+#define WINDOW_FRAME(w) ((w)->frame)
 
 /* Test a frame for particular kinds of display methods.  */
 #define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2013-04-07 04:41:19 +0000
+++ b/src/w32fns.c      2013-04-15 07:27:56 +0000
@@ -3123,6 +3123,8 @@
 
 #ifdef ENABLE_CHECKING
          /* Temporary code to catch crashes in computing form.rcArea.top.  */
+         eassert (FRAMEP (w->frame));
+         eassert (BUFFERP (w->contents));
          {
            int wmbp = WINDOW_MENU_BAR_P (w);
            int wtbp = WINDOW_TOOL_BAR_P (w);


reply via email to

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