Mercurial > emacs
annotate src/systty.h @ 3523:a9967fc643c5
[HAVE_TZNAME]: Declare tzname if not macro.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 06 Jun 1993 17:44:23 +0000 |
parents | e177111a0442 |
children | 009b22e07a63 |
rev | line source |
---|---|
1597 | 1 /* systty.h - System-dependent definitions for terminals. |
2961 | 2 Copyright (C) 1993 Free Software Foundation, Inc. |
578 | 3 |
4 This file is part of GNU Emacs. | |
5 | |
6 GNU Emacs is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
8 the Free Software Foundation; either version 1, or (at your option) | |
9 any later version. | |
10 | |
11 GNU Emacs is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GNU Emacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
19 | |
2095
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
20 #ifdef HAVE_TERMIOS |
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
21 #define HAVE_TCATTR |
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
22 #endif |
578 | 23 |
24 /* Include the proper files. */ | |
25 #ifdef HAVE_TERMIO | |
2912
32106dbf6d01
Some changes from Michael K. Johnson for Linux.
Jim Blandy <jimb@redhat.com>
parents:
2873
diff
changeset
|
26 #ifdef __DGUX |
32106dbf6d01
Some changes from Michael K. Johnson for Linux.
Jim Blandy <jimb@redhat.com>
parents:
2873
diff
changeset
|
27 #include <sys/ioctl.h> |
32106dbf6d01
Some changes from Michael K. Johnson for Linux.
Jim Blandy <jimb@redhat.com>
parents:
2873
diff
changeset
|
28 #endif |
578 | 29 #include <termio.h> |
30 #include <fcntl.h> | |
31 #else | |
32 #ifdef HAVE_TERMIOS | |
3319
e177111a0442
[HAVE_TERMIOS _AIX _I386]: Include termios before termio.
Richard M. Stallman <rms@gnu.org>
parents:
3306
diff
changeset
|
33 #if defined(_AIX) && defined(_I386) |
e177111a0442
[HAVE_TERMIOS _AIX _I386]: Include termios before termio.
Richard M. Stallman <rms@gnu.org>
parents:
3306
diff
changeset
|
34 #include <termios.h> /* termios.h needs to be before termio.h */ |
e177111a0442
[HAVE_TERMIOS _AIX _I386]: Include termios before termio.
Richard M. Stallman <rms@gnu.org>
parents:
3306
diff
changeset
|
35 #include <termio.h> |
e177111a0442
[HAVE_TERMIOS _AIX _I386]: Include termios before termio.
Richard M. Stallman <rms@gnu.org>
parents:
3306
diff
changeset
|
36 #else |
578 | 37 #include <termio.h> |
38 #include <termios.h> | |
3319
e177111a0442
[HAVE_TERMIOS _AIX _I386]: Include termios before termio.
Richard M. Stallman <rms@gnu.org>
parents:
3306
diff
changeset
|
39 #endif /* _AIX && _I386 */ |
1929
8ca19160362b
* systty.h [HAVE_TERMIOS]: Include fcntl.h.
Jim Blandy <jimb@redhat.com>
parents:
1597
diff
changeset
|
40 #include <fcntl.h> |
578 | 41 #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ |
42 #ifndef VMS | |
43 #include <sgtty.h> | |
1597 | 44 #else /* VMS */ |
45 #include <descrip.h> | |
46 static struct iosb | |
47 { | |
48 short status; | |
49 short offset; | |
50 short termlen; | |
51 short term; | |
52 } input_iosb; | |
53 | |
54 extern int waiting_for_ast; | |
55 extern int stop_input; | |
2264
87934d212841
Some VMS changes from Richard Levitte <levitte@e.kth.se>:
Jim Blandy <jimb@redhat.com>
parents:
2095
diff
changeset
|
56 #if 0 /* VAX C doeasn't understand initializing declarations */ |
1597 | 57 extern int input_ef = 0; |
58 extern int timer_ef = 0; | |
59 extern int process_ef = 0; | |
2264
87934d212841
Some VMS changes from Richard Levitte <levitte@e.kth.se>:
Jim Blandy <jimb@redhat.com>
parents:
2095
diff
changeset
|
60 #else |
87934d212841
Some VMS changes from Richard Levitte <levitte@e.kth.se>:
Jim Blandy <jimb@redhat.com>
parents:
2095
diff
changeset
|
61 extern int input_ef; |
87934d212841
Some VMS changes from Richard Levitte <levitte@e.kth.se>:
Jim Blandy <jimb@redhat.com>
parents:
2095
diff
changeset
|
62 extern int timer_ef; |
87934d212841
Some VMS changes from Richard Levitte <levitte@e.kth.se>:
Jim Blandy <jimb@redhat.com>
parents:
2095
diff
changeset
|
63 extern int process_ef; |
87934d212841
Some VMS changes from Richard Levitte <levitte@e.kth.se>:
Jim Blandy <jimb@redhat.com>
parents:
2095
diff
changeset
|
64 #endif |
1597 | 65 extern int input_eflist; |
66 extern int timer_eflist; | |
67 | |
68 static $DESCRIPTOR (input_dsc, "TT"); | |
69 static int terminator_mask[2] = { 0, 0 }; | |
70 | |
71 static struct sensemode { | |
72 short status; | |
73 unsigned char xmit_baud; | |
74 unsigned char rcv_baud; | |
75 unsigned char crfill; | |
76 unsigned char lffill; | |
77 unsigned char parity; | |
78 unsigned char unused; | |
79 char class; | |
80 char type; | |
81 short scr_wid; | |
82 unsigned long tt_char : 24, scr_len : 8; | |
83 unsigned long tt2_char; | |
84 } sensemode_iosb; | |
85 #endif /* VMS */ | |
578 | 86 #endif /* not HAVE_TERMIOS */ |
87 #endif /* not HAVE_TERMIO */ | |
88 | |
621 | 89 #ifdef AIX |
90 /* Get files for keyboard remapping */ | |
91 #define HFNKEYS 2 | |
92 #include <sys/hft.h> | |
93 #include <sys/devinfo.h> | |
94 #endif | |
95 | |
96 /* Get rid of LLITOUT in 4.1, since it is said to stimulate kernel bugs. */ | |
97 #ifdef BSD4_1 | |
98 #undef LLITOUT | |
99 #define LLITOUT 0 | |
100 #endif /* 4.1 */ | |
101 | |
102 #ifdef NEED_BSDTTY | |
103 #include <sys/bsdtty.h> | |
104 #endif | |
105 | |
106 #if defined (HPUX) && defined (HAVE_PTYS) | |
107 #include <sys/ptyio.h> | |
108 #endif | |
109 | |
110 #ifdef AIX | |
111 #include <sys/pty.h> | |
112 #include <unistd.h> | |
113 #endif /* AIX */ | |
114 | |
3306
6dfbd809ae8c
[IRIX4]: Include unistd.h.
Richard M. Stallman <rms@gnu.org>
parents:
3269
diff
changeset
|
115 #ifdef IRIX4 |
6dfbd809ae8c
[IRIX4]: Include unistd.h.
Richard M. Stallman <rms@gnu.org>
parents:
3269
diff
changeset
|
116 /* Get _getpty prototype */ |
6dfbd809ae8c
[IRIX4]: Include unistd.h.
Richard M. Stallman <rms@gnu.org>
parents:
3269
diff
changeset
|
117 #include <unistd.h> |
6dfbd809ae8c
[IRIX4]: Include unistd.h.
Richard M. Stallman <rms@gnu.org>
parents:
3269
diff
changeset
|
118 #endif |
6dfbd809ae8c
[IRIX4]: Include unistd.h.
Richard M. Stallman <rms@gnu.org>
parents:
3269
diff
changeset
|
119 |
621 | 120 #ifdef SYSV_PTYS |
2943
be86b41a0661
* systty.h [SYSV_PTYS]: #include <sys/types.h>. Francesco
Jim Blandy <jimb@redhat.com>
parents:
2917
diff
changeset
|
121 #include <sys/types.h> |
621 | 122 #include <sys/tty.h> |
648 | 123 #ifdef titan |
124 #include <sys/ttyhw.h> | |
125 #include <sys/stream.h> | |
126 #endif | |
2414
9994dd2e75c9
[NO_PTY_H]: Don't include pty.h.
Richard M. Stallman <rms@gnu.org>
parents:
2264
diff
changeset
|
127 #ifndef NO_PTY_H |
621 | 128 #include <sys/pty.h> |
129 #endif | |
2414
9994dd2e75c9
[NO_PTY_H]: Don't include pty.h.
Richard M. Stallman <rms@gnu.org>
parents:
2264
diff
changeset
|
130 #endif |
621 | 131 |
132 /* saka@pfu.fujitsu.co.JP writes: | |
133 FASYNC defined in this file. But, FASYNC don't working. | |
134 so no problem, because unrequest_sigio only need. */ | |
135 #if defined (pfa) | |
136 #include <sys/file.h> | |
137 #endif | |
138 | |
578 | 139 |
140 /* Special cases - inhibiting the use of certain features. */ | |
141 | |
142 #ifdef APOLLO | |
143 #undef TIOCSTART | |
144 #endif | |
145 | |
648 | 146 #ifdef XENIX |
147 #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ | |
148 #endif | |
149 | |
578 | 150 #ifdef BROKEN_TIOCGETC |
151 #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ | |
152 #endif | |
153 | |
154 /* UNIPLUS systems may have FIONREAD. */ | |
155 #ifdef UNIPLUS | |
156 #include <sys.ioctl.h> | |
157 #endif | |
158 | |
159 /* Allow m- file to inhibit use of FIONREAD. */ | |
160 #ifdef BROKEN_FIONREAD | |
161 #undef FIONREAD | |
162 #undef ASYNC | |
163 #endif | |
164 | |
165 /* Interupt input is not used if there is no FIONREAD. */ | |
166 #ifndef FIONREAD | |
167 #undef SIGIO | |
168 #endif | |
169 | |
3157
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
170 /* On TERMIOS systems, the tcmumbleattr calls take care of these |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
171 parameters, and it's a bad idea to use them (on AIX, it makes the |
3171
f26d9c469926
* systty.h: Always terminate comments, to avoid confusion.
Jim Blandy <jimb@redhat.com>
parents:
3157
diff
changeset
|
172 tty hang for a long time). */ |
3157
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
173 #if defined (TIOCGLTC) && !defined (HAVE_TERMIOS) |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
174 #define HAVE_LTCHARS |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
175 #endif |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
176 |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
177 #if defined (TIOCGETC) && !defined (HAVE_TERMIOS) |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
178 #define HAVE_TCHARS |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
179 #endif |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
180 |
578 | 181 |
1101 | 182 /* Try to establish the correct character to disable terminal functions |
183 in a system-independent manner. Note that USG (at least) define | |
184 _POSIX_VDISABLE as 0! */ | |
185 | |
186 #ifdef _POSIX_VDISABLE | |
187 #define CDISABLE _POSIX_VDISABLE | |
188 #else /* not _POSIX_VDISABLE */ | |
189 #ifdef CDEL | |
3269
3e44fc755c00
* systty.h (CDISABLE): #undef it before re-#defining it.
Jim Blandy <jimb@redhat.com>
parents:
3171
diff
changeset
|
190 #undef CDISABLE |
1101 | 191 #define CDISABLE CDEL |
192 #else /* not CDEL */ | |
193 #define CDISABLE 255 | |
194 #endif /* not CDEL */ | |
195 #endif /* not _POSIX_VDISABLE */ | |
196 | |
578 | 197 /* Get the number of characters queued for output. */ |
198 | |
199 /* EMACS_OUTQSIZE(FD, int *SIZE) stores the number of characters | |
200 queued for output to the terminal FD in *SIZE, if FD is a tty. | |
201 Returns -1 if there was an error (i.e. FD is not a tty), 0 | |
202 otherwise. */ | |
203 #ifdef TIOCOUTQ | |
204 #define EMACS_OUTQSIZE(fd, size) (ioctl ((fd), TIOCOUTQ, (size))) | |
205 #endif | |
206 | |
207 #ifdef HAVE_TERMIO | |
208 #ifdef TCOUTQ | |
209 #undef EMACS_OUTQSIZE | |
210 #define EMACS_OUTQSIZE(fd, size) (ioctl ((fd), TCOUTQ, (size))) | |
211 #endif | |
212 #endif | |
213 | |
214 | |
215 /* Manipulate a terminal's current process group. */ | |
216 | |
217 /* EMACS_HAVE_TTY_PGRP is true if we can get and set the tty's current | |
218 controlling process group. | |
219 | |
220 EMACS_GET_TTY_PGRP(int FD, int *PGID) sets *PGID the terminal FD's | |
221 current process group. Return -1 if there is an error. | |
222 | |
223 EMACS_SET_TTY_PGRP(int FD, int *PGID) sets the terminal FD's | |
224 current process group to *PGID. Return -1 if there is an error. */ | |
225 | |
648 | 226 #ifdef HPUX |
227 /* HPUX tty process group stuff doesn't work, says the anonymous voice | |
228 from the past. */ | |
229 #else | |
578 | 230 #ifdef TIOCGPGRP |
231 #define EMACS_HAVE_TTY_PGRP | |
232 #else | |
233 #ifdef HAVE_TERMIOS | |
234 #define EMACS_HAVE_TTY_PGRP | |
235 #endif | |
236 #endif | |
648 | 237 #endif |
578 | 238 |
239 #ifdef EMACS_HAVE_TTY_PGRP | |
240 | |
241 #ifdef HAVE_TERMIOS | |
242 | |
243 #define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp ((fd))) | |
2917
725698689fbd
Some more changes from Michael K. Johnson for Linux.
Jim Blandy <jimb@redhat.com>
parents:
2912
diff
changeset
|
244 #define EMACS_SET_TTY_PGRP(fd, pgid) (tcsetpgrp ((fd), *(pgid))) |
578 | 245 |
246 #else | |
247 #ifdef TIOCSPGRP | |
248 | |
249 #define EMACS_GET_TTY_PGRP(fd, pgid) (ioctl ((fd), TIOCGPGRP, (pgid))) | |
250 #define EMACS_SET_TTY_PGRP(fd, pgid) (ioctl ((fd), TIOCSPGRP, (pgid))) | |
251 | |
252 #endif | |
253 #endif | |
254 | |
255 #else | |
256 | |
257 /* Just ignore this for now and hope for the best */ | |
258 #define EMACS_GET_TTY_PGRP(fd, pgid) 0 | |
999 | 259 #define EMACS_SET_TTY_PGRP(fd, pgif) 0 |
578 | 260 |
261 #endif | |
262 | |
263 | |
264 /* Manipulate a TTY's input/output processing parameters. */ | |
265 | |
266 /* struct emacs_tty is a structure used to hold the current tty | |
267 parameters. If the terminal has several structures describing its | |
268 state, for example a struct tchars, a struct sgttyb, a struct | |
269 tchars, a struct ltchars, and a struct pagechars, struct | |
270 emacs_tty should contain an element for each parameter struct | |
271 that Emacs may change. | |
272 | |
2873
f1cd54cf1b67
* sysdep.c (reset_sys_modes): Test the return value of
Jim Blandy <jimb@redhat.com>
parents:
2658
diff
changeset
|
273 EMACS_GET_TTY (int FD, struct emacs_tty *P) stores the parameters |
f1cd54cf1b67
* sysdep.c (reset_sys_modes): Test the return value of
Jim Blandy <jimb@redhat.com>
parents:
2658
diff
changeset
|
274 of the tty on FD in *P. Return zero if all's well, or -1 if we ran |
f1cd54cf1b67
* sysdep.c (reset_sys_modes): Test the return value of
Jim Blandy <jimb@redhat.com>
parents:
2658
diff
changeset
|
275 into an error we couldn't deal with. |
578 | 276 |
277 EMACS_SET_TTY (int FD, struct emacs_tty *P, int waitp) | |
278 sets the parameters of the tty on FD according to the contents of | |
279 *P. If waitp is non-zero, we wait for all queued output to be | |
280 written before making the change; otherwise, we forget any queued | |
281 input and make the change immediately. | |
2873
f1cd54cf1b67
* sysdep.c (reset_sys_modes): Test the return value of
Jim Blandy <jimb@redhat.com>
parents:
2658
diff
changeset
|
282 Return 0 if all went well, and -1 if anything failed. |
578 | 283 |
284 EMACS_TTY_TABS_OK (struct emacs_tty *P) is false iff the kernel | |
285 expands tabs to spaces upon output; in that case, there is no | |
286 advantage to using tabs over spaces. */ | |
287 | |
288 | |
289 /* For each tty parameter structure that Emacs might want to save and restore, | |
2873
f1cd54cf1b67
* sysdep.c (reset_sys_modes): Test the return value of
Jim Blandy <jimb@redhat.com>
parents:
2658
diff
changeset
|
290 - include an element for it in this structure, and |
f1cd54cf1b67
* sysdep.c (reset_sys_modes): Test the return value of
Jim Blandy <jimb@redhat.com>
parents:
2658
diff
changeset
|
291 - extend the emacs_{get,set}_tty functions in sysdep.c to deal with the |
f1cd54cf1b67
* sysdep.c (reset_sys_modes): Test the return value of
Jim Blandy <jimb@redhat.com>
parents:
2658
diff
changeset
|
292 new members. */ |
578 | 293 |
294 struct emacs_tty { | |
295 | |
296 /* There is always one of the following elements, so there is no need | |
297 for dummy get and set definitions. */ | |
2095
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
298 #ifdef HAVE_TCATTR |
578 | 299 struct termios main; |
300 #else | |
301 #ifdef HAVE_TERMIO | |
302 struct termio main; | |
303 #else | |
304 #ifdef VMS | |
305 struct sensemode main; | |
306 #else | |
307 struct sgttyb main; | |
308 #endif | |
309 #endif | |
310 #endif | |
3157
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
311 |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
312 /* If we have TERMIOS, we don't need to do this - they're taken care of |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
313 by the tc*attr calls. */ |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
314 #ifndef HAVE_TERMIOS |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
315 #ifdef HAVE_LTCHARS |
2095
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
316 struct ltchars ltchars; |
578 | 317 #endif |
3157
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
318 |
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
319 #ifdef HAVE_TCHARS |
2095
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
320 struct tchars tchars; |
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
321 int lmode; |
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
322 #endif |
3157
84825e357019
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
Jim Blandy <jimb@redhat.com>
parents:
2961
diff
changeset
|
323 #endif |
2095
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
324 }; |
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
325 |
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
326 /* Define EMACS_GET_TTY and EMACS_SET_TTY, |
2658
8be0a57686cb
* systty.h (EMACS_GET_TTY, EMACS_SET_TTY): Move these into
Jim Blandy <jimb@redhat.com>
parents:
2414
diff
changeset
|
327 the macros for reading and setting parts of `struct emacs_tty'. |
578 | 328 |
2658
8be0a57686cb
* systty.h (EMACS_GET_TTY, EMACS_SET_TTY): Move these into
Jim Blandy <jimb@redhat.com>
parents:
2414
diff
changeset
|
329 These got pretty unmanageable (huge macros are hard to debug), and |
8be0a57686cb
* systty.h (EMACS_GET_TTY, EMACS_SET_TTY): Move these into
Jim Blandy <jimb@redhat.com>
parents:
2414
diff
changeset
|
330 finally needed some code which couldn't be done as part of an |
8be0a57686cb
* systty.h (EMACS_GET_TTY, EMACS_SET_TTY): Move these into
Jim Blandy <jimb@redhat.com>
parents:
2414
diff
changeset
|
331 expression, so we moved them out to their own functions in sysdep.c. */ |
8be0a57686cb
* systty.h (EMACS_GET_TTY, EMACS_SET_TTY): Move these into
Jim Blandy <jimb@redhat.com>
parents:
2414
diff
changeset
|
332 #define EMACS_GET_TTY(fd, p) (emacs_get_tty ((fd), (p))) |
8be0a57686cb
* systty.h (EMACS_GET_TTY, EMACS_SET_TTY): Move these into
Jim Blandy <jimb@redhat.com>
parents:
2414
diff
changeset
|
333 #define EMACS_SET_TTY(fd, p, waitp) (emacs_set_tty ((fd), (p), (waitp))) |
578 | 334 |
2095
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
335 |
139f87bcbaf1
Define HAVE_TCATTR based on HAVE_TERMIOS earlier.
Richard M. Stallman <rms@gnu.org>
parents:
1929
diff
changeset
|
336 /* Define EMACS_TTY_TABS_OK. */ |
578 | 337 |
338 #ifdef HAVE_TERMIOS | |
339 | |
340 #define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) | |
341 | |
342 #else /* not def HAVE_TERMIOS */ | |
343 #ifdef HAVE_TERMIO | |
344 | |
345 #define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) | |
346 | |
347 #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ | |
348 #ifdef VMS | |
349 | |
350 #define EMACS_TTY_TABS_OK(p) (((p)->main.tt_char & TT$M_MECHTAB) != 0) | |
351 | |
352 #else | |
353 | |
354 #define EMACS_TTY_TABS_OK(p) (((p)->main.sg_flags & XTABS) != XTABS) | |
355 | |
356 #endif /* not def VMS */ | |
357 #endif /* not def HAVE_TERMIO */ | |
358 #endif /* not def HAVE_TERMIOS */ |