* bug#25339: [PATCH] Remove local variables only used as front ends to others.
@ 2017-01-02 22:37 Chris Gregory
2017-01-07 8:22 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Chris Gregory @ 2017-01-02 22:37 UTC (permalink / raw)
To: 25339
--
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");
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#25339: [PATCH] Remove local variables only used as front ends to others.
2017-01-02 22:37 bug#25339: [PATCH] Remove local variables only used as front ends to others Chris Gregory
@ 2017-01-07 8:22 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2017-01-07 8:22 UTC (permalink / raw)
To: Chris Gregory; +Cc: 25339
tags 25339 notabug
close 25339
thanks
> From: Chris Gregory <czipperz@gmail.com>
> Date: Mon, 02 Jan 2017 14:37:53 -0800
>
> 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);
Thanks, but I consider these changes not to be for the better. E.g.,
FrameCols could be a macro (and it actually is in the non-WINDOWSNT
case). Also, the original code looks more natural to me.
So I don't think we should install these changes.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-07 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-02 22:37 bug#25339: [PATCH] Remove local variables only used as front ends to others Chris Gregory
2017-01-07 8:22 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.