Mercurial > cpython-lru_cache-weakref
annotate Modules/termios.c @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | e223397b26fa |
| children | f39213405e05 |
| rev | line source |
|---|---|
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 /* termiosmodule.c -- POSIX terminal I/O module implementation. */ |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 |
|
9887
ae908ef91cf0
Should include "Python.h", not <Python.h> -- it's not a standard
Guido van Rossum <guido@python.org>
parents:
9588
diff
changeset
|
3 #include "Python.h" |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 #define PyInit_termios inittermios |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 #include <termios.h> |
|
17732
e785d7bd7598
Only import termio.h on OSF, and add a comment about why it is needed there.
Fred Drake <fdrake@acm.org>
parents:
17697
diff
changeset
|
8 #ifdef __osf__ |
|
e785d7bd7598
Only import termio.h on OSF, and add a comment about why it is needed there.
Fred Drake <fdrake@acm.org>
parents:
17697
diff
changeset
|
9 /* On OSF, sys/ioctl.h requires that struct termio already be defined, |
|
e785d7bd7598
Only import termio.h on OSF, and add a comment about why it is needed there.
Fred Drake <fdrake@acm.org>
parents:
17697
diff
changeset
|
10 * so this needs to be included first on that platform. */ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
11 #include <termio.h> |
|
17732
e785d7bd7598
Only import termio.h on OSF, and add a comment about why it is needed there.
Fred Drake <fdrake@acm.org>
parents:
17697
diff
changeset
|
12 #endif |
|
17313
b73547bf8bc2
Add an #include of sys/ioctl.h to pick up a lot of the constants supported
Fred Drake <fdrake@acm.org>
parents:
17226
diff
changeset
|
13 #include <sys/ioctl.h> |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
14 |
|
17788
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
15 /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR, |
|
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
16 * MDTR, MRI, and MRTS (appearantly used internally by some things |
|
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
17 * defined as macros; these are not used here directly). |
|
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
18 */ |
|
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
19 #ifdef HAVE_SYS_MODEM_H |
|
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
20 #include <sys/modem.h> |
|
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
21 #endif |
|
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
22 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
23 static char termios__doc__[] = "\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
24 This module provides an interface to the Posix calls for tty I/O control.\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
25 For a complete description of these calls, see the Posix or Unix manual\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
26 pages. It is only available for those Unix versions that support Posix\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
27 termios style tty I/O control.\n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
28 \n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
29 All functions in this module take a file descriptor fd as their first\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
30 argument. This can be an integer file descriptor, such as returned by\n\ |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
31 sys.stdin.fileno(), or a file object, such as sys.stdin itself."; |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
33 static PyObject *TermiosError; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
34 |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
35 static int fdconv(PyObject* obj, void* p) |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
36 { |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
37 int fd; |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
38 |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
39 fd = PyObject_AsFileDescriptor(obj); |
|
17742
1a21dd13e60a
fdconv(): Do not second guess the error condition returned by
Fred Drake <fdrake@acm.org>
parents:
17732
diff
changeset
|
40 if (fd >= 0) { |
|
1a21dd13e60a
fdconv(): Do not second guess the error condition returned by
Fred Drake <fdrake@acm.org>
parents:
17732
diff
changeset
|
41 *(int*)p = fd; |
|
1a21dd13e60a
fdconv(): Do not second guess the error condition returned by
Fred Drake <fdrake@acm.org>
parents:
17732
diff
changeset
|
42 return 1; |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
43 } |
|
17742
1a21dd13e60a
fdconv(): Do not second guess the error condition returned by
Fred Drake <fdrake@acm.org>
parents:
17732
diff
changeset
|
44 return 0; |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
45 } |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
46 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
47 static char termios_tcgetattr__doc__[] = "\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
48 tcgetattr(fd) -> list_of_attrs\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
49 \n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
50 Get the tty attributes for file descriptor fd, as follows:\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
51 [iflag, oflag, cflag, lflag, ispeed, ospeed, cc] where cc is a list\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
52 of the tty special characters (each a string of length 1, except the items\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
53 with indices VMIN and VTIME, which are integers when these fields are\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
54 defined). The interpretation of the flags and the speeds as well as the\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
55 indexing in the cc array must be done using the symbolic constants defined\n\ |
|
17357
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
56 in this module."; |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
57 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
58 static PyObject * |
| 13501 | 59 termios_tcgetattr(PyObject *self, PyObject *args) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
60 { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
61 int fd; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
62 struct termios mode; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
63 PyObject *cc; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
64 speed_t ispeed, ospeed; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
65 PyObject *v; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
66 int i; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
67 char ch; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
68 |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
69 if (!PyArg_ParseTuple(args, "O&:tcgetattr", |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
70 fdconv, (void*)&fd)) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
71 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
72 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
73 if (tcgetattr(fd, &mode) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
74 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
75 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
76 ispeed = cfgetispeed(&mode); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
77 ospeed = cfgetospeed(&mode); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
78 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
79 cc = PyList_New(NCCS); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
80 if (cc == NULL) |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
81 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
82 for (i = 0; i < NCCS; i++) { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
83 ch = (char)mode.c_cc[i]; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
84 v = PyString_FromStringAndSize(&ch, 1); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
85 if (v == NULL) |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
86 goto err; |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
87 PyList_SetItem(cc, i, v); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
88 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
89 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
90 /* Convert the MIN and TIME slots to integer. On some systems, the |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
91 MIN and TIME slots are the same as the EOF and EOL slots. So we |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
92 only do this in noncanonical input mode. */ |
|
4653
3b7cd83b602d
Fix operator priority bug found thanks to gcc -Wall.
Guido van Rossum <guido@python.org>
parents:
1888
diff
changeset
|
93 if ((mode.c_lflag & ICANON) == 0) { |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
94 v = PyInt_FromLong((long)mode.c_cc[VMIN]); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
95 if (v == NULL) |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
96 goto err; |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
97 PyList_SetItem(cc, VMIN, v); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
98 v = PyInt_FromLong((long)mode.c_cc[VTIME]); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
99 if (v == NULL) |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
100 goto err; |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
101 PyList_SetItem(cc, VTIME, v); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
102 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
103 |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
104 if (!(v = PyList_New(7))) |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
105 goto err; |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
106 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
107 PyList_SetItem(v, 0, PyInt_FromLong((long)mode.c_iflag)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
108 PyList_SetItem(v, 1, PyInt_FromLong((long)mode.c_oflag)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
109 PyList_SetItem(v, 2, PyInt_FromLong((long)mode.c_cflag)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
110 PyList_SetItem(v, 3, PyInt_FromLong((long)mode.c_lflag)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
111 PyList_SetItem(v, 4, PyInt_FromLong((long)ispeed)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
112 PyList_SetItem(v, 5, PyInt_FromLong((long)ospeed)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
113 PyList_SetItem(v, 6, cc); |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
114 if (PyErr_Occurred()){ |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
115 Py_DECREF(v); |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
116 goto err; |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
117 } |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
118 return v; |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
119 err: |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
120 Py_DECREF(cc); |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
121 return NULL; |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
122 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
123 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
124 static char termios_tcsetattr__doc__[] = "\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
125 tcsetattr(fd, when, attributes) -> None\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
126 \n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
127 Set the tty attributes for file descriptor fd.\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
128 The attributes to be set are taken from the attributes argument, which\n\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
129 is a list like the one returned by tcgetattr(). The when argument\n\ |
|
17357
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
130 determines when the attributes are changed: termios.TCSANOW to\n\ |
|
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
131 change immediately, termios.TCSADRAIN to change after transmitting all\n\ |
|
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
132 queued output, or termios.TCSAFLUSH to change after transmitting all\n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
133 queued output and discarding all queued input. "; |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
134 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
135 static PyObject * |
| 13501 | 136 termios_tcsetattr(PyObject *self, PyObject *args) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
137 { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
138 int fd, when; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
139 struct termios mode; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
140 speed_t ispeed, ospeed; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
141 PyObject *term, *cc, *v; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
142 int i; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
143 |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
144 if (!PyArg_ParseTuple(args, "O&iO:tcsetattr", |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
145 fdconv, &fd, &when, &term)) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
146 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
147 if (!PyList_Check(term) || PyList_Size(term) != 7) { |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
148 PyErr_SetString(PyExc_TypeError, |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
149 "tcsetattr, arg 3: must be 7 element list"); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
150 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
151 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
152 |
|
8494
fc29625df532
In tcsetattr(), first initialize the mode structure by calling
Guido van Rossum <guido@python.org>
parents:
7531
diff
changeset
|
153 /* Get the old mode, in case there are any hidden fields... */ |
|
fc29625df532
In tcsetattr(), first initialize the mode structure by calling
Guido van Rossum <guido@python.org>
parents:
7531
diff
changeset
|
154 if (tcgetattr(fd, &mode) == -1) |
|
fc29625df532
In tcsetattr(), first initialize the mode structure by calling
Guido van Rossum <guido@python.org>
parents:
7531
diff
changeset
|
155 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
156 mode.c_iflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 0)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
157 mode.c_oflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 1)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
158 mode.c_cflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 2)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
159 mode.c_lflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 3)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
160 ispeed = (speed_t) PyInt_AsLong(PyList_GetItem(term, 4)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
161 ospeed = (speed_t) PyInt_AsLong(PyList_GetItem(term, 5)); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
162 cc = PyList_GetItem(term, 6); |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
163 if (PyErr_Occurred()) |
|
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
164 return NULL; |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
165 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
166 if (!PyList_Check(cc) || PyList_Size(cc) != NCCS) { |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
167 PyErr_Format(PyExc_TypeError, |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
168 "tcsetattr: attributes[6] must be %d element list", |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
169 NCCS); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
170 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
171 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
172 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
173 for (i = 0; i < NCCS; i++) { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
174 v = PyList_GetItem(cc, i); |
|
4928
9be65e6c35c8
The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents:
4653
diff
changeset
|
175 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
176 if (PyString_Check(v) && PyString_Size(v) == 1) |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
177 mode.c_cc[i] = (cc_t) * PyString_AsString(v); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
178 else if (PyInt_Check(v)) |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
179 mode.c_cc[i] = (cc_t) PyInt_AsLong(v); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
180 else { |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
181 PyErr_SetString(PyExc_TypeError, |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
182 "tcsetattr: elements of attributes must be characters or integers"); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
183 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
184 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
185 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
186 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
187 if (cfsetispeed(&mode, (speed_t) ispeed) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
188 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
189 if (cfsetospeed(&mode, (speed_t) ospeed) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
190 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
191 if (tcsetattr(fd, when, &mode) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
192 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
193 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
194 Py_INCREF(Py_None); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
195 return Py_None; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
196 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
197 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
198 static char termios_tcsendbreak__doc__[] = "\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
199 tcsendbreak(fd, duration) -> None\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
200 \n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
201 Send a break on file descriptor fd.\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
202 A zero duration sends a break for 0.25-0.5 seconds; a nonzero duration\n\ |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
203 has a system dependent meaning."; |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
204 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
205 static PyObject * |
| 13501 | 206 termios_tcsendbreak(PyObject *self, PyObject *args) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
207 { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
208 int fd, duration; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
209 |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
210 if (!PyArg_ParseTuple(args, "O&i:tcsendbreak", |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
211 fdconv, &fd, &duration)) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
212 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
213 if (tcsendbreak(fd, duration) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
214 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
215 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
216 Py_INCREF(Py_None); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
217 return Py_None; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
218 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
219 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
220 static char termios_tcdrain__doc__[] = "\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
221 tcdrain(fd) -> None\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
222 \n\ |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
223 Wait until all output written to file descriptor fd has been transmitted."; |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
224 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
225 static PyObject * |
| 13501 | 226 termios_tcdrain(PyObject *self, PyObject *args) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
227 { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
228 int fd; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
229 |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
230 if (!PyArg_ParseTuple(args, "O&:tcdrain", |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
231 fdconv, &fd)) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
232 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
233 if (tcdrain(fd) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
234 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
235 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
236 Py_INCREF(Py_None); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
237 return Py_None; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
238 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
239 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
240 static char termios_tcflush__doc__[] = "\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
241 tcflush(fd, queue) -> None\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
242 \n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
243 Discard queued data on file descriptor fd.\n\ |
|
17357
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
244 The queue selector specifies which queue: termios.TCIFLUSH for the input\n\ |
|
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
245 queue, termios.TCOFLUSH for the output queue, or termios.TCIOFLUSH for\n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
246 both queues. "; |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
247 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
248 static PyObject * |
| 13501 | 249 termios_tcflush(PyObject *self, PyObject *args) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
250 { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
251 int fd, queue; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
252 |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
253 if (!PyArg_ParseTuple(args, "O&i:tcflush", |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
254 fdconv, &fd, &queue)) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
255 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
256 if (tcflush(fd, queue) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
257 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
258 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
259 Py_INCREF(Py_None); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
260 return Py_None; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
261 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
262 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
263 static char termios_tcflow__doc__[] = "\ |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
264 tcflow(fd, action) -> None\n\ |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
265 \n\ |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
266 Suspend or resume input or output on file descriptor fd.\n\ |
|
17357
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
267 The action argument can be termios.TCOOFF to suspend output,\n\ |
|
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
268 termios.TCOON to restart output, termios.TCIOFF to suspend input,\n\ |
|
cc8a21ba6449
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17319
diff
changeset
|
269 or termios.TCION to restart input."; |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
270 |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
271 static PyObject * |
| 13501 | 272 termios_tcflow(PyObject *self, PyObject *args) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
273 { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
274 int fd, action; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
275 |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
276 if (!PyArg_ParseTuple(args, "O&i:tcflow", |
|
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
277 fdconv, &fd, &action)) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
278 return NULL; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
279 if (tcflow(fd, action) == -1) |
|
5827
a79d0cef10a1
Add 'return' keyword before error calls.
Guido van Rossum <guido@python.org>
parents:
4928
diff
changeset
|
280 return PyErr_SetFromErrno(TermiosError); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
281 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
282 Py_INCREF(Py_None); |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
283 return Py_None; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
284 } |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
285 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
286 static PyMethodDef termios_methods[] = |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
287 { |
|
13820
8bd82cf361aa
Use METH_OLDARGS instead of numeric constant 0 in method def. tables
Andrew M. Kuchling <amk@amk.ca>
parents:
13651
diff
changeset
|
288 {"tcgetattr", termios_tcgetattr, |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
289 METH_VARARGS, termios_tcgetattr__doc__}, |
|
13820
8bd82cf361aa
Use METH_OLDARGS instead of numeric constant 0 in method def. tables
Andrew M. Kuchling <amk@amk.ca>
parents:
13651
diff
changeset
|
290 {"tcsetattr", termios_tcsetattr, |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
291 METH_VARARGS, termios_tcsetattr__doc__}, |
|
13820
8bd82cf361aa
Use METH_OLDARGS instead of numeric constant 0 in method def. tables
Andrew M. Kuchling <amk@amk.ca>
parents:
13651
diff
changeset
|
292 {"tcsendbreak", termios_tcsendbreak, |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
293 METH_VARARGS, termios_tcsendbreak__doc__}, |
|
13820
8bd82cf361aa
Use METH_OLDARGS instead of numeric constant 0 in method def. tables
Andrew M. Kuchling <amk@amk.ca>
parents:
13651
diff
changeset
|
294 {"tcdrain", termios_tcdrain, |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
295 METH_VARARGS, termios_tcdrain__doc__}, |
|
13820
8bd82cf361aa
Use METH_OLDARGS instead of numeric constant 0 in method def. tables
Andrew M. Kuchling <amk@amk.ca>
parents:
13651
diff
changeset
|
296 {"tcflush", termios_tcflush, |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
297 METH_VARARGS, termios_tcflush__doc__}, |
|
13820
8bd82cf361aa
Use METH_OLDARGS instead of numeric constant 0 in method def. tables
Andrew M. Kuchling <amk@amk.ca>
parents:
13651
diff
changeset
|
298 {"tcflow", termios_tcflow, |
|
17697
f970195196c4
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
17419
diff
changeset
|
299 METH_VARARGS, termios_tcflow__doc__}, |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
300 {NULL, NULL} |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
301 }; |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
302 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
303 |
|
16913
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
304 #if defined(VSWTCH) && !defined(VSWTC) |
|
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
305 #define VSWTC VSWTCH |
|
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
306 #endif |
|
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
307 |
|
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
308 #if defined(VSWTC) && !defined(VSWTCH) |
|
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
309 #define VSWTCH VSWTC |
|
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
310 #endif |
|
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
311 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
312 static struct constant { |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
313 char *name; |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
314 long value; |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
315 } termios_constants[] = { |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
316 /* cfgetospeed(), cfsetospeed() constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
317 {"B0", B0}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
318 {"B50", B50}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
319 {"B75", B75}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
320 {"B110", B110}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
321 {"B134", B134}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
322 {"B150", B150}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
323 {"B200", B200}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
324 {"B300", B300}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
325 {"B600", B600}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
326 {"B1200", B1200}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
327 {"B1800", B1800}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
328 {"B2400", B2400}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
329 {"B4800", B4800}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
330 {"B9600", B9600}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
331 {"B19200", B19200}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
332 {"B38400", B38400}, |
|
17419
3fadc37cfa92
Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents:
17357
diff
changeset
|
333 #ifdef B57600 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
334 {"B57600", B57600}, |
|
17419
3fadc37cfa92
Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents:
17357
diff
changeset
|
335 #endif |
|
3fadc37cfa92
Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents:
17357
diff
changeset
|
336 #ifdef B115200 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
337 {"B115200", B115200}, |
|
17419
3fadc37cfa92
Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents:
17357
diff
changeset
|
338 #endif |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
339 #ifdef B230400 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
340 {"B230400", B230400}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
341 #endif |
|
16913
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
342 #ifdef CBAUDEX |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
343 {"CBAUDEX", CBAUDEX}, |
|
16913
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
344 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
345 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
346 /* tcsetattr() constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
347 {"TCSANOW", TCSANOW}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
348 {"TCSADRAIN", TCSADRAIN}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
349 {"TCSAFLUSH", TCSAFLUSH}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
350 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
351 /* tcflush() constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
352 {"TCIFLUSH", TCIFLUSH}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
353 {"TCOFLUSH", TCOFLUSH}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
354 {"TCIOFLUSH", TCIOFLUSH}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
355 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
356 /* tcflow() constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
357 {"TCOOFF", TCOOFF}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
358 {"TCOON", TCOON}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
359 {"TCIOFF", TCIOFF}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
360 {"TCION", TCION}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
361 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
362 /* struct termios.c_iflag constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
363 {"IGNBRK", IGNBRK}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
364 {"BRKINT", BRKINT}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
365 {"IGNPAR", IGNPAR}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
366 {"PARMRK", PARMRK}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
367 {"INPCK", INPCK}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
368 {"ISTRIP", ISTRIP}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
369 {"INLCR", INLCR}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
370 {"IGNCR", IGNCR}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
371 {"ICRNL", ICRNL}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
372 #ifdef IUCLC |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
373 {"IUCLC", IUCLC}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
374 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
375 {"IXON", IXON}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
376 {"IXANY", IXANY}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
377 {"IXOFF", IXOFF}, |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
378 #ifdef IMAXBEL |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
379 {"IMAXBEL", IMAXBEL}, |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
380 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
381 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
382 /* struct termios.c_oflag constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
383 {"OPOST", OPOST}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
384 #ifdef OLCUC |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
385 {"OLCUC", OLCUC}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
386 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
387 {"ONLCR", ONLCR}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
388 #ifdef OCRNL |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
389 {"OCRNL", OCRNL}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
390 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
391 #ifdef ONOCR |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
392 {"ONOCR", ONOCR}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
393 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
394 #ifdef ONLRET |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
395 {"ONLRET", ONLRET}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
396 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
397 #ifdef OFILL |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
398 {"OFILL", OFILL}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
399 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
400 #ifdef OFDEL |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
401 {"OFDEL", OFDEL}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
402 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
403 #ifdef NLDLY |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
404 {"NLDLY", NLDLY}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
405 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
406 #ifdef CRDLY |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
407 {"CRDLY", CRDLY}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
408 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
409 #ifdef TABDLY |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
410 {"TABDLY", TABDLY}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
411 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
412 #ifdef BSDLY |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
413 {"BSDLY", BSDLY}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
414 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
415 #ifdef VTDLY |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
416 {"VTDLY", VTDLY}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
417 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
418 #ifdef FFDLY |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
419 {"FFDLY", FFDLY}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
420 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
421 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
422 /* struct termios.c_oflag-related values (delay mask) */ |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
423 #ifdef NL0 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
424 {"NL0", NL0}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
425 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
426 #ifdef NL1 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
427 {"NL1", NL1}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
428 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
429 #ifdef CR0 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
430 {"CR0", CR0}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
431 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
432 #ifdef CR1 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
433 {"CR1", CR1}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
434 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
435 #ifdef CR2 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
436 {"CR2", CR2}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
437 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
438 #ifdef CR3 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
439 {"CR3", CR3}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
440 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
441 #ifdef TAB0 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
442 {"TAB0", TAB0}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
443 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
444 #ifdef TAB1 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
445 {"TAB1", TAB1}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
446 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
447 #ifdef TAB2 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
448 {"TAB2", TAB2}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
449 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
450 #ifdef TAB3 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
451 {"TAB3", TAB3}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
452 #endif |
|
16952
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
453 #ifdef XTABS |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
454 {"XTABS", XTABS}, |
|
16952
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
455 #endif |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
456 #ifdef BS0 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
457 {"BS0", BS0}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
458 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
459 #ifdef BS1 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
460 {"BS1", BS1}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
461 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
462 #ifdef VT0 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
463 {"VT0", VT0}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
464 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
465 #ifdef VT1 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
466 {"VT1", VT1}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
467 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
468 #ifdef FF0 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
469 {"FF0", FF0}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
470 #endif |
|
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
471 #ifdef FF1 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
472 {"FF1", FF1}, |
|
16975
a79ebba6466a
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents:
16952
diff
changeset
|
473 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
474 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
475 /* struct termios.c_cflag constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
476 {"CSIZE", CSIZE}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
477 {"CSTOPB", CSTOPB}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
478 {"CREAD", CREAD}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
479 {"PARENB", PARENB}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
480 {"PARODD", PARODD}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
481 {"HUPCL", HUPCL}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
482 {"CLOCAL", CLOCAL}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
483 #ifdef CIBAUD |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
484 {"CIBAUD", CIBAUD}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
485 #endif |
|
16952
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
486 #ifdef CRTSCTS |
|
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
487 {"CRTSCTS", (long)CRTSCTS}, |
|
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
488 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
489 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
490 /* struct termios.c_cflag-related values (character size) */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
491 {"CS5", CS5}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
492 {"CS6", CS6}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
493 {"CS7", CS7}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
494 {"CS8", CS8}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
495 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
496 /* struct termios.c_lflag constants */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
497 {"ISIG", ISIG}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
498 {"ICANON", ICANON}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
499 #ifdef XCASE |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
500 {"XCASE", XCASE}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
501 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
502 {"ECHO", ECHO}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
503 {"ECHOE", ECHOE}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
504 {"ECHOK", ECHOK}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
505 {"ECHONL", ECHONL}, |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
506 #ifdef ECHOCTL |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
507 {"ECHOCTL", ECHOCTL}, |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
508 #endif |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
509 #ifdef ECHOPRT |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
510 {"ECHOPRT", ECHOPRT}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
511 #endif |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
512 #ifdef ECHOKE |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
513 {"ECHOKE", ECHOKE}, |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
514 #endif |
|
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
515 #ifdef FLUSHO |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
516 {"FLUSHO", FLUSHO}, |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
517 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
518 {"NOFLSH", NOFLSH}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
519 {"TOSTOP", TOSTOP}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
520 #ifdef PENDIN |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
521 {"PENDIN", PENDIN}, |
|
16886
68ce32861626
Revised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake <fdrake@acm.org>
parents:
16806
diff
changeset
|
522 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
523 {"IEXTEN", IEXTEN}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
524 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
525 /* indexes into the control chars array returned by tcgetattr() */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
526 {"VINTR", VINTR}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
527 {"VQUIT", VQUIT}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
528 {"VERASE", VERASE}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
529 {"VKILL", VKILL}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
530 {"VEOF", VEOF}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
531 {"VTIME", VTIME}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
532 {"VMIN", VMIN}, |
|
16952
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
533 #ifdef VSWTC |
|
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
534 /* The #defines above ensure that if either is defined, both are, |
|
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
535 * but both may be omitted by the system headers. ;-( */ |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
536 {"VSWTC", VSWTC}, |
|
16913
f07fa7f5262a
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents:
16886
diff
changeset
|
537 {"VSWTCH", VSWTCH}, |
|
16952
832e40909ef4
Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents:
16913
diff
changeset
|
538 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
539 {"VSTART", VSTART}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
540 {"VSTOP", VSTOP}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
541 {"VSUSP", VSUSP}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
542 {"VEOL", VEOL}, |
|
17905
0a7af0e538d4
Correct the sense of a couple of conditional compilations -- used #ifndef
Fred Drake <fdrake@acm.org>
parents:
17788
diff
changeset
|
543 #ifdef VREPRINT |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
544 {"VREPRINT", VREPRINT}, |
|
17788
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
545 #endif |
|
17905
0a7af0e538d4
Correct the sense of a couple of conditional compilations -- used #ifndef
Fred Drake <fdrake@acm.org>
parents:
17788
diff
changeset
|
546 #ifdef VDISCARD |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
547 {"VDISCARD", VDISCARD}, |
|
17788
479ea69ec85b
Include sys/modem.h if we have it; this is needed on HP-UX to provide
Fred Drake <fdrake@acm.org>
parents:
17742
diff
changeset
|
548 #endif |
|
18076
90193750cc83
Protect the use of the VWERASE symbol by an #ifdef, it's apparently missing
Thomas Wouters <thomas@python.org>
parents:
17905
diff
changeset
|
549 #ifdef VWERASE |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
550 {"VWERASE", VWERASE}, |
|
18076
90193750cc83
Protect the use of the VWERASE symbol by an #ifdef, it's apparently missing
Thomas Wouters <thomas@python.org>
parents:
17905
diff
changeset
|
551 #endif |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
552 #ifdef VLNEXT |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
553 {"VLNEXT", VLNEXT}, |
|
18124
1f1364806599
Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents:
18076
diff
changeset
|
554 #endif |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
555 {"VEOL2", VEOL2}, |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
556 |
|
17226
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
557 |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
558 #ifdef B460800 |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
559 {"B460800", B460800}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
560 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
561 #ifdef CBAUD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
562 {"CBAUD", CBAUD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
563 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
564 #ifdef CDEL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
565 {"CDEL", CDEL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
566 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
567 #ifdef CDSUSP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
568 {"CDSUSP", CDSUSP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
569 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
570 #ifdef CEOF |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
571 {"CEOF", CEOF}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
572 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
573 #ifdef CEOL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
574 {"CEOL", CEOL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
575 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
576 #ifdef CEOL2 |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
577 {"CEOL2", CEOL2}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
578 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
579 #ifdef CEOT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
580 {"CEOT", CEOT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
581 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
582 #ifdef CERASE |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
583 {"CERASE", CERASE}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
584 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
585 #ifdef CESC |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
586 {"CESC", CESC}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
587 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
588 #ifdef CFLUSH |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
589 {"CFLUSH", CFLUSH}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
590 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
591 #ifdef CINTR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
592 {"CINTR", CINTR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
593 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
594 #ifdef CKILL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
595 {"CKILL", CKILL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
596 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
597 #ifdef CLNEXT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
598 {"CLNEXT", CLNEXT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
599 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
600 #ifdef CNUL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
601 {"CNUL", CNUL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
602 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
603 #ifdef COMMON |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
604 {"COMMON", COMMON}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
605 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
606 #ifdef CQUIT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
607 {"CQUIT", CQUIT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
608 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
609 #ifdef CRPRNT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
610 {"CRPRNT", CRPRNT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
611 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
612 #ifdef CSTART |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
613 {"CSTART", CSTART}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
614 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
615 #ifdef CSTOP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
616 {"CSTOP", CSTOP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
617 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
618 #ifdef CSUSP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
619 {"CSUSP", CSUSP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
620 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
621 #ifdef CSWTCH |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
622 {"CSWTCH", CSWTCH}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
623 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
624 #ifdef CWERASE |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
625 {"CWERASE", CWERASE}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
626 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
627 #ifdef EXTA |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
628 {"EXTA", EXTA}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
629 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
630 #ifdef EXTB |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
631 {"EXTB", EXTB}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
632 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
633 #ifdef FIOASYNC |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
634 {"FIOASYNC", FIOASYNC}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
635 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
636 #ifdef FIOCLEX |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
637 {"FIOCLEX", FIOCLEX}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
638 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
639 #ifdef FIONBIO |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
640 {"FIONBIO", FIONBIO}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
641 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
642 #ifdef FIONCLEX |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
643 {"FIONCLEX", FIONCLEX}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
644 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
645 #ifdef FIONREAD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
646 {"FIONREAD", FIONREAD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
647 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
648 #ifdef IBSHIFT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
649 {"IBSHIFT", IBSHIFT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
650 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
651 #ifdef INIT_C_CC |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
652 {"INIT_C_CC", INIT_C_CC}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
653 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
654 #ifdef IOCSIZE_MASK |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
655 {"IOCSIZE_MASK", IOCSIZE_MASK}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
656 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
657 #ifdef IOCSIZE_SHIFT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
658 {"IOCSIZE_SHIFT", IOCSIZE_SHIFT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
659 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
660 #ifdef NCC |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
661 {"NCC", NCC}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
662 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
663 #ifdef NCCS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
664 {"NCCS", NCCS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
665 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
666 #ifdef NSWTCH |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
667 {"NSWTCH", NSWTCH}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
668 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
669 #ifdef N_MOUSE |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
670 {"N_MOUSE", N_MOUSE}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
671 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
672 #ifdef N_PPP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
673 {"N_PPP", N_PPP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
674 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
675 #ifdef N_SLIP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
676 {"N_SLIP", N_SLIP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
677 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
678 #ifdef N_STRIP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
679 {"N_STRIP", N_STRIP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
680 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
681 #ifdef N_TTY |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
682 {"N_TTY", N_TTY}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
683 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
684 #ifdef TCFLSH |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
685 {"TCFLSH", TCFLSH}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
686 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
687 #ifdef TCGETA |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
688 {"TCGETA", TCGETA}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
689 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
690 #ifdef TCGETS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
691 {"TCGETS", TCGETS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
692 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
693 #ifdef TCSBRK |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
694 {"TCSBRK", TCSBRK}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
695 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
696 #ifdef TCSBRKP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
697 {"TCSBRKP", TCSBRKP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
698 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
699 #ifdef TCSETA |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
700 {"TCSETA", TCSETA}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
701 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
702 #ifdef TCSETAF |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
703 {"TCSETAF", TCSETAF}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
704 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
705 #ifdef TCSETAW |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
706 {"TCSETAW", TCSETAW}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
707 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
708 #ifdef TCSETS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
709 {"TCSETS", TCSETS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
710 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
711 #ifdef TCSETSF |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
712 {"TCSETSF", TCSETSF}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
713 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
714 #ifdef TCSETSW |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
715 {"TCSETSW", TCSETSW}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
716 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
717 #ifdef TCXONC |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
718 {"TCXONC", TCXONC}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
719 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
720 #ifdef TIOCCONS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
721 {"TIOCCONS", TIOCCONS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
722 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
723 #ifdef TIOCEXCL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
724 {"TIOCEXCL", TIOCEXCL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
725 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
726 #ifdef TIOCGETD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
727 {"TIOCGETD", TIOCGETD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
728 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
729 #ifdef TIOCGICOUNT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
730 {"TIOCGICOUNT", TIOCGICOUNT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
731 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
732 #ifdef TIOCGLCKTRMIOS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
733 {"TIOCGLCKTRMIOS", TIOCGLCKTRMIOS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
734 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
735 #ifdef TIOCGPGRP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
736 {"TIOCGPGRP", TIOCGPGRP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
737 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
738 #ifdef TIOCGSERIAL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
739 {"TIOCGSERIAL", TIOCGSERIAL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
740 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
741 #ifdef TIOCGSOFTCAR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
742 {"TIOCGSOFTCAR", TIOCGSOFTCAR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
743 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
744 #ifdef TIOCGWINSZ |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
745 {"TIOCGWINSZ", TIOCGWINSZ}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
746 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
747 #ifdef TIOCINQ |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
748 {"TIOCINQ", TIOCINQ}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
749 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
750 #ifdef TIOCLINUX |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
751 {"TIOCLINUX", TIOCLINUX}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
752 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
753 #ifdef TIOCMBIC |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
754 {"TIOCMBIC", TIOCMBIC}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
755 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
756 #ifdef TIOCMBIS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
757 {"TIOCMBIS", TIOCMBIS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
758 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
759 #ifdef TIOCMGET |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
760 {"TIOCMGET", TIOCMGET}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
761 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
762 #ifdef TIOCMIWAIT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
763 {"TIOCMIWAIT", TIOCMIWAIT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
764 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
765 #ifdef TIOCMSET |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
766 {"TIOCMSET", TIOCMSET}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
767 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
768 #ifdef TIOCM_CAR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
769 {"TIOCM_CAR", TIOCM_CAR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
770 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
771 #ifdef TIOCM_CD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
772 {"TIOCM_CD", TIOCM_CD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
773 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
774 #ifdef TIOCM_CTS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
775 {"TIOCM_CTS", TIOCM_CTS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
776 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
777 #ifdef TIOCM_DSR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
778 {"TIOCM_DSR", TIOCM_DSR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
779 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
780 #ifdef TIOCM_DTR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
781 {"TIOCM_DTR", TIOCM_DTR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
782 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
783 #ifdef TIOCM_LE |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
784 {"TIOCM_LE", TIOCM_LE}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
785 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
786 #ifdef TIOCM_RI |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
787 {"TIOCM_RI", TIOCM_RI}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
788 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
789 #ifdef TIOCM_RNG |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
790 {"TIOCM_RNG", TIOCM_RNG}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
791 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
792 #ifdef TIOCM_RTS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
793 {"TIOCM_RTS", TIOCM_RTS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
794 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
795 #ifdef TIOCM_SR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
796 {"TIOCM_SR", TIOCM_SR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
797 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
798 #ifdef TIOCM_ST |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
799 {"TIOCM_ST", TIOCM_ST}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
800 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
801 #ifdef TIOCNOTTY |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
802 {"TIOCNOTTY", TIOCNOTTY}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
803 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
804 #ifdef TIOCNXCL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
805 {"TIOCNXCL", TIOCNXCL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
806 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
807 #ifdef TIOCOUTQ |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
808 {"TIOCOUTQ", TIOCOUTQ}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
809 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
810 #ifdef TIOCPKT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
811 {"TIOCPKT", TIOCPKT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
812 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
813 #ifdef TIOCPKT_DATA |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
814 {"TIOCPKT_DATA", TIOCPKT_DATA}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
815 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
816 #ifdef TIOCPKT_DOSTOP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
817 {"TIOCPKT_DOSTOP", TIOCPKT_DOSTOP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
818 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
819 #ifdef TIOCPKT_FLUSHREAD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
820 {"TIOCPKT_FLUSHREAD", TIOCPKT_FLUSHREAD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
821 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
822 #ifdef TIOCPKT_FLUSHWRITE |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
823 {"TIOCPKT_FLUSHWRITE", TIOCPKT_FLUSHWRITE}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
824 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
825 #ifdef TIOCPKT_NOSTOP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
826 {"TIOCPKT_NOSTOP", TIOCPKT_NOSTOP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
827 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
828 #ifdef TIOCPKT_START |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
829 {"TIOCPKT_START", TIOCPKT_START}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
830 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
831 #ifdef TIOCPKT_STOP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
832 {"TIOCPKT_STOP", TIOCPKT_STOP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
833 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
834 #ifdef TIOCSCTTY |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
835 {"TIOCSCTTY", TIOCSCTTY}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
836 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
837 #ifdef TIOCSERCONFIG |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
838 {"TIOCSERCONFIG", TIOCSERCONFIG}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
839 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
840 #ifdef TIOCSERGETLSR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
841 {"TIOCSERGETLSR", TIOCSERGETLSR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
842 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
843 #ifdef TIOCSERGETMULTI |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
844 {"TIOCSERGETMULTI", TIOCSERGETMULTI}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
845 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
846 #ifdef TIOCSERGSTRUCT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
847 {"TIOCSERGSTRUCT", TIOCSERGSTRUCT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
848 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
849 #ifdef TIOCSERGWILD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
850 {"TIOCSERGWILD", TIOCSERGWILD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
851 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
852 #ifdef TIOCSERSETMULTI |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
853 {"TIOCSERSETMULTI", TIOCSERSETMULTI}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
854 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
855 #ifdef TIOCSERSWILD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
856 {"TIOCSERSWILD", TIOCSERSWILD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
857 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
858 #ifdef TIOCSER_TEMT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
859 {"TIOCSER_TEMT", TIOCSER_TEMT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
860 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
861 #ifdef TIOCSETD |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
862 {"TIOCSETD", TIOCSETD}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
863 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
864 #ifdef TIOCSLCKTRMIOS |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
865 {"TIOCSLCKTRMIOS", TIOCSLCKTRMIOS}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
866 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
867 #ifdef TIOCSPGRP |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
868 {"TIOCSPGRP", TIOCSPGRP}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
869 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
870 #ifdef TIOCSSERIAL |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
871 {"TIOCSSERIAL", TIOCSSERIAL}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
872 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
873 #ifdef TIOCSSOFTCAR |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
874 {"TIOCSSOFTCAR", TIOCSSOFTCAR}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
875 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
876 #ifdef TIOCSTI |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
877 {"TIOCSTI", TIOCSTI}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
878 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
879 #ifdef TIOCSWINSZ |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
880 {"TIOCSWINSZ", TIOCSWINSZ}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
881 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
882 #ifdef TIOCTTYGSTRUCT |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
883 {"TIOCTTYGSTRUCT", TIOCTTYGSTRUCT}, |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
884 #endif |
|
02a4b0cfc57e
Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents:
16975
diff
changeset
|
885 |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
886 /* sentinel */ |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
887 {NULL, 0} |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
888 }; |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
889 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
890 |
|
9588
38023a425e48
Add DL_EXPORT() to all modules that could possibly be used
Guido van Rossum <guido@python.org>
parents:
8823
diff
changeset
|
891 DL_EXPORT(void) |
|
13651
8a063423e0b7
Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
Thomas Wouters <thomas@python.org>
parents:
13501
diff
changeset
|
892 PyInit_termios(void) |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
893 { |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
894 PyObject *m, *d; |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
895 struct constant *constant = termios_constants; |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
896 |
|
7531
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
897 m = Py_InitModule4("termios", termios_methods, termios__doc__, |
|
b4660ad7dc41
Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents:
6367
diff
changeset
|
898 (PyObject *)NULL, PYTHON_API_VERSION); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
899 |
|
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
900 d = PyModule_GetDict(m); |
|
6367
2c29b8982643
Apply two changes, systematically:
Guido van Rossum <guido@python.org>
parents:
5827
diff
changeset
|
901 TermiosError = PyErr_NewException("termios.error", NULL, NULL); |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
902 PyDict_SetItemString(d, "error", TermiosError); |
|
16806
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
903 |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
904 while (constant->name != NULL) { |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
905 PyModule_AddIntConstant(m, constant->name, constant->value); |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
906 ++constant; |
|
b2585d8fdb8b
Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents:
13820
diff
changeset
|
907 } |
|
1879
91bfb2771554
Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
908 } |
