emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115309: Remove some unused items introduced during


From: Martin Rudalics
Subject: [Emacs-diffs] trunk r115309: Remove some unused items introduced during pixelwise change.
Date: Sat, 30 Nov 2013 16:26:53 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115309
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Sat 2013-11-30 17:25:51 +0100
message:
  Remove some unused items introduced during pixelwise change.
  
  * window.c (window_resize_total_check): Remove unused function.
  * xdisp.c (remember_mouse_glyph): Remove unused label.
  (Ftool_bar_height): Move declaration inside #if.
  * xterm.c (x_set_window_size): Don't use r and c.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/window.c                   window.c-20091113204419-o5vbwnq5f7feedwu-231
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
  src/xterm.c                    xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-11-30 15:51:16 +0000
+++ b/src/ChangeLog     2013-11-30 16:25:51 +0000
@@ -1,3 +1,11 @@
+2013-11-30  Martin Rudalics  <address@hidden>
+
+       Remove some unused items introduced during pixelwise change.
+       * window.c (window_resize_total_check): Remove unused function.
+       * xdisp.c (remember_mouse_glyph): Remove unused label.
+       (Ftool_bar_height): Move declaration inside #if.
+       * xterm.c (x_set_window_size): Don't use r and c.
+
 2013-11-30  Juanma Barranquero  <address@hidden>
 
        * xdisp.c (Fwindow_text_pixel_size): Remove unused variables

=== modified file 'src/window.c'
--- a/src/window.c      2013-11-30 15:51:16 +0000
+++ b/src/window.c      2013-11-30 16:25:51 +0000
@@ -3784,102 +3784,6 @@
                                    : FRAME_LINE_HEIGHT (f)));
 }
 
-static int
-window_resize_total_check (struct window *w, int horflag)
-{
-  struct frame *f = XFRAME (w->frame);
-  struct window *c;
-
-  if (WINDOW_VERTICAL_COMBINATION_P (w))
-    /* W is a vertical combination.  */
-    {
-      c = XWINDOW (w->contents);
-      if (horflag)
-       /* All child windows of W must have the same width as W.  */
-       {
-         while (c)
-           {
-             if (XINT (c->new_pixel) != XINT (w->new_pixel)
-/**              || XINT (c->new_total != XINT (w->new_total)) **/
-                 || !window_resize_check (c, horflag))
-               return 0;
-
-             c = NILP (c->next) ? 0 : XWINDOW (c->next);
-           }
-
-         return 1;
-       }
-      else
-       /* The sum of the heights of the child windows of W must equal
-          W's height.  */
-       {
-         int sum_of_pixels = 0, sum_of_totals = 0;
-
-         while (c)
-           {
-             if (!window_resize_check (c, horflag))
-               return 0;
-
-             sum_of_pixels = sum_of_pixels + XINT (c->new_pixel);
-/**          sum_of_totals = sum_of_totals + XINT (c->new_total); **/
-             c = NILP (c->next) ? 0 : XWINDOW (c->next);
-           }
-
-         return (sum_of_pixels == XINT (w->new_pixel)
-/**              && sum_of_totals == XINT (w->new_total) **/
-                 );
-       }
-    }
-  else if (WINDOW_HORIZONTAL_COMBINATION_P (w))
-    /* W is a horizontal combination.  */
-    {
-      c = XWINDOW (w->contents);
-      if (horflag)
-       /* The sum of the widths of the child windows of W must equal W's
-          width.  */
-       {
-         int sum_of_pixels = 0, sum_of_totals = 0;
-
-         while (c)
-           {
-             if (!window_resize_check (c, horflag))
-               return 0;
-
-             sum_of_pixels = sum_of_pixels + XINT (c->new_pixel);
-             sum_of_totals = sum_of_totals + XINT (c->new_total);
-             c = NILP (c->next) ? 0 : XWINDOW (c->next);
-           }
-
-         return (sum_of_pixels == XINT (w->new_pixel)
-/**              && sum_of_totals == XINT (w->new_total) **/
-                 );
-       }
-      else
-       /* All child windows of W must have the same height as W.  */
-       {
-         while (c)
-           {
-             if (XINT (c->new_pixel) != XINT (w->new_pixel)
-/**              || XINT (c->new_total) != XINT (w->new_total) **/
-                 || !window_resize_check (c, horflag))
-               return 0;
-
-             c = NILP (c->next) ? 0 : XWINDOW (c->next);
-           }
-
-         return 1;
-       }
-    }
-  else
-    /* A leaf window.  Make sure it's not too small.  The following
-       hardcodes the values of `window-safe-min-width' (2) and
-       `window-safe-min-height' (1) which are defined in window.el.  */
-    return (XINT (w->new_pixel) >= (horflag
-                                   ? (2 * FRAME_COLUMN_WIDTH (f))
-                                   : FRAME_LINE_HEIGHT (f))
-/**        && XINT (w->new_total) >= (horflag ? 2 : 1) **/
-           );
-}
 
 /* Set w->pixel_height (w->pixel_height if HORIZONTAL is non-zero) to
    w->new_pixel for window W and recursively all child windows of W.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-11-30 15:51:16 +0000
+++ b/src/xdisp.c       2013-11-30 16:25:51 +0000
@@ -2484,7 +2484,6 @@
       goto store_rect;
     }
 
- pixelwise:
   gx += WINDOW_LEFT_EDGE_X (w);
   gy += WINDOW_TOP_EDGE_Y (w);
 
@@ -12108,10 +12107,11 @@
 PIXELWISE non-nil means return the height of the tool bar inpixels.  */)
   (Lisp_Object frame, Lisp_Object pixelwise)
 {
+  int height = 0;
+
+#if ! defined (USE_GTK) && ! defined (HAVE_NS)
   struct frame *f = decode_any_frame (frame);
-  int height = 0;
 
-#if ! defined (USE_GTK) && ! defined (HAVE_NS)
   if (WINDOWP (f->tool_bar_window)
       && WINDOW_PIXEL_HEIGHT (XWINDOW (f->tool_bar_window)) > 0)
     {

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2013-11-30 09:25:31 +0000
+++ b/src/xterm.c       2013-11-30 16:25:51 +0000
@@ -8747,7 +8747,7 @@
 
   if (NILP (tip_frame) || XFRAME (tip_frame) != f)
     {
-      int r, c, text_width, text_height;
+      int text_width, text_height;
 
       /* When the frame is maximized/fullscreen or running under for
          example Xmonad, x_set_window_size_1 will be a no-op.
@@ -8764,12 +8764,10 @@
 #endif
       text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f));
       text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh);
-      r = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelh);
       /* Update f->scroll_bar_actual_width because it is used in
          FRAME_PIXEL_WIDTH_TO_TEXT_COLS.  */
       f->scroll_bar_actual_width
         = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f);
-      c = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, FRAME_PIXEL_WIDTH (f));
       change_frame_size (f, text_width, text_height, 0, 1, 0, 1);
     }
 


reply via email to

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