Mercurial > hg > xemacs-beta
annotate src/console-tty.c @ 5008:cad59a0a3b19
Add license information from Marcus Thiessel.
See xemacs-beta message <20100208091453.25900@gmx.net>.
| author | Jerry James <james@xemacs.org> |
|---|---|
| date | Tue, 09 Feb 2010 09:50:49 -0700 |
| parents | 16112448d484 |
| children | b5df3737028a |
| 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 | |
| 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 | |
|
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4117
diff
changeset
|
117 terminal_type = build_istring (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 { | |
|
4976
16112448d484
Rename xfree(FOO, TYPE) -> xfree(FOO)
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
219 xfree (tty_con->term_entry_buffer); |
| 428 | 220 tty_con->term_entry_buffer = NULL; |
| 221 } | |
| 4117 | 222 #ifndef NEW_GC |
|
4976
16112448d484
Rename xfree(FOO, TYPE) -> xfree(FOO)
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
223 xfree (tty_con); |
| 3092 | 224 #endif /* not NEW_GC */ |
| 428 | 225 CONSOLE_TTY_DATA (con) = NULL; |
| 226 } | |
| 227 } | |
| 228 | |
| 229 static void | |
| 230 tty_delete_console (struct console *con) | |
| 231 { | |
| 232 Lstream_close (XLSTREAM (CONSOLE_TTY_DATA (con)->instream)); | |
| 233 Lstream_close (XLSTREAM (CONSOLE_TTY_DATA (con)->outstream)); | |
| 234 if (!CONSOLE_TTY_DATA (con)->is_stdio) | |
| 771 | 235 retry_close (CONSOLE_TTY_DATA (con)->infd); |
| 428 | 236 if (CONSOLE_TTY_DATA (con)->controlling_terminal) |
| 237 { | |
| 238 Vcontrolling_terminal = Qnil; | |
| 239 unmunge_tty_process_group (); | |
| 240 } | |
| 241 free_tty_console_struct (con); | |
| 242 } | |
| 243 | |
| 244 | |
| 245 static struct console * | |
| 246 decode_tty_console (Lisp_Object console) | |
| 247 { | |
| 793 | 248 console = wrap_console (decode_console (console)); |
| 428 | 249 CHECK_TTY_CONSOLE (console); |
| 250 return XCONSOLE (console); | |
| 251 } | |
| 252 | |
| 253 DEFUN ("console-tty-terminal-type", Fconsole_tty_terminal_type, | |
| 254 0, 1, 0, /* | |
| 255 Return the terminal type of TTY console CONSOLE. | |
| 256 */ | |
| 257 (console)) | |
| 258 { | |
| 259 return CONSOLE_TTY_DATA (decode_tty_console (console))->terminal_type; | |
| 260 } | |
| 261 | |
| 262 DEFUN ("console-tty-controlling-process", Fconsole_tty_controlling_process, | |
| 263 0, 1, 0, /* | |
| 264 Return the controlling process of tty console CONSOLE. | |
| 265 */ | |
| 266 (console)) | |
| 267 { | |
| 268 return CONSOLE_TTY_DATA (decode_tty_console (console))->controlling_process; | |
| 269 } | |
| 270 | |
| 271 | |
| 272 DEFUN ("console-tty-input-coding-system", Fconsole_tty_input_coding_system, | |
| 273 0, 1, 0, /* | |
| 274 Return the input coding system of tty console CONSOLE. | |
| 275 */ | |
| 276 (console)) | |
| 277 { | |
| 771 | 278 return coding_stream_detected_coding_system |
| 428 | 279 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream)); |
| 280 } | |
| 281 | |
| 282 DEFUN ("set-console-tty-input-coding-system", Fset_console_tty_input_coding_system, | |
| 283 0, 2, 0, /* | |
| 284 Set the input coding system of tty console CONSOLE to CODESYS. | |
| 285 CONSOLE defaults to the selected console. | |
| 286 CODESYS defaults to the value of `keyboard-coding-system'. | |
| 287 */ | |
| 288 (console, codesys)) | |
| 289 { | |
| 771 | 290 set_coding_stream_coding_system |
| 428 | 291 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream), |
| 771 | 292 get_coding_system_for_text_file (NILP (codesys) ? Qkeyboard : codesys, |
| 293 0)); | |
| 428 | 294 return Qnil; |
| 295 } | |
| 296 | |
| 297 DEFUN ("console-tty-output-coding-system", Fconsole_tty_output_coding_system, | |
| 298 0, 1, 0, /* | |
| 299 Return TTY CONSOLE's output coding system. | |
| 300 */ | |
| 301 (console)) | |
| 302 { | |
| 771 | 303 return coding_stream_coding_system |
| 428 | 304 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream)); |
| 305 } | |
| 306 | |
| 307 DEFUN ("set-console-tty-output-coding-system", Fset_console_tty_output_coding_system, | |
| 308 0, 2, 0, /* | |
| 309 Set the coding system of tty output of console CONSOLE to CODESYS. | |
| 310 CONSOLE defaults to the selected console. | |
| 311 CODESYS defaults to the value of `terminal-coding-system'. | |
| 312 */ | |
| 313 (console, codesys)) | |
| 314 { | |
| 771 | 315 set_coding_stream_coding_system |
| 428 | 316 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream), |
| 771 | 317 get_coding_system_for_text_file (NILP (codesys) ? Qterminal : codesys, |
| 318 0)); | |
| 438 | 319 /* Redraw tty */ |
| 320 face_property_was_changed (Vdefault_face, Qfont, Qtty); | |
| 428 | 321 return Qnil; |
| 322 } | |
| 323 | |
| 3571 | 324 DEFUN ("console-tty-multiple-width", Fconsole_tty_multiple_width, |
| 325 0, 1, 0, /* | |
| 326 Return whether CONSOLE treats East Asian double-width chars as such. | |
| 327 | |
| 328 CONSOLE defaults to the selected console. Without XEmacs support for | |
| 329 double-width characters, this always gives nil. | |
| 330 */ | |
| 331 (console)) | |
| 332 { | |
| 333 return CONSOLE_TTY_MULTIPLE_WIDTH (decode_tty_console(console)) | |
| 334 ? Qt : Qnil; | |
| 335 } | |
| 336 | |
| 337 DEFUN ("set-console-tty-multiple-width", Fset_console_tty_multiple_width, | |
| 338 0, 2, 0, /* | |
| 339 Set whether CONSOLE treats East Asian double-width characters as such. | |
| 340 | |
| 341 CONSOLE defaults to the selected console, and VALUE defaults to nil. | |
| 342 Without XEmacs support for double-width characters, this throws an error if | |
| 343 VALUE is non-nil. | |
| 344 */ | |
| 345 (console, value)) | |
| 346 { | |
| 347 struct console *c = decode_tty_console (console); | |
| 348 | |
| 349 /* So people outside of East Asia can put (set-console-tty-multiple-width | |
| 350 (selected-console) nil) in their init files, independent of whether | |
| 351 Mule is enabled. */ | |
| 352 if (!CONSOLE_TTY_MULTIPLE_WIDTH (c) && NILP(value)) | |
| 353 { | |
| 354 return Qnil; | |
| 355 } | |
| 356 | |
| 357 if (!CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH (c)) | |
| 358 { | |
| 359 invalid_change | |
| 360 ("No console support for double-width chars", | |
| 361 Fmake_symbol(CONSOLE_NAME(c))); | |
| 362 } | |
| 363 | |
| 364 CONSOLE_TTY_DATA(c)->multiple_width = NILP(value) ? 0 : 1; | |
| 365 | |
| 366 return Qnil; | |
| 367 } | |
| 368 | |
| 440 | 369 /* #### Move this function to lisp */ |
| 428 | 370 DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system, |
| 371 0, 2, 0, /* | |
| 372 Set the input and output coding systems of tty console CONSOLE to CODESYS. | |
| 373 CONSOLE defaults to the selected console. | |
| 374 If CODESYS is nil, the values of `keyboard-coding-system' and | |
| 375 `terminal-coding-system' will be used for the input and | |
| 376 output coding systems of CONSOLE. | |
| 377 */ | |
| 378 (console, codesys)) | |
| 379 { | |
| 380 Fset_console_tty_input_coding_system (console, codesys); | |
| 381 Fset_console_tty_output_coding_system (console, codesys); | |
| 382 return Qnil; | |
| 383 } | |
| 384 | |
| 385 | |
| 386 Lisp_Object | |
| 387 tty_semi_canonicalize_console_connection (Lisp_Object connection, | |
| 578 | 388 Error_Behavior errb) |
| 428 | 389 { |
| 390 return stream_semi_canonicalize_console_connection (connection, errb); | |
| 391 } | |
| 392 | |
| 393 Lisp_Object | |
| 394 tty_canonicalize_console_connection (Lisp_Object connection, | |
| 578 | 395 Error_Behavior errb) |
| 428 | 396 { |
| 397 return stream_canonicalize_console_connection (connection, errb); | |
| 398 } | |
| 399 | |
| 400 Lisp_Object | |
| 401 tty_semi_canonicalize_device_connection (Lisp_Object connection, | |
| 578 | 402 Error_Behavior errb) |
| 428 | 403 { |
| 404 return stream_semi_canonicalize_console_connection (connection, errb); | |
| 405 } | |
| 406 | |
| 407 Lisp_Object | |
| 408 tty_canonicalize_device_connection (Lisp_Object connection, | |
| 578 | 409 Error_Behavior errb) |
| 428 | 410 { |
| 411 return stream_canonicalize_console_connection (connection, errb); | |
| 412 } | |
| 413 | |
| 2828 | 414 static Lisp_Object |
| 415 tty_perhaps_init_unseen_key_defaults (struct console *UNUSED(con), | |
| 416 Lisp_Object key) | |
| 417 { | |
| 418 Ichar val; | |
| 419 extern Lisp_Object Vcurrent_global_map; | |
| 420 | |
| 421 if (SYMBOLP(key)) | |
| 422 { | |
| 423 /* We've no idea what to default an unknown symbol to on the TTY. */ | |
| 424 return Qnil; | |
| 425 } | |
| 426 | |
| 427 CHECK_CHAR(key); | |
| 428 | |
| 2850 | 429 if (!(HASH_TABLEP(Vtty_seen_characters))) |
| 2828 | 430 { |
| 431 /* All the keysyms we deal with are character objects; therefore, we | |
| 432 can use eq as the test without worrying. */ | |
| 2850 | 433 Vtty_seen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, |
| 2828 | 434 HASH_TABLE_EQ); |
| 435 } | |
| 436 | |
| 437 /* Might give the user an opaque error if make_lisp_hash_table fails, | |
| 438 but it won't crash. */ | |
| 2850 | 439 CHECK_HASH_TABLE(Vtty_seen_characters); |
| 2828 | 440 |
| 441 val = XCHAR(key); | |
| 442 | |
| 443 /* Same logic as in x_has_keysym; I'm not convinced it's always sane. */ | |
| 444 if (val < 0x80) | |
| 445 { | |
| 446 return Qnil; | |
| 447 } | |
| 448 | |
| 2850 | 449 if (!NILP(Fgethash(key, Vtty_seen_characters, Qnil))) |
| 2828 | 450 { |
| 451 return Qnil; | |
| 452 } | |
| 453 | |
| 454 if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil))) | |
| 455 { | |
| 2850 | 456 Fputhash(key, Qt, Vtty_seen_characters); |
| 2828 | 457 Fdefine_key (Vcurrent_global_map, key, Qself_insert_command); |
| 458 return Qt; | |
| 459 } | |
| 460 | |
| 461 return Qnil; | |
| 462 } | |
| 463 | |
| 428 | 464 |
| 465 /************************************************************************/ | |
| 466 /* initialization */ | |
| 467 /************************************************************************/ | |
| 468 | |
| 469 void | |
| 470 syms_of_console_tty (void) | |
| 471 { | |
| 472 DEFSUBR (Fconsole_tty_terminal_type); | |
| 473 DEFSUBR (Fconsole_tty_controlling_process); | |
| 563 | 474 DEFSYMBOL (Qterminal_type); |
| 475 DEFSYMBOL (Qcontrolling_process); | |
| 428 | 476 DEFSUBR (Fconsole_tty_output_coding_system); |
| 477 DEFSUBR (Fset_console_tty_output_coding_system); | |
| 478 DEFSUBR (Fconsole_tty_input_coding_system); | |
| 479 DEFSUBR (Fset_console_tty_input_coding_system); | |
| 480 DEFSUBR (Fset_console_tty_coding_system); | |
| 3571 | 481 DEFSUBR (Fconsole_tty_multiple_width); |
| 482 DEFSUBR (Fset_console_tty_multiple_width); | |
| 428 | 483 } |
| 484 | |
| 485 void | |
| 486 console_type_create_tty (void) | |
| 487 { | |
| 488 INITIALIZE_CONSOLE_TYPE (tty, "tty", "console-tty-p"); | |
| 489 | |
| 490 /* console methods */ | |
| 491 CONSOLE_HAS_METHOD (tty, init_console); | |
| 492 CONSOLE_HAS_METHOD (tty, mark_console); | |
| 493 CONSOLE_HAS_METHOD (tty, initially_selected_for_input); | |
| 494 CONSOLE_HAS_METHOD (tty, delete_console); | |
| 495 CONSOLE_HAS_METHOD (tty, canonicalize_console_connection); | |
| 496 CONSOLE_HAS_METHOD (tty, canonicalize_device_connection); | |
| 497 CONSOLE_HAS_METHOD (tty, semi_canonicalize_console_connection); | |
| 498 CONSOLE_HAS_METHOD (tty, semi_canonicalize_device_connection); | |
| 2828 | 499 CONSOLE_HAS_METHOD (tty, perhaps_init_unseen_key_defaults); |
| 428 | 500 } |
| 501 | |
| 502 void | |
| 503 reinit_console_type_create_tty (void) | |
| 504 { | |
| 505 REINITIALIZE_CONSOLE_TYPE (tty); | |
| 506 } | |
| 507 | |
| 508 void | |
| 509 image_instantiator_format_create_glyphs_tty (void) | |
| 510 { | |
| 511 IIFORMAT_VALID_CONSOLE (tty, nothing); | |
| 512 IIFORMAT_VALID_CONSOLE (tty, string); | |
| 513 IIFORMAT_VALID_CONSOLE (tty, formatted_string); | |
| 514 IIFORMAT_VALID_CONSOLE (tty, inherit); | |
| 515 } | |
| 516 | |
| 517 void | |
| 518 vars_of_console_tty (void) | |
| 519 { | |
| 2850 | 520 DEFVAR_LISP ("tty-seen-characters", &Vtty_seen_characters /* |
| 521 Hash table of non-ASCII characters the TTY subsystem has seen. | |
| 522 */ ); | |
| 523 Vtty_seen_characters = Qnil; | |
| 428 | 524 Fprovide (Qtty); |
| 525 } |
