Mercurial > hg > xemacs-beta
annotate src/console-tty.c @ 5673:900a0a8796c3 r21-5-32
XEmacs 21.5.32 "habanero" is released.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Fri, 03 Aug 2012 02:43:45 +0900 |
parents | 56144c8593a8 |
children | a216b3c2b09e |
rev | line source |
---|---|
428 | 1 /* TTY console functions. |
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. | |
3 Copyright (C) 1994, 1995 Free Software Foundation, Inc. | |
800 | 4 Copyright (C) 1996, 2001, 2002 Ben Wing. |
428 | 5 |
6 This file is part of XEmacs. | |
7 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5191
diff
changeset
|
8 XEmacs is free software: you can redistribute it and/or modify it |
428 | 9 under the terms of the GNU General Public License as published by the |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5191
diff
changeset
|
10 Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5191
diff
changeset
|
11 option) any later version. |
428 | 12 |
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5191
diff
changeset
|
19 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
428 | 20 |
21 /* Synched up with: Not in FSF. */ | |
22 | |
23 /* Authors: Ben Wing and Chuck Thompson. */ | |
24 | |
25 #include <config.h> | |
26 #include "lisp.h" | |
27 | |
872 | 28 #include "console-tty-impl.h" |
428 | 29 #include "console-stream.h" |
872 | 30 |
2828 | 31 #include "elhash.h" |
428 | 32 #include "faces.h" |
872 | 33 #include "file-coding.h" |
428 | 34 #include "frame.h" |
872 | 35 #include "glyphs.h" |
428 | 36 #include "lstream.h" |
872 | 37 #include "process.h" |
38 | |
428 | 39 #include "sysdep.h" |
40 #include "sysfile.h" | |
41 | |
42 DEFINE_CONSOLE_TYPE (tty); | |
43 DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); | |
44 DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); | |
45 DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); | |
46 DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); | |
47 | |
48 Lisp_Object Qterminal_type; | |
49 Lisp_Object Qcontrolling_process; | |
50 | |
2850 | 51 Lisp_Object Vtty_seen_characters; |
2828 | 52 |
1204 | 53 static const struct memory_description tty_console_data_description_1 [] = { |
54 { XD_LISP_OBJECT, offsetof (struct tty_console, terminal_type) }, | |
55 { XD_LISP_OBJECT, offsetof (struct tty_console, instream) }, | |
56 { XD_LISP_OBJECT, offsetof (struct tty_console, outstream) }, | |
57 { XD_END } | |
58 }; | |
59 | |
3092 | 60 #ifdef NEW_GC |
5118
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4117
diff
changeset
|
61 DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("tty-console", tty_console, |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4117
diff
changeset
|
62 0, tty_console_data_description_1, |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4117
diff
changeset
|
63 Lisp_Tty_Console); |
3092 | 64 #else /* not NEW_GC */ |
1204 | 65 const struct sized_memory_description tty_console_data_description = { |
66 sizeof (struct tty_console), tty_console_data_description_1 | |
67 }; | |
3092 | 68 #endif /* not NEW_GC */ |
1204 | 69 |
428 | 70 |
71 static void | |
72 allocate_tty_console_struct (struct console *con) | |
73 { | |
74 /* zero out all slots except the lisp ones ... */ | |
3092 | 75 #ifdef NEW_GC |
5127
a9c41067dd88
more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents:
5125
diff
changeset
|
76 CONSOLE_TTY_DATA (con) = XTTY_CONSOLE (ALLOC_NORMAL_LISP_OBJECT (tty_console)); |
3092 | 77 #else /* not NEW_GC */ |
428 | 78 CONSOLE_TTY_DATA (con) = xnew_and_zero (struct tty_console); |
3092 | 79 #endif /* not NEW_GC */ |
428 | 80 CONSOLE_TTY_DATA (con)->terminal_type = Qnil; |
81 CONSOLE_TTY_DATA (con)->instream = Qnil; | |
82 CONSOLE_TTY_DATA (con)->outstream = Qnil; | |
83 } | |
84 | |
85 static void | |
86 tty_init_console (struct console *con, Lisp_Object props) | |
87 { | |
88 Lisp_Object tty = CONSOLE_CONNECTION (con); | |
89 Lisp_Object terminal_type = Qnil; | |
90 Lisp_Object controlling_process = Qnil; | |
91 struct tty_console *tty_con; | |
92 struct gcpro gcpro1, gcpro2; | |
93 | |
94 GCPRO2 (terminal_type, controlling_process); | |
95 | |
96 terminal_type = Fplist_get (props, Qterminal_type, Qnil); | |
97 controlling_process = Fplist_get (props, Qcontrolling_process, Qnil); | |
98 | |
99 /* Determine the terminal type */ | |
100 | |
101 if (!NILP (terminal_type)) | |
102 CHECK_STRING (terminal_type); | |
103 else | |
104 { | |
867 | 105 Ibyte *temp_type = egetenv ("TERM"); |
428 | 106 |
107 if (!temp_type) | |
108 { | |
563 | 109 invalid_state ("Cannot determine terminal type", Qunbound); |
428 | 110 } |
111 else | |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4117
diff
changeset
|
112 terminal_type = build_istring (temp_type); |
428 | 113 } |
114 | |
115 /* Determine the controlling process */ | |
116 if (!NILP (controlling_process)) | |
5581
56144c8593a8
Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
117 CHECK_FIXNUM (controlling_process); |
428 | 118 |
119 /* Open the specified console */ | |
120 | |
121 allocate_tty_console_struct (con); | |
122 tty_con = CONSOLE_TTY_DATA (con); | |
123 | |
124 if (internal_equal (tty, Vstdio_str, 0)) | |
125 { | |
126 tty_con->infd = fileno (stdin); | |
127 tty_con->outfd = fileno (stdout); | |
128 tty_con->is_stdio = 1; | |
129 } | |
130 else | |
131 { | |
132 tty_con->infd = tty_con->outfd = | |
771 | 133 qxe_open (XSTRING_DATA (tty), O_RDWR); |
428 | 134 if (tty_con->infd < 0) |
563 | 135 signal_error (Qio_error, "Unable to open tty", tty); |
428 | 136 tty_con->is_stdio = 0; |
137 } | |
138 | |
802 | 139 /* set_descriptor_non_blocking (tty_con->infd); */ |
428 | 140 tty_con->instream = make_filedesc_input_stream (tty_con->infd, 0, -1, 0); |
771 | 141 Lstream_set_buffering (XLSTREAM (tty_con->instream), LSTREAM_UNBUFFERED, 0); |
428 | 142 tty_con->instream = |
771 | 143 make_coding_input_stream (XLSTREAM (tty_con->instream), |
144 get_coding_system_for_text_file (Qkeyboard, 0), | |
814 | 145 CODING_DECODE, |
146 LSTREAM_FL_READ_ONE_BYTE_AT_A_TIME); | |
771 | 147 Lstream_set_buffering (XLSTREAM (tty_con->instream), LSTREAM_UNBUFFERED, 0); |
148 tty_con->outstream = make_filedesc_output_stream (tty_con->outfd, 0, -1, 0); | |
428 | 149 tty_con->outstream = |
771 | 150 make_coding_output_stream (XLSTREAM (tty_con->outstream), |
151 get_coding_system_for_text_file (Qterminal, 0), | |
800 | 152 CODING_ENCODE, 0); |
428 | 153 tty_con->terminal_type = terminal_type; |
154 tty_con->controlling_process = controlling_process; | |
155 | |
3571 | 156 /* Defaults to 1 with Mule, 0 without. In the latter case the attribute is |
157 read-only from Lisp. */ | |
158 tty_con->multiple_width = CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH(c); | |
159 | |
428 | 160 if (NILP (CONSOLE_NAME (con))) |
161 CONSOLE_NAME (con) = Ffile_name_nondirectory (tty); | |
162 { | |
442 | 163 pid_t tty_pg; |
164 pid_t controlling_tty_pg; | |
428 | 165 int cfd; |
166 | |
167 /* OK, the only sure-fire way I can think of to determine | |
168 whether a particular TTY is our controlling TTY is to check | |
169 if it has the same foreground process group as our controlling | |
170 TTY. This is OK because a process group can never simultaneously | |
171 be the foreground process group of two TTY's (in that case it | |
172 would have two controlling TTY's, which is not allowed). */ | |
173 | |
174 EMACS_GET_TTY_PROCESS_GROUP (tty_con->infd, &tty_pg); | |
867 | 175 cfd = qxe_open ((Ibyte *) "/dev/tty", O_RDWR, 0); |
428 | 176 EMACS_GET_TTY_PROCESS_GROUP (cfd, &controlling_tty_pg); |
771 | 177 retry_close (cfd); |
428 | 178 if (tty_pg == controlling_tty_pg) |
179 { | |
180 tty_con->controlling_terminal = 1; | |
793 | 181 Vcontrolling_terminal = wrap_console (con); |
428 | 182 munge_tty_process_group (); |
183 } | |
184 else | |
185 tty_con->controlling_terminal = 0; | |
186 } | |
187 | |
188 UNGCPRO; | |
189 } | |
190 | |
191 static void | |
192 tty_mark_console (struct console *con) | |
193 { | |
194 struct tty_console *tty_con = CONSOLE_TTY_DATA (con); | |
195 mark_object (tty_con->terminal_type); | |
196 mark_object (tty_con->instream); | |
197 mark_object (tty_con->outstream); | |
198 } | |
199 | |
200 static int | |
2286 | 201 tty_initially_selected_for_input (struct console *UNUSED (con)) |
428 | 202 { |
203 return 1; | |
204 } | |
205 | |
206 static void | |
207 free_tty_console_struct (struct console *con) | |
208 { | |
209 struct tty_console *tty_con = CONSOLE_TTY_DATA (con); | |
210 if (tty_con) | |
211 { | |
212 if (tty_con->term_entry_buffer) /* allocated in term_init () */ | |
213 { | |
4976
16112448d484
Rename xfree(FOO, TYPE) -> xfree(FOO)
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
214 xfree (tty_con->term_entry_buffer); |
428 | 215 tty_con->term_entry_buffer = NULL; |
216 } | |
4117 | 217 #ifndef NEW_GC |
4976
16112448d484
Rename xfree(FOO, TYPE) -> xfree(FOO)
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
218 xfree (tty_con); |
3092 | 219 #endif /* not NEW_GC */ |
428 | 220 CONSOLE_TTY_DATA (con) = NULL; |
221 } | |
222 } | |
223 | |
224 static void | |
225 tty_delete_console (struct console *con) | |
226 { | |
227 Lstream_close (XLSTREAM (CONSOLE_TTY_DATA (con)->instream)); | |
228 Lstream_close (XLSTREAM (CONSOLE_TTY_DATA (con)->outstream)); | |
229 if (!CONSOLE_TTY_DATA (con)->is_stdio) | |
771 | 230 retry_close (CONSOLE_TTY_DATA (con)->infd); |
428 | 231 if (CONSOLE_TTY_DATA (con)->controlling_terminal) |
232 { | |
233 Vcontrolling_terminal = Qnil; | |
234 unmunge_tty_process_group (); | |
235 } | |
236 free_tty_console_struct (con); | |
237 } | |
238 | |
239 | |
240 static struct console * | |
241 decode_tty_console (Lisp_Object console) | |
242 { | |
793 | 243 console = wrap_console (decode_console (console)); |
428 | 244 CHECK_TTY_CONSOLE (console); |
245 return XCONSOLE (console); | |
246 } | |
247 | |
248 DEFUN ("console-tty-terminal-type", Fconsole_tty_terminal_type, | |
249 0, 1, 0, /* | |
250 Return the terminal type of TTY console CONSOLE. | |
251 */ | |
252 (console)) | |
253 { | |
254 return CONSOLE_TTY_DATA (decode_tty_console (console))->terminal_type; | |
255 } | |
256 | |
257 DEFUN ("console-tty-controlling-process", Fconsole_tty_controlling_process, | |
258 0, 1, 0, /* | |
259 Return the controlling process of tty console CONSOLE. | |
260 */ | |
261 (console)) | |
262 { | |
263 return CONSOLE_TTY_DATA (decode_tty_console (console))->controlling_process; | |
264 } | |
265 | |
266 | |
267 DEFUN ("console-tty-input-coding-system", Fconsole_tty_input_coding_system, | |
268 0, 1, 0, /* | |
269 Return the input coding system of tty console CONSOLE. | |
270 */ | |
271 (console)) | |
272 { | |
771 | 273 return coding_stream_detected_coding_system |
428 | 274 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream)); |
275 } | |
276 | |
277 DEFUN ("set-console-tty-input-coding-system", Fset_console_tty_input_coding_system, | |
278 0, 2, 0, /* | |
279 Set the input coding system of tty console CONSOLE to CODESYS. | |
280 CONSOLE defaults to the selected console. | |
281 CODESYS defaults to the value of `keyboard-coding-system'. | |
282 */ | |
283 (console, codesys)) | |
284 { | |
771 | 285 set_coding_stream_coding_system |
428 | 286 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream), |
771 | 287 get_coding_system_for_text_file (NILP (codesys) ? Qkeyboard : codesys, |
288 0)); | |
428 | 289 return Qnil; |
290 } | |
291 | |
292 DEFUN ("console-tty-output-coding-system", Fconsole_tty_output_coding_system, | |
293 0, 1, 0, /* | |
294 Return TTY CONSOLE's output coding system. | |
295 */ | |
296 (console)) | |
297 { | |
771 | 298 return coding_stream_coding_system |
428 | 299 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream)); |
300 } | |
301 | |
302 DEFUN ("set-console-tty-output-coding-system", Fset_console_tty_output_coding_system, | |
303 0, 2, 0, /* | |
304 Set the coding system of tty output of console CONSOLE to CODESYS. | |
305 CONSOLE defaults to the selected console. | |
306 CODESYS defaults to the value of `terminal-coding-system'. | |
307 */ | |
308 (console, codesys)) | |
309 { | |
771 | 310 set_coding_stream_coding_system |
428 | 311 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream), |
771 | 312 get_coding_system_for_text_file (NILP (codesys) ? Qterminal : codesys, |
313 0)); | |
438 | 314 /* Redraw tty */ |
315 face_property_was_changed (Vdefault_face, Qfont, Qtty); | |
428 | 316 return Qnil; |
317 } | |
318 | |
3571 | 319 DEFUN ("console-tty-multiple-width", Fconsole_tty_multiple_width, |
320 0, 1, 0, /* | |
321 Return whether CONSOLE treats East Asian double-width chars as such. | |
322 | |
323 CONSOLE defaults to the selected console. Without XEmacs support for | |
324 double-width characters, this always gives nil. | |
325 */ | |
326 (console)) | |
327 { | |
328 return CONSOLE_TTY_MULTIPLE_WIDTH (decode_tty_console(console)) | |
329 ? Qt : Qnil; | |
330 } | |
331 | |
332 DEFUN ("set-console-tty-multiple-width", Fset_console_tty_multiple_width, | |
333 0, 2, 0, /* | |
334 Set whether CONSOLE treats East Asian double-width characters as such. | |
335 | |
336 CONSOLE defaults to the selected console, and VALUE defaults to nil. | |
337 Without XEmacs support for double-width characters, this throws an error if | |
338 VALUE is non-nil. | |
339 */ | |
340 (console, value)) | |
341 { | |
342 struct console *c = decode_tty_console (console); | |
343 | |
344 /* So people outside of East Asia can put (set-console-tty-multiple-width | |
345 (selected-console) nil) in their init files, independent of whether | |
346 Mule is enabled. */ | |
347 if (!CONSOLE_TTY_MULTIPLE_WIDTH (c) && NILP(value)) | |
348 { | |
349 return Qnil; | |
350 } | |
351 | |
352 if (!CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH (c)) | |
353 { | |
354 invalid_change | |
355 ("No console support for double-width chars", | |
356 Fmake_symbol(CONSOLE_NAME(c))); | |
357 } | |
358 | |
359 CONSOLE_TTY_DATA(c)->multiple_width = NILP(value) ? 0 : 1; | |
360 | |
361 return Qnil; | |
362 } | |
363 | |
440 | 364 /* #### Move this function to lisp */ |
428 | 365 DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system, |
366 0, 2, 0, /* | |
367 Set the input and output coding systems of tty console CONSOLE to CODESYS. | |
368 CONSOLE defaults to the selected console. | |
369 If CODESYS is nil, the values of `keyboard-coding-system' and | |
370 `terminal-coding-system' will be used for the input and | |
371 output coding systems of CONSOLE. | |
372 */ | |
373 (console, codesys)) | |
374 { | |
375 Fset_console_tty_input_coding_system (console, codesys); | |
376 Fset_console_tty_output_coding_system (console, codesys); | |
377 return Qnil; | |
378 } | |
379 | |
380 | |
381 Lisp_Object | |
382 tty_semi_canonicalize_console_connection (Lisp_Object connection, | |
578 | 383 Error_Behavior errb) |
428 | 384 { |
385 return stream_semi_canonicalize_console_connection (connection, errb); | |
386 } | |
387 | |
388 Lisp_Object | |
389 tty_canonicalize_console_connection (Lisp_Object connection, | |
578 | 390 Error_Behavior errb) |
428 | 391 { |
392 return stream_canonicalize_console_connection (connection, errb); | |
393 } | |
394 | |
395 Lisp_Object | |
396 tty_semi_canonicalize_device_connection (Lisp_Object connection, | |
578 | 397 Error_Behavior errb) |
428 | 398 { |
399 return stream_semi_canonicalize_console_connection (connection, errb); | |
400 } | |
401 | |
402 Lisp_Object | |
403 tty_canonicalize_device_connection (Lisp_Object connection, | |
578 | 404 Error_Behavior errb) |
428 | 405 { |
406 return stream_canonicalize_console_connection (connection, errb); | |
407 } | |
408 | |
2828 | 409 static Lisp_Object |
410 tty_perhaps_init_unseen_key_defaults (struct console *UNUSED(con), | |
411 Lisp_Object key) | |
412 { | |
413 Ichar val; | |
414 extern Lisp_Object Vcurrent_global_map; | |
415 | |
416 if (SYMBOLP(key)) | |
417 { | |
418 /* We've no idea what to default an unknown symbol to on the TTY. */ | |
419 return Qnil; | |
420 } | |
421 | |
422 CHECK_CHAR(key); | |
423 | |
2850 | 424 if (!(HASH_TABLEP(Vtty_seen_characters))) |
2828 | 425 { |
426 /* All the keysyms we deal with are character objects; therefore, we | |
427 can use eq as the test without worrying. */ | |
2850 | 428 Vtty_seen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, |
5191
71ee43b8a74d
Add #'equalp as a hash test by default; add #'define-hash-table-test, GNU API
Aidan Kehoe <kehoea@parhasard.net>
parents:
5127
diff
changeset
|
429 Qeq); |
2828 | 430 } |
431 | |
432 /* Might give the user an opaque error if make_lisp_hash_table fails, | |
433 but it won't crash. */ | |
2850 | 434 CHECK_HASH_TABLE(Vtty_seen_characters); |
2828 | 435 |
436 val = XCHAR(key); | |
437 | |
438 /* Same logic as in x_has_keysym; I'm not convinced it's always sane. */ | |
439 if (val < 0x80) | |
440 { | |
441 return Qnil; | |
442 } | |
443 | |
2850 | 444 if (!NILP(Fgethash(key, Vtty_seen_characters, Qnil))) |
2828 | 445 { |
446 return Qnil; | |
447 } | |
448 | |
449 if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil))) | |
450 { | |
2850 | 451 Fputhash(key, Qt, Vtty_seen_characters); |
2828 | 452 Fdefine_key (Vcurrent_global_map, key, Qself_insert_command); |
453 return Qt; | |
454 } | |
455 | |
456 return Qnil; | |
457 } | |
458 | |
428 | 459 |
460 /************************************************************************/ | |
461 /* initialization */ | |
462 /************************************************************************/ | |
463 | |
464 void | |
465 syms_of_console_tty (void) | |
466 { | |
467 DEFSUBR (Fconsole_tty_terminal_type); | |
468 DEFSUBR (Fconsole_tty_controlling_process); | |
563 | 469 DEFSYMBOL (Qterminal_type); |
470 DEFSYMBOL (Qcontrolling_process); | |
428 | 471 DEFSUBR (Fconsole_tty_output_coding_system); |
472 DEFSUBR (Fset_console_tty_output_coding_system); | |
473 DEFSUBR (Fconsole_tty_input_coding_system); | |
474 DEFSUBR (Fset_console_tty_input_coding_system); | |
475 DEFSUBR (Fset_console_tty_coding_system); | |
3571 | 476 DEFSUBR (Fconsole_tty_multiple_width); |
477 DEFSUBR (Fset_console_tty_multiple_width); | |
428 | 478 } |
479 | |
480 void | |
481 console_type_create_tty (void) | |
482 { | |
483 INITIALIZE_CONSOLE_TYPE (tty, "tty", "console-tty-p"); | |
484 | |
485 /* console methods */ | |
486 CONSOLE_HAS_METHOD (tty, init_console); | |
487 CONSOLE_HAS_METHOD (tty, mark_console); | |
488 CONSOLE_HAS_METHOD (tty, initially_selected_for_input); | |
489 CONSOLE_HAS_METHOD (tty, delete_console); | |
490 CONSOLE_HAS_METHOD (tty, canonicalize_console_connection); | |
491 CONSOLE_HAS_METHOD (tty, canonicalize_device_connection); | |
492 CONSOLE_HAS_METHOD (tty, semi_canonicalize_console_connection); | |
493 CONSOLE_HAS_METHOD (tty, semi_canonicalize_device_connection); | |
2828 | 494 CONSOLE_HAS_METHOD (tty, perhaps_init_unseen_key_defaults); |
428 | 495 } |
496 | |
497 void | |
498 reinit_console_type_create_tty (void) | |
499 { | |
500 REINITIALIZE_CONSOLE_TYPE (tty); | |
501 } | |
502 | |
503 void | |
504 image_instantiator_format_create_glyphs_tty (void) | |
505 { | |
506 IIFORMAT_VALID_CONSOLE (tty, nothing); | |
507 IIFORMAT_VALID_CONSOLE (tty, string); | |
508 IIFORMAT_VALID_CONSOLE (tty, formatted_string); | |
509 IIFORMAT_VALID_CONSOLE (tty, inherit); | |
510 } | |
511 | |
512 void | |
513 vars_of_console_tty (void) | |
514 { | |
2850 | 515 DEFVAR_LISP ("tty-seen-characters", &Vtty_seen_characters /* |
516 Hash table of non-ASCII characters the TTY subsystem has seen. | |
517 */ ); | |
518 Vtty_seen_characters = Qnil; | |
428 | 519 Fprovide (Qtty); |
520 } |