diff options
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/term.c b/src/term.c index 3b029da0b7f..72698ed3b2c 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2403,7 +2403,7 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", | |||
| 2403 | /* Get frame size from system, or else from termcap. */ | 2403 | /* Get frame size from system, or else from termcap. */ |
| 2404 | { | 2404 | { |
| 2405 | int height, width; | 2405 | int height, width; |
| 2406 | get_tty_size (tty, &width, &height); | 2406 | get_tty_size (fileno (TTY_INPUT (tty)), &width, &height); |
| 2407 | FrameCols (tty) = width; | 2407 | FrameCols (tty) = width; |
| 2408 | FrameRows (tty) = height; | 2408 | FrameRows (tty) = height; |
| 2409 | } | 2409 | } |
| @@ -2609,7 +2609,7 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", | |||
| 2609 | && tty->TS_end_standout_mode | 2609 | && tty->TS_end_standout_mode |
| 2610 | && !strcmp (tty->TS_standout_mode, tty->TS_end_standout_mode)); | 2610 | && !strcmp (tty->TS_standout_mode, tty->TS_end_standout_mode)); |
| 2611 | 2611 | ||
| 2612 | UseTabs (tty) = tabs_safe_p (tty) && TabWidth (tty) == 8; | 2612 | UseTabs (tty) = tabs_safe_p (fileno (TTY_INPUT (tty))) && TabWidth (tty) == 8; |
| 2613 | 2613 | ||
| 2614 | TTY_SCROLL_REGION_OK (tty) | 2614 | TTY_SCROLL_REGION_OK (tty) |
| 2615 | = (tty->Wcm->cm_abs | 2615 | = (tty->Wcm->cm_abs |
| @@ -2628,7 +2628,7 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", | |||
| 2628 | 2628 | ||
| 2629 | TTY_FAST_CLEAR_END_OF_LINE (tty) = tty->TS_clr_line != 0; | 2629 | TTY_FAST_CLEAR_END_OF_LINE (tty) = tty->TS_clr_line != 0; |
| 2630 | 2630 | ||
| 2631 | init_baud_rate (tty); | 2631 | init_baud_rate (fileno (TTY_INPUT (tty))); |
| 2632 | if (read_socket_hook) /* Baudrate is somewhat | 2632 | if (read_socket_hook) /* Baudrate is somewhat |
| 2633 | meaningless in this case */ | 2633 | meaningless in this case */ |
| 2634 | baud_rate = 9600; | 2634 | baud_rate = 9600; |
| @@ -2737,7 +2737,7 @@ delete_tty (struct tty_output *tty) | |||
| 2737 | 2737 | ||
| 2738 | if (tty->input) | 2738 | if (tty->input) |
| 2739 | fclose (tty->input); | 2739 | fclose (tty->input); |
| 2740 | if (tty->output) | 2740 | if (tty->output && tty->output != tty->input) |
| 2741 | fclose (tty->output); | 2741 | fclose (tty->output); |
| 2742 | if (tty->termscript) | 2742 | if (tty->termscript) |
| 2743 | fclose (tty->termscript); | 2743 | fclose (tty->termscript); |
| @@ -2745,10 +2745,8 @@ delete_tty (struct tty_output *tty) | |||
| 2745 | if (tty->old_tty) | 2745 | if (tty->old_tty) |
| 2746 | xfree (tty->old_tty); | 2746 | xfree (tty->old_tty); |
| 2747 | 2747 | ||
| 2748 | #if 0 /* XXX There is a dangling reference somewhere into this. */ | ||
| 2749 | if (tty->Wcm) | 2748 | if (tty->Wcm) |
| 2750 | xfree (tty->Wcm); | 2749 | xfree (tty->Wcm); |
| 2751 | #endif | ||
| 2752 | 2750 | ||
| 2753 | bzero (tty, sizeof (struct tty_output)); | 2751 | bzero (tty, sizeof (struct tty_output)); |
| 2754 | xfree (tty); | 2752 | xfree (tty); |