summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2007-05-17 13:17:56 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2007-05-17 13:17:56 +0000
commit55d5acfaa4c4e03d58a2c9800a6f9efb13dde1a2 (patch)
tree82149b8c671e80f43cb2ab4bae745a911794effb /src/term.c
parent76a2727183bc9135db5758d2488abfa295a4d486 (diff)
* term.c (init_tty): Better initialize ttys in windows.
* w32fns.c (Fx_create_frame): Set the default minibuffer frame, window_system and the rest of the frame parameters following what is done in X11.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c
index 82b30b18af0..04d5f74fc2c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2424,6 +2424,7 @@ init_tty (char *name, char *terminal_type, int must_succeed)
"Unknown terminal type",
"Unknown terminal type");
+#ifndef WINDOWSNT
if (name == NULL)
name = "/dev/tty";
if (!strcmp (name, "/dev/tty"))
@@ -2437,7 +2438,8 @@ init_tty (char *name, char *terminal_type, int must_succeed)
terminal = get_named_tty (name);
if (terminal)
return terminal;
-
+#endif
+
terminal = create_terminal ();
tty = (struct tty_display_info *) xmalloc (sizeof (struct tty_display_info));
bzero (tty, sizeof (struct tty_display_info));
@@ -2451,6 +2453,7 @@ init_tty (char *name, char *terminal_type, int must_succeed)
tty->Wcm = (struct cm *) xmalloc (sizeof (struct cm));
Wcm_clear (tty);
+#ifndef WINDOWSNT
set_tty_hooks (terminal);
{
@@ -2497,19 +2500,33 @@ init_tty (char *name, char *terminal_type, int must_succeed)
tty->input = file;
tty->output = file;
}
-
+
tty->type = xstrdup (terminal_type);
add_keyboard_wait_descriptor (fileno (tty->input));
+#endif
+
encode_terminal_bufsize = 0;
#ifdef WINDOWSNT
initialize_w32_display ();
+ /* XXX Can this be non-null? */
+ if (name)
+ {
+ tty->name = xstrdup (name);
+ terminal->name = xstrdup (name);
+ }
+ tty->type = xstrdup (terminal_type);
+
+ /* XXX not sure if this line is correct. If it is not set then we
+ crash in update_display_1. */
+ tty->output = stdout;
+
Wcm_clear (tty);
- area = (char *) xmalloc (2044);
+ area = (char *) xmalloc (2044); /* XXX this seems unused. */
{
struct frame *f = XFRAME (selected_frame);