Mercurial > hg > xemacs-beta
comparison src/console-tty.c @ 78:c7528f8e288d r20-0b34
Import from CVS: tag r20-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:05:42 +0200 |
parents | 131b0175ea99 |
children | 1ce6082ce73f |
comparison
equal
deleted
inserted
replaced
77:6cb4f478e7bc | 78:c7528f8e288d |
---|---|
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 | |
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 = |
209 | 208 |
210 Lisp_Object | 209 Lisp_Object |
211 tty_semi_canonicalize_console_connection (Lisp_Object connection, | 210 tty_semi_canonicalize_console_connection (Lisp_Object connection, |
212 Error_behavior errb) | 211 Error_behavior errb) |
213 { | 212 { |
214 if (NILP (connection)) | 213 return stream_semi_canonicalize_console_connection (connection, errb); |
215 return Vstdio_str; | |
216 | |
217 return connection; | |
218 } | 214 } |
219 | 215 |
220 Lisp_Object | 216 Lisp_Object |
221 tty_canonicalize_console_connection (Lisp_Object connection, | 217 tty_canonicalize_console_connection (Lisp_Object connection, |
222 Error_behavior errb) | 218 Error_behavior errb) |
223 { | 219 { |
224 if (NILP (connection) || !NILP (Fequal (connection, Vstdio_str))) | 220 return stream_canonicalize_console_connection (connection, errb); |
225 return Vstdio_str; | |
226 | |
227 if (!ERRB_EQ (errb, ERROR_ME)) | |
228 { | |
229 if (!STRINGP (connection)) | |
230 return Qunbound; | |
231 } | |
232 else | |
233 CHECK_STRING (connection); | |
234 | |
235 return Ffile_truename (connection, Qnil); | |
236 } | 221 } |
237 | 222 |
238 Lisp_Object | 223 Lisp_Object |
239 tty_semi_canonicalize_device_connection (Lisp_Object connection, | 224 tty_semi_canonicalize_device_connection (Lisp_Object connection, |
240 Error_behavior errb) | 225 Error_behavior errb) |
241 { | 226 { |
242 return tty_semi_canonicalize_console_connection (connection, errb); | 227 return stream_semi_canonicalize_console_connection (connection, errb); |
243 } | 228 } |
244 | 229 |
245 Lisp_Object | 230 Lisp_Object |
246 tty_canonicalize_device_connection (Lisp_Object connection, | 231 tty_canonicalize_device_connection (Lisp_Object connection, |
247 Error_behavior errb) | 232 Error_behavior errb) |
248 { | 233 { |
249 return tty_canonicalize_console_connection (connection, errb); | 234 return stream_canonicalize_console_connection (connection, errb); |
250 } | 235 } |
251 | 236 |
252 | 237 |
253 /************************************************************************/ | 238 /************************************************************************/ |
254 /* initialization */ | 239 /* initialization */ |
279 | 264 |
280 void | 265 void |
281 vars_of_console_tty (void) | 266 vars_of_console_tty (void) |
282 { | 267 { |
283 Fprovide (Qtty); | 268 Fprovide (Qtty); |
284 | 269 } |
285 Vstdio_str = build_string ("stdio"); | |
286 staticpro (&Vstdio_str); | |
287 } |