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