annotate src/device-tty.c @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 9ee227acff29
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 switch (init_tty_for_redisplay
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (d, (char *) string_data (XSTRING (terminal_type))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 #if 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 case TTY_UNABLE_OPEN_DATABASE:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 error ("Can't access terminal information database");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 case TTY_TYPE_UNDEFINED:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 error ("Terminal type `%s' undefined (or can't access database?)",
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 string_data (XSTRING (terminal_type)));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 case TTY_TYPE_INSUFFICIENT:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 error ("Terminal type `%s' not powerful enough to run Emacs",
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 string_data (XSTRING (terminal_type)));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 case TTY_SIZE_UNSPECIFIED:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 suppress_early_backtrace = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 error ("Can't determine window size of terminal");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 case TTY_INIT_SUCCESS:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 default:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 abort ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 init_one_device (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 /* Run part of the elisp side of the TTY device initialization.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 The post-init is run in the tty_after_init_frame() method. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 call0 (Qinit_pre_tty_win);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 free_tty_device_struct (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 struct tty_device *td = (struct tty_device *) d->device_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 if (td)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 xfree (td);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 tty_delete_device (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 free_tty_device_struct (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 #ifdef SIGWINCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 static SIGTYPE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 tty_device_size_change_signal (int signo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 int old_errno = errno;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 asynch_device_change_pending++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 signal_fake_event ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 EMACS_REESTABLISH_SIGNAL (SIGWINCH, tty_device_size_change_signal);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 errno = old_errno;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 SIGRETURN;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 /* frame_change_signal does nothing but set a flag that it was called.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 When redisplay is called, it will notice that the flag is set and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 call handle_pending_device_size_change to do the actual work. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 tty_asynch_device_change (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 Lisp_Object devcons, concons;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 DEVICE_LOOP_NO_BREAK (devcons, concons)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 int width, height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 Lisp_Object tail;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 struct device *d = XDEVICE (XCAR (devcons));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 if (!DEVICE_TTY_P (d))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 continue;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 get_tty_device_size (d, &width, &height);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 if (width > 0 && height > 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 CONSOLE_TTY_DATA (con)->width = width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 CONSOLE_TTY_DATA (con)->height = height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 for (tail = DEVICE_FRAME_LIST (d);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 !NILP (tail);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 tail = XCDR (tail))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 struct frame *f = XFRAME (XCAR (tail));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 /* We know the frame is tty because we made sure that the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 device is tty. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 change_frame_size (f, height, width, 1);
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 #endif /* SIGWINCH */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 static int
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 tty_device_pixel_width (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 return CONSOLE_TTY_DATA (con)->width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 static int
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 tty_device_pixel_height (struct device *d)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 return CONSOLE_TTY_DATA (con)->height;
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 /************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 /* initialization */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 /************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 syms_of_device_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 defsymbol (&Qinit_pre_tty_win, "init-pre-tty-win");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 defsymbol (&Qinit_post_tty_win, "init-post-tty-win");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 console_type_create_device_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 /* device methods */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 CONSOLE_HAS_METHOD (tty, init_device);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 CONSOLE_HAS_METHOD (tty, delete_device);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 #ifdef SIGWINCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 CONSOLE_HAS_METHOD (tty, asynch_device_change);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 #endif /* SIGWINCH */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 CONSOLE_HAS_METHOD (tty, device_pixel_width);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 CONSOLE_HAS_METHOD (tty, device_pixel_height);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 init_device_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 #ifdef SIGWINCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 if (initialized && !noninteractive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 signal (SIGWINCH, tty_device_size_change_signal);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 #endif /* SIGWINCH */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 }