comparison src/term.c @ 106244:af182a117edd

(delete_tty): Remove check for last terminal (bug#4970).
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 25 Nov 2009 17:53:54 +0000
parents 68dd71358159
children 1d1d5d9bd884 4bad2c6338cc
comparison
equal deleted inserted replaced
106243:20e6e5b85a34 106244:af182a117edd
3949 3949
3950 static void 3950 static void
3951 delete_tty (struct terminal *terminal) 3951 delete_tty (struct terminal *terminal)
3952 { 3952 {
3953 struct tty_display_info *tty; 3953 struct tty_display_info *tty;
3954 Lisp_Object tail, frame;
3955 int last_terminal;
3956 3954
3957 /* Protect against recursive calls. delete_frame in 3955 /* Protect against recursive calls. delete_frame in
3958 delete_terminal calls us back when it deletes our last frame. */ 3956 delete_terminal calls us back when it deletes our last frame. */
3959 if (!terminal->name) 3957 if (!terminal->name)
3960 return; 3958 return;
3961 3959
3962 if (terminal->type != output_termcap) 3960 if (terminal->type != output_termcap)
3963 abort (); 3961 abort ();
3964 3962
3965 tty = terminal->display_info.tty; 3963 tty = terminal->display_info.tty;
3966
3967 last_terminal = 1;
3968 FOR_EACH_FRAME (tail, frame)
3969 {
3970 struct frame *f = XFRAME (frame);
3971 if (FRAME_LIVE_P (f) && (!FRAME_TERMCAP_P (f) || FRAME_TTY (f) != tty))
3972 {
3973 last_terminal = 0;
3974 break;
3975 }
3976 }
3977 if (last_terminal)
3978 error ("Attempt to delete the sole terminal device with live frames");
3979 3964
3980 if (tty == tty_list) 3965 if (tty == tty_list)
3981 tty_list = tty->next; 3966 tty_list = tty->next;
3982 else 3967 else
3983 { 3968 {