annotate src/device-tty.c @ 26:441bb1e64a06 r19-15b96

Import from CVS: tag r19-15b96
author cvs
date Mon, 13 Aug 2007 08:51:32 +0200
parents 9ee227acff29
children 538048ae2ab8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* TTY device functions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 Copyright (C) 1994, 1995 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 Copyright (C) 1996 Ben Wing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 /* Synched up with: Not in FSF. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 /* Authors: Ben Wing and Chuck Thompson. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 #include <config.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 #include "lisp.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 #include "console-tty.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #include "console-stream.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 #include "events.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #include "faces.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #include "frame.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 #include "lstream.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #include "redisplay.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 #include "sysdep.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 #include "syssignal.h" /* for SIGWINCH */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #include <errno.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 Lisp_Object Qinit_pre_tty_win, Qinit_post_tty_win;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 allocate_tty_device_struct (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 d->device_data =
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (struct tty_device *) xmalloc (sizeof (struct tty_device));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 /* zero out all slots. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 memset (d->device_data, 0, sizeof (struct tty_device));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 tty_init_device (struct device *d, Lisp_Object props)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 Lisp_Object terminal_type = CONSOLE_TTY_DATA (con)->terminal_type;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 DEVICE_INFD (d) = CONSOLE_TTY_DATA (con)->infd;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 DEVICE_OUTFD (d) = CONSOLE_TTY_DATA (con)->outfd;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 allocate_tty_device_struct (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 init_baud_rate (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 0
diff changeset
68 switch (init_tty_for_redisplay (d, (char *) XSTRING_DATA (terminal_type)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 #if 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 case TTY_UNABLE_OPEN_DATABASE:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 error ("Can't access terminal information database");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 case TTY_TYPE_UNDEFINED:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 error ("Terminal type `%s' undefined (or can't access database?)",
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 0
diff changeset
79 XSTRING_DATA (terminal_type));
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 case TTY_TYPE_INSUFFICIENT:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 error ("Terminal type `%s' not powerful enough to run Emacs",
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 0
diff changeset
84 XSTRING_DATA (terminal_type));
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 case TTY_SIZE_UNSPECIFIED:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 error ("Can't determine window size of terminal");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 case TTY_INIT_SUCCESS:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 default:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 abort ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 init_one_device (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 /* Run part of the elisp side of the TTY device initialization.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 The post-init is run in the tty_after_init_frame() method. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 call0 (Qinit_pre_tty_win);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 free_tty_device_struct (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 struct tty_device *td = (struct tty_device *) d->device_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 if (td)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 xfree (td);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 tty_delete_device (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 free_tty_device_struct (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 #ifdef SIGWINCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 static SIGTYPE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 tty_device_size_change_signal (int signo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 int old_errno = errno;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 asynch_device_change_pending++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 signal_fake_event ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 EMACS_REESTABLISH_SIGNAL (SIGWINCH, tty_device_size_change_signal);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 errno = old_errno;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 SIGRETURN;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 /* frame_change_signal does nothing but set a flag that it was called.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 When redisplay is called, it will notice that the flag is set and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 call handle_pending_device_size_change to do the actual work. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 tty_asynch_device_change (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 Lisp_Object devcons, concons;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 DEVICE_LOOP_NO_BREAK (devcons, concons)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 int width, height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 Lisp_Object tail;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 struct device *d = XDEVICE (XCAR (devcons));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 if (!DEVICE_TTY_P (d))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 continue;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 get_tty_device_size (d, &width, &height);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 if (width > 0 && height > 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 CONSOLE_TTY_DATA (con)->width = width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 CONSOLE_TTY_DATA (con)->height = height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 for (tail = DEVICE_FRAME_LIST (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 !NILP (tail);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 tail = XCDR (tail))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 struct frame *f = XFRAME (XCAR (tail));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 /* We know the frame is tty because we made sure that the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 device is tty. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 change_frame_size (f, height, width, 1);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 #endif /* SIGWINCH */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 static int
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 tty_device_pixel_width (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 return CONSOLE_TTY_DATA (con)->width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 static int
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 tty_device_pixel_height (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 return CONSOLE_TTY_DATA (con)->height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 /************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 /* initialization */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 /************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 syms_of_device_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 defsymbol (&Qinit_pre_tty_win, "init-pre-tty-win");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 defsymbol (&Qinit_post_tty_win, "init-post-tty-win");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 console_type_create_device_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 /* device methods */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 CONSOLE_HAS_METHOD (tty, init_device);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 CONSOLE_HAS_METHOD (tty, delete_device);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 #ifdef SIGWINCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 CONSOLE_HAS_METHOD (tty, asynch_device_change);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 #endif /* SIGWINCH */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 CONSOLE_HAS_METHOD (tty, device_pixel_width);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 CONSOLE_HAS_METHOD (tty, device_pixel_height);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 init_device_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 #ifdef SIGWINCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 if (initialized && !noninteractive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 signal (SIGWINCH, tty_device_size_change_signal);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 #endif /* SIGWINCH */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 }