diff options
| author | Karoly Lorentey | 2003-12-30 19:27:57 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2003-12-30 19:27:57 +0000 |
| commit | 16c290d8c16fb0fdb574c837c6b1badbc655efe2 (patch) | |
| tree | 26e7915477ebe5b8c3847e70b9230a6efa134e6c /src/term.c | |
| parent | 9d9f18127ffc1bc26358a5d48917ef4e4bafbddc (diff) | |
| download | emacs-16c290d8c16fb0fdb574c837c6b1badbc655efe2.tar.gz emacs-16c290d8c16fb0fdb574c837c6b1badbc655efe2.zip | |
Major bugfixes and slight enhancements.
src/dispextern.h (get_tty_size, tabs_safe_p, init_baud_rate): Update
prototypes.
src/dispnew.c (window_change_signal): Update call to get_tty_size.
src/frame.c (Fmake_terminal_frame): Ditto.
src/keyboard.c (Fsuspend_emacs): Ditto.
src/sysdep.c: Eliminate tty_outputs, wherever possible. (The
exceptions are init_sys_modes and reset_sys_modes, which need access
to tty-local parameters).
(init_baud_rate): Change tty_output parameter to a simple file descriptor.
(narrow_foreground_group, widen_foreground_group): Ditto.
(tabs_safe_p, get_tty_size): Ditto.
(init_sys_modes): Update narrow_foreground_group invocation.
(reset_sys_modes): Update widen_foreground_group invocation.
(request_sigio)[!FASYNC && STRIDE]: Fix function signature.
src/term.c (delete_tty): Only close output file handle if it is
different from input. Re-enable freeing of Wcm.
(term_init): Update get_tty_size, tabs_safe_p and init_baud_rate
invocations.
lib-src/emacsclient.c (here): Renamed to frame.
(longopts): Change --here to --frame. The -h short option may be
confused with --help.
(decode_options, print_help_and_exit): Update to reflect above changes.
(main): Ditto.
lisp/server.el (server-start): Fix frame-live-p call syntax.
(server-process-filter): Handle 'emacsclient -f' without file
arguments. Don't return any values to emacsclient when 'emacsclient
-f -e'.
(server-switch-buffer): Prevent infinite recursion when there are no
files to edit.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-27
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); |