Commit | Line | Data |
---|---|---|
a04c9535 | 1 | /* systty.h - System-dependent definitions for terminals. |
ab422c4d | 2 | Copyright (C) 1993-1994, 2001-2013 Free Software Foundation, Inc. |
d0d6b7c5 JB |
3 | |
4 | This file is part of GNU Emacs. | |
5 | ||
b9b1cc14 | 6 | GNU Emacs is free software: you can redistribute it and/or modify |
d0d6b7c5 | 7 | it under the terms of the GNU General Public License as published by |
b9b1cc14 GM |
8 | the Free Software Foundation, either version 3 of the License, or |
9 | (at your option) any later version. | |
d0d6b7c5 JB |
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 | |
b9b1cc14 | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
d0d6b7c5 | 18 | |
d0d6b7c5 | 19 | /* Include the proper files. */ |
4a4bbad2 | 20 | |
a7ebc409 | 21 | #ifndef DOS_NT |
d0d6b7c5 | 22 | #include <termios.h> |
1aaaff21 | 23 | #include <fcntl.h> |
101adcb5 | 24 | #endif /* not DOS_NT */ |
d0d6b7c5 | 25 | |
c3ff76c4 | 26 | #include <sys/ioctl.h> |
c9b67b7b | 27 | |
28823648 | 28 | #ifdef HPUX |
4746118a | 29 | #include <sys/bsdtty.h> |
4746118a JB |
30 | #include <sys/ptyio.h> |
31 | #endif | |
378ac314 | 32 | |
4746118a JB |
33 | #ifdef AIX |
34 | #include <sys/pty.h> | |
4746118a JB |
35 | #endif /* AIX */ |
36 | ||
9825c716 | 37 | #include <unistd.h> |
5ab57b9f | 38 | |
d0d6b7c5 | 39 | \f |
2102829e RS |
40 | /* Try to establish the correct character to disable terminal functions |
41 | in a system-independent manner. Note that USG (at least) define | |
42 | _POSIX_VDISABLE as 0! */ | |
43 | ||
44 | #ifdef _POSIX_VDISABLE | |
45 | #define CDISABLE _POSIX_VDISABLE | |
46 | #else /* not _POSIX_VDISABLE */ | |
47 | #ifdef CDEL | |
d04e8e46 | 48 | #undef CDISABLE |
2102829e RS |
49 | #define CDISABLE CDEL |
50 | #else /* not CDEL */ | |
51 | #define CDISABLE 255 | |
52 | #endif /* not CDEL */ | |
53 | #endif /* not _POSIX_VDISABLE */ | |
54 | \f | |
d0d6b7c5 JB |
55 | /* Manipulate a TTY's input/output processing parameters. */ |
56 | ||
57 | /* struct emacs_tty is a structure used to hold the current tty | |
58 | parameters. If the terminal has several structures describing its | |
59 | state, for example a struct tchars, a struct sgttyb, a struct | |
60 | tchars, a struct ltchars, and a struct pagechars, struct | |
61 | emacs_tty should contain an element for each parameter struct | |
12e610e8 | 62 | that Emacs may change. */ |
d0d6b7c5 JB |
63 | |
64 | ||
d0d6b7c5 | 65 | /* For each tty parameter structure that Emacs might want to save and restore, |
1334b321 JB |
66 | - include an element for it in this structure, and |
67 | - extend the emacs_{get,set}_tty functions in sysdep.c to deal with the | |
68 | new members. */ | |
d0d6b7c5 JB |
69 | |
70 | struct emacs_tty { | |
71 | ||
72 | /* There is always one of the following elements, so there is no need | |
73 | for dummy get and set definitions. */ | |
a7ebc409 | 74 | #ifndef DOS_NT |
d0d6b7c5 | 75 | struct termios main; |
a7ebc409 | 76 | #else /* DOS_NT */ |
8e99c732 | 77 | int main; |
a7ebc409 | 78 | #endif /* DOS_NT */ |
2182d459 RS |
79 | }; |
80 | \f | |
a0977c44 PE |
81 | /* From sysdep.c or w32.c */ |
82 | extern int serial_open (char *); | |
83 | extern void serial_configure (struct Lisp_Process *, Lisp_Object); |