GNU bug report logs - #25339
[PATCH] Remove local variables only used as front ends to others.

Previous Next

Package: emacs;

Reported by: Chris Gregory <czipperz <at> gmail.com>

Date: Mon, 2 Jan 2017 22:39:01 UTC

Severity: wishlist

Tags: notabug, patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chris Gregory <czipperz <at> gmail.com>
To: 25339 <at> debbugs.gnu.org
Subject: bug#25339: [PATCH] Remove local variables only used as front ends to others.
Date: Mon, 02 Jan 2017 14:37:53 -0800
-- 
Chris Gregory

diff --git a/src/term.c b/src/term.c
index c067a86d18..d70e2bc9d7 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4161,12 +4161,10 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
 #ifdef WINDOWSNT
   {
     struct frame *f = XFRAME (selected_frame);
-    int height, width;
-
-    initialize_w32_display (terminal, &width, &height);
+    int height;
 
+    initialize_w32_display (terminal, &FrameCols (tty), &height);
     FrameRows (tty) = height;
-    FrameCols (tty) = width;
     tty->specified_window = height;
 
     FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none;
@@ -4176,14 +4174,11 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
   }
 #else  /* MSDOS */
   {
-    int height, width;
     if (strcmp (terminal_type, "internal") == 0)
       terminal->type = output_msdos_raw;
     initialize_msdos_display (terminal);
 
-    get_tty_size (fileno (tty->input), &width, &height);
-    FrameCols (tty) = width;
-    FrameRows (tty) = height;
+    get_tty_size (fileno (tty->input), &FrameCols (tty), &FrameRows (tty));
     tty->char_ins_del_ok = 0;
     init_baud_rate (fileno (tty->input));
   }
@@ -4229,12 +4224,7 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
   term_get_fkeys (address, terminal->kboard);
 
   /* Get frame size from system, or else from termcap.  */
-  {
-    int height, width;
-    get_tty_size (fileno (tty->input), &width, &height);
-    FrameCols (tty) = width;
-    FrameRows (tty) = height;
-  }
+  get_tty_size (fileno (tty->input), &FrameCols (tty), &FrameRows (tty));
 
   if (FrameCols (tty) <= 0)
     FrameCols (tty) = tgetnum ("co");




This bug report was last modified 8 years and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.