diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2003-12-28 22:28:52 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2003-12-28 22:28:52 +0000 |
commit | 04c3243c2a25812c6d0a324d29b8fd1d5acaa715 (patch) | |
tree | fa237cda8cf320b2cbcc9eedccaaf60eb9d5acb5 /src | |
parent | 8ed48c277afad174675b3d6dcb8e7b00a4bcc97d (diff) | |
download | emacs-04c3243c2a25812c6d0a324d29b8fd1d5acaa715.tar.gz |
Trivial changes
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-18
Diffstat (limited to 'src')
-rw-r--r-- | src/cm.c | 3 | ||||
-rw-r--r-- | src/cm.h | 6 | ||||
-rw-r--r-- | src/term.c | 59 |
3 files changed, 35 insertions, 33 deletions
@@ -134,8 +134,7 @@ addcol (tty, n) { * after we reach the last column; this takes us to a known state. */ void -cmcheckmagic (tty) - struct tty_output *tty; +cmcheckmagic (struct tty_output *tty) { if (curX (tty) == FrameCols (tty)) { @@ -166,10 +166,10 @@ extern int evalcost (); extern struct tty_output *current_tty; extern void cmcheckmagic P_ ((struct tty_output *)); extern int cmputc P_ ((int)); -extern void cmcostinit P_ ((struct tty_output *tty)); +extern void cmcostinit P_ ((struct tty_output *)); extern void cmgoto P_ ((struct tty_output *, int, int)); -extern void Wcm_clear P_ ((struct tty_output *tty)); -extern int Wcm_init P_ ((struct tty_output *tty)); +extern void Wcm_clear P_ ((struct tty_output *)); +extern int Wcm_init P_ ((struct tty_output *)); /* arch-tag: acc1535a-7136-49d6-b22d-9bc85702251b (do not change this comment) */ diff --git a/src/term.c b/src/term.c index 53171e92369..63b198bbf2a 100644 --- a/src/term.c +++ b/src/term.c @@ -917,18 +917,19 @@ insert_glyphs (start, len) { char *buf; struct glyph *glyph = NULL; - struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); + struct frame *f; struct tty_output *tty; if (len <= 0) return; - if (insert_glyphs_hook && ! FRAME_TERMCAP_P (f)) + if (insert_glyphs_hook) { (*insert_glyphs_hook) (start, len); return; } + f = (updating_frame ? updating_frame : XFRAME (selected_frame)); tty = FRAME_TTY (f); if (tty->TS_ins_multi_chars) @@ -2156,11 +2157,9 @@ term_init (name, terminal_type) tty_list = tty; } - if (tty->Wcm) - Wcm_clear (tty); - else - tty->Wcm = (struct cm *) xmalloc (sizeof (struct cm)); - + if (! tty->Wcm) + tty->Wcm = (struct cm *) xmalloc (sizeof (struct cm)); + if (name) { int fd; @@ -2676,24 +2675,6 @@ delete_tty (struct tty_output *tty) { Lisp_Object tail, frame; - FOR_EACH_FRAME (tail, frame) - { - struct frame *f = XFRAME (frame); - if (FRAME_LIVE_P (f) && FRAME_TTY (f) == tty) - { - Fdelete_frame (frame, Qt); - f->output_data.tty = 0; - } - } - - /* Close the terminal and free memory. */ - delete_tty_1 (tty); -} - -static void -delete_tty_1 (struct tty_output *tty) -{ - if (tty == tty_list) tty_list = tty->next; else @@ -2709,13 +2690,25 @@ delete_tty_1 (struct tty_output *tty) p->next = p->next->next; } + FOR_EACH_FRAME (tail, frame) + { + struct frame *f = XFRAME (frame); + if (FRAME_LIVE_P (f) && FRAME_TTY (f) == tty) + { + Fdelete_frame (frame, Qt); + f->output_data.tty = 0; + } + } + /* This hangs. */ - /* reset_sys_modes (tty); */ + /* + reset_sys_modes (tty); - if (tty->name) + if (tty->name) xfree (tty->name); if (tty->type) xfree (tty->type); + */ if (tty->input) fclose (tty->input); if (tty->output) @@ -2723,9 +2716,19 @@ delete_tty_1 (struct tty_output *tty) if (tty->termscript) fclose (tty->termscript); + tty->input = 0; + tty->output = 0; + tty->termscript = 0; + /* if (tty->old_tty) - xfree (tty->old_tty); + { + memset (tty->old_tty, 'Z', sizeof (struct emacs_tty)); + tty->old_tty = 0; + } + + + /* xfree (tty->old_tty); if (tty->Wcm) { |