/* Terminal control module for terminals described by TERMCAP
Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <signal.h>
#include <stdarg.h>
+#include <setjmp.h>
#include "lisp.h"
#include "termchar.h"
if (unibyte_display_via_language_environment
&& (it->c >= 0240))
{
- it->char_to_display = unibyte_char_to_multibyte (it->c);
+ it->char_to_display = BYTE8_TO_CHAR (it->c);
it->pixel_width = CHAR_WIDTH (it->char_to_display);
it->nglyphs = it->pixel_width;
if (it->glyph_row)
/* Produce a composite glyph for iterator IT. IT->cmp_id is the ID of
the composition. We simply produces components of the composition
- assuming that that the terminal has a capability to layout/render
- it correctly. */
+ assuming that the terminal has a capability to layout/render it
+ correctly. */
static void
produce_composite_glyph (it)
#endif /* HAVE_GPM */
\f
+#ifndef MSDOS
/***********************************************************************
Initialization
***********************************************************************/
xfree (f->output_data.tty);
}
+#else /* MSDOS */
+
+/* Delete frame F's face cache. */
+
+static void
+tty_free_frame_resources (struct frame *f)
+{
+ if (! FRAME_TERMCAP_P (f) && ! FRAME_MSDOS_P (f))
+ abort ();
+
+ if (FRAME_FACE_CACHE (f))
+ free_frame_faces (f);
+}
+#endif /* MSDOS */
\f
/* Reset the hooks in TERMINAL. */
tty->type = xstrdup (terminal_type);
-#ifdef subprocesses
add_keyboard_wait_descriptor (fileno (tty->input));
-#endif
#endif /* !DOS_NT */
delete_tty (struct terminal *terminal)
{
struct tty_display_info *tty;
- Lisp_Object tail, frame;
- int last_terminal;
/* Protect against recursive calls. delete_frame in
delete_terminal calls us back when it deletes our last frame. */
tty = terminal->display_info.tty;
- last_terminal = 1;
- FOR_EACH_FRAME (tail, frame)
- {
- struct frame *f = XFRAME (frame);
- if (FRAME_LIVE_P (f) && (!FRAME_TERMCAP_P (f) || FRAME_TTY (f) != tty))
- {
- last_terminal = 0;
- break;
- }
- }
- if (last_terminal)
- error ("Attempt to delete the sole terminal device with live frames");
-
if (tty == tty_list)
tty_list = tty->next;
else
xfree (tty->old_tty);
xfree (tty->Wcm);
- if (tty->termcap_strings_buffer)
- xfree (tty->termcap_strings_buffer);
- if (tty->termcap_term_buffer)
- xfree (tty->termcap_term_buffer);
+ xfree (tty->termcap_strings_buffer);
+ xfree (tty->termcap_term_buffer);
bzero (tty, sizeof (struct tty_display_info));
xfree (tty);