comparison src/console-tty.c @ 16:0293115a14e9 r19-15b91

Import from CVS: tag r19-15b91
author cvs
date Mon, 13 Aug 2007 08:49:20 +0200
parents 9ee227acff29
children 859a2309aef8
comparison
equal deleted inserted replaced
15:ad457d5f7d04 16:0293115a14e9
42 DEFINE_CONSOLE_TYPE (tty); 42 DEFINE_CONSOLE_TYPE (tty);
43 43
44 Lisp_Object Qterminal_type; 44 Lisp_Object Qterminal_type;
45 45
46 extern Lisp_Object Vstdio_str; /* in console-stream.c */ 46 extern Lisp_Object Vstdio_str; /* in console-stream.c */
47
48 47
49 static void 48 static void
50 allocate_tty_console_struct (struct console *con) 49 allocate_tty_console_struct (struct console *con)
51 { 50 {
52 con->console_data = 51 con->console_data =
96 outfd = fileno (stdout); 95 outfd = fileno (stdout);
97 CONSOLE_TTY_DATA (con)->is_stdio = 1; 96 CONSOLE_TTY_DATA (con)->is_stdio = 1;
98 } 97 }
99 else 98 else
100 { 99 {
101 infd = outfd = open ((char *) string_data (XSTRING (tty)), O_RDWR); 100 infd = outfd = open ((char *) XSTRING_DATA (tty), O_RDWR);
102 if (infd < 0) 101 if (infd < 0)
103 error ("Unable to open tty %s", string_data (XSTRING (tty))); 102 error ("Unable to open tty %s", XSTRING_DATA (tty));
104 CONSOLE_TTY_DATA (con)->is_stdio = 0; 103 CONSOLE_TTY_DATA (con)->is_stdio = 0;
105 } 104 }
106 105
107 CONSOLE_TTY_DATA (con)->infd = infd; 106 CONSOLE_TTY_DATA (con)->infd = infd;
108 CONSOLE_TTY_DATA (con)->outfd = outfd; 107 CONSOLE_TTY_DATA (con)->outfd = outfd;