annotate src/console-tty.c @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children 183866b06e0b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* TTY console functions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 Copyright (C) 1994, 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 Copyright (C) 1996 Ben Wing.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 /* Authors: Ben Wing and Chuck Thompson. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 #include <config.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #include "lisp.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #include "console-tty.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 #include "console-stream.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 #include "faces.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 #include "frame.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 #include "lstream.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 #include "glyphs.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 #include "sysdep.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 #include "sysfile.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 #ifdef FILE_CODING
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 #include "file-coding.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 DEFINE_CONSOLE_TYPE (tty);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 DECLARE_IMAGE_INSTANTIATOR_FORMAT (string);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 Lisp_Object Qterminal_type;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 Lisp_Object Qcontrolling_process;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 allocate_tty_console_struct (struct console *con)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 /* zero out all slots except the lisp ones ... */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 CONSOLE_TTY_DATA (con) = xnew_and_zero (struct tty_console);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 CONSOLE_TTY_DATA (con)->terminal_type = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 CONSOLE_TTY_DATA (con)->instream = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 CONSOLE_TTY_DATA (con)->outstream = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 tty_init_console (struct console *con, Lisp_Object props)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 Lisp_Object tty = CONSOLE_CONNECTION (con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 Lisp_Object terminal_type = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 Lisp_Object controlling_process = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 struct tty_console *tty_con;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 struct gcpro gcpro1, gcpro2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 GCPRO2 (terminal_type, controlling_process);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 terminal_type = Fplist_get (props, Qterminal_type, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 controlling_process = Fplist_get (props, Qcontrolling_process, Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 /* Determine the terminal type */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 if (!NILP (terminal_type))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 CHECK_STRING (terminal_type);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 char *temp_type = getenv ("TERM");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 if (!temp_type)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 error ("Cannot determine terminal type");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 terminal_type = build_string (temp_type);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 /* Determine the controlling process */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 if (!NILP (controlling_process))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 CHECK_INT (controlling_process);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 /* Open the specified console */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 allocate_tty_console_struct (con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 tty_con = CONSOLE_TTY_DATA (con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 if (internal_equal (tty, Vstdio_str, 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 tty_con->infd = fileno (stdin);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 tty_con->outfd = fileno (stdout);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 tty_con->is_stdio = 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 tty_con->infd = tty_con->outfd =
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 open ((char *) XSTRING_DATA (tty), O_RDWR);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 if (tty_con->infd < 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 error ("Unable to open tty %s", XSTRING_DATA (tty));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 tty_con->is_stdio = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 tty_con->instream = make_filedesc_input_stream (tty_con->infd, 0, -1, 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 tty_con->outstream = make_filedesc_output_stream (tty_con->outfd, 0, -1, 0);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
118 #ifdef FILE_CODING
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 tty_con->instream =
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 make_decoding_input_stream (XLSTREAM (tty_con->instream),
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
121 Fget_coding_system (Qkeyboard));
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 Lstream_set_character_mode (XLSTREAM (tty_con->instream));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 tty_con->outstream =
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 make_encoding_output_stream (XLSTREAM (tty_con->outstream),
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
125 Fget_coding_system (Qterminal));
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
126 #endif /* FILE_CODING */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 tty_con->terminal_type = terminal_type;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 tty_con->controlling_process = controlling_process;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 if (NILP (CONSOLE_NAME (con)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 CONSOLE_NAME (con) = Ffile_name_nondirectory (tty);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
133 pid_t tty_pg;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
134 pid_t controlling_tty_pg;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 int cfd;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 /* OK, the only sure-fire way I can think of to determine
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 whether a particular TTY is our controlling TTY is to check
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 if it has the same foreground process group as our controlling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 TTY. This is OK because a process group can never simultaneously
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 be the foreground process group of two TTY's (in that case it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 would have two controlling TTY's, which is not allowed). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 EMACS_GET_TTY_PROCESS_GROUP (tty_con->infd, &tty_pg);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 cfd = open ("/dev/tty", O_RDWR, 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 EMACS_GET_TTY_PROCESS_GROUP (cfd, &controlling_tty_pg);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 close (cfd);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 if (tty_pg == controlling_tty_pg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 tty_con->controlling_terminal = 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 XSETCONSOLE (Vcontrolling_terminal, con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 munge_tty_process_group ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 tty_con->controlling_terminal = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 UNGCPRO;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 tty_mark_console (struct console *con)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 struct tty_console *tty_con = CONSOLE_TTY_DATA (con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 mark_object (tty_con->terminal_type);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 mark_object (tty_con->instream);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 mark_object (tty_con->outstream);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 static int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 tty_initially_selected_for_input (struct console *con)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 return 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 free_tty_console_struct (struct console *con)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 struct tty_console *tty_con = CONSOLE_TTY_DATA (con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 if (tty_con)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 if (tty_con->term_entry_buffer) /* allocated in term_init () */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 xfree (tty_con->term_entry_buffer);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 tty_con->term_entry_buffer = NULL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 xfree (tty_con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 CONSOLE_TTY_DATA (con) = NULL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 tty_delete_console (struct console *con)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 Lstream_close (XLSTREAM (CONSOLE_TTY_DATA (con)->instream));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 Lstream_close (XLSTREAM (CONSOLE_TTY_DATA (con)->outstream));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 if (!CONSOLE_TTY_DATA (con)->is_stdio)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 close (CONSOLE_TTY_DATA (con)->infd);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 if (CONSOLE_TTY_DATA (con)->controlling_terminal)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 Vcontrolling_terminal = Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 unmunge_tty_process_group ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 free_tty_console_struct (con);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 static struct console *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 decode_tty_console (Lisp_Object console)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 XSETCONSOLE (console, decode_console (console));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 CHECK_TTY_CONSOLE (console);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 return XCONSOLE (console);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 DEFUN ("console-tty-terminal-type", Fconsole_tty_terminal_type,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 0, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 Return the terminal type of TTY console CONSOLE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 (console))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 return CONSOLE_TTY_DATA (decode_tty_console (console))->terminal_type;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 DEFUN ("console-tty-controlling-process", Fconsole_tty_controlling_process,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 0, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 Return the controlling process of tty console CONSOLE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (console))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 return CONSOLE_TTY_DATA (decode_tty_console (console))->controlling_process;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 #ifdef FILE_CODING
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 DEFUN ("console-tty-input-coding-system", Fconsole_tty_input_coding_system,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 0, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 Return the input coding system of tty console CONSOLE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (console))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 return decoding_stream_coding_system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 DEFUN ("set-console-tty-input-coding-system", Fset_console_tty_input_coding_system,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 0, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 Set the input coding system of tty console CONSOLE to CODESYS.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 CONSOLE defaults to the selected console.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 CODESYS defaults to the value of `keyboard-coding-system'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 (console, codesys))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 set_decoding_stream_coding_system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream),
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
256 Fget_coding_system (NILP (codesys) ? Qkeyboard : codesys));
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 DEFUN ("console-tty-output-coding-system", Fconsole_tty_output_coding_system,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 0, 1, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 Return TTY CONSOLE's output coding system.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 (console))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 return encoding_stream_coding_system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 DEFUN ("set-console-tty-output-coding-system", Fset_console_tty_output_coding_system,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 0, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 Set the coding system of tty output of console CONSOLE to CODESYS.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 CONSOLE defaults to the selected console.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 CODESYS defaults to the value of `terminal-coding-system'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 (console, codesys))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 set_encoding_stream_coding_system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream),
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
280 Fget_coding_system (NILP (codesys) ? Qterminal : codesys));
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
281 /* Redraw tty */
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
282 face_property_was_changed (Vdefault_face, Qfont, Qtty);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
286 /* #### Move this function to lisp */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 0, 2, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 Set the input and output coding systems of tty console CONSOLE to CODESYS.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 CONSOLE defaults to the selected console.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 If CODESYS is nil, the values of `keyboard-coding-system' and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 `terminal-coding-system' will be used for the input and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 output coding systems of CONSOLE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 (console, codesys))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 Fset_console_tty_input_coding_system (console, codesys);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 Fset_console_tty_output_coding_system (console, codesys);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 return Qnil;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 #endif /* FILE_CODING */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 tty_semi_canonicalize_console_connection (Lisp_Object connection,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 Error_behavior errb)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 return stream_semi_canonicalize_console_connection (connection, errb);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 tty_canonicalize_console_connection (Lisp_Object connection,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 Error_behavior errb)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 return stream_canonicalize_console_connection (connection, errb);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 tty_semi_canonicalize_device_connection (Lisp_Object connection,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 Error_behavior errb)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 return stream_semi_canonicalize_console_connection (connection, errb);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 Lisp_Object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 tty_canonicalize_device_connection (Lisp_Object connection,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 Error_behavior errb)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 return stream_canonicalize_console_connection (connection, errb);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 /* initialization */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 syms_of_console_tty (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 DEFSUBR (Fconsole_tty_terminal_type);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 DEFSUBR (Fconsole_tty_controlling_process);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 defsymbol (&Qterminal_type, "terminal-type");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 defsymbol (&Qcontrolling_process, "controlling-process");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 #ifdef FILE_CODING
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 DEFSUBR (Fconsole_tty_output_coding_system);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 DEFSUBR (Fset_console_tty_output_coding_system);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 DEFSUBR (Fconsole_tty_input_coding_system);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 DEFSUBR (Fset_console_tty_input_coding_system);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 DEFSUBR (Fset_console_tty_coding_system);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 #endif /* FILE_CODING */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 console_type_create_tty (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 INITIALIZE_CONSOLE_TYPE (tty, "tty", "console-tty-p");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 /* console methods */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 CONSOLE_HAS_METHOD (tty, init_console);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 CONSOLE_HAS_METHOD (tty, mark_console);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361 CONSOLE_HAS_METHOD (tty, initially_selected_for_input);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 CONSOLE_HAS_METHOD (tty, delete_console);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 CONSOLE_HAS_METHOD (tty, canonicalize_console_connection);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 CONSOLE_HAS_METHOD (tty, canonicalize_device_connection);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 CONSOLE_HAS_METHOD (tty, semi_canonicalize_console_connection);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 CONSOLE_HAS_METHOD (tty, semi_canonicalize_device_connection);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 reinit_console_type_create_tty (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 REINITIALIZE_CONSOLE_TYPE (tty);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 image_instantiator_format_create_glyphs_tty (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 IIFORMAT_VALID_CONSOLE (tty, nothing);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 IIFORMAT_VALID_CONSOLE (tty, string);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 IIFORMAT_VALID_CONSOLE (tty, formatted_string);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 IIFORMAT_VALID_CONSOLE (tty, inherit);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 vars_of_console_tty (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 Fprovide (Qtty);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 }