comparison src/console-tty.c @ 12:bcdc7deadc19 r19-15b7

Import from CVS: tag r19-15b7
author cvs
date Mon, 13 Aug 2007 08:48:16 +0200
parents 376386a54a3c
children 9ee227acff29
comparison
equal deleted inserted replaced
11:91ffe8bd52e4 12:bcdc7deadc19
41 41
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 Lisp_Object Vstdio_str; 46 extern Lisp_Object Vstdio_str; /* in console-stream.c */
47 47
48 48
49 static void 49 static void
50 allocate_tty_console_struct (struct console *con) 50 allocate_tty_console_struct (struct console *con)
51 { 51 {
202 202
203 Lisp_Object 203 Lisp_Object
204 tty_semi_canonicalize_console_connection (Lisp_Object connection, 204 tty_semi_canonicalize_console_connection (Lisp_Object connection,
205 Error_behavior errb) 205 Error_behavior errb)
206 { 206 {
207 if (NILP (connection)) 207 return stream_semi_canonicalize_console_connection (connection, errb);
208 return Vstdio_str;
209
210 return connection;
211 } 208 }
212 209
213 Lisp_Object 210 Lisp_Object
214 tty_canonicalize_console_connection (Lisp_Object connection, 211 tty_canonicalize_console_connection (Lisp_Object connection,
215 Error_behavior errb) 212 Error_behavior errb)
216 { 213 {
217 if (NILP (connection) || !NILP (Fequal (connection, Vstdio_str))) 214 return stream_canonicalize_console_connection (connection, errb);
218 return Vstdio_str;
219
220 if (!ERRB_EQ (errb, ERROR_ME))
221 {
222 if (!STRINGP (connection))
223 return Qunbound;
224 }
225 else
226 CHECK_STRING (connection);
227
228 return Ffile_truename (connection, Qnil);
229 } 215 }
230 216
231 Lisp_Object 217 Lisp_Object
232 tty_semi_canonicalize_device_connection (Lisp_Object connection, 218 tty_semi_canonicalize_device_connection (Lisp_Object connection,
233 Error_behavior errb) 219 Error_behavior errb)
234 { 220 {
235 return tty_semi_canonicalize_console_connection (connection, errb); 221 return stream_semi_canonicalize_console_connection (connection, errb);
236 } 222 }
237 223
238 Lisp_Object 224 Lisp_Object
239 tty_canonicalize_device_connection (Lisp_Object connection, 225 tty_canonicalize_device_connection (Lisp_Object connection,
240 Error_behavior errb) 226 Error_behavior errb)
241 { 227 {
242 return tty_canonicalize_console_connection (connection, errb); 228 return stream_canonicalize_console_connection (connection, errb);
243 } 229 }
244 230
245 231
246 /************************************************************************/ 232 /************************************************************************/
247 /* initialization */ 233 /* initialization */
272 258
273 void 259 void
274 vars_of_console_tty (void) 260 vars_of_console_tty (void)
275 { 261 {
276 Fprovide (Qtty); 262 Fprovide (Qtty);
277 263 }
278 Vstdio_str = build_string ("stdio");
279 staticpro (&Vstdio_str);
280 }