annotate Modules/termios.c @ 79691:05c8928362ee

Merge __next__ method link fixes with 3.3.
author Ezio Melotti <ezio.melotti@gmail.com>
date Fri, 12 Oct 2012 13:46:37 +0300
parents 15b090c9442a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
30819
9d8acdb58f9c Patch #787189: Explicitly define CTRL on SGI.
Martin v. Löwis <martin@v.loewis.de>
parents: 29246
diff changeset
5 /* Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE
9d8acdb58f9c Patch #787189: Explicitly define CTRL on SGI.
Martin v. Löwis <martin@v.loewis.de>
parents: 29246
diff changeset
6 is defined, so we define it here. */
9d8acdb58f9c Patch #787189: Explicitly define CTRL on SGI.
Martin v. Löwis <martin@v.loewis.de>
parents: 29246
diff changeset
7 #if defined(__sgi)
9d8acdb58f9c Patch #787189: Explicitly define CTRL on SGI.
Martin v. Löwis <martin@v.loewis.de>
parents: 29246
diff changeset
8 #define CTRL(c) ((c)&037)
9d8acdb58f9c Patch #787189: Explicitly define CTRL on SGI.
Martin v. Löwis <martin@v.loewis.de>
parents: 29246
diff changeset
9 #endif
9d8acdb58f9c Patch #787189: Explicitly define CTRL on SGI.
Martin v. Löwis <martin@v.loewis.de>
parents: 29246
diff changeset
10
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 #include <termios.h>
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
12 #include <sys/ioctl.h>
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
13
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
14 /* 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
15 * 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
16 * 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
17 */
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 #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
19 #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
20 #endif
29246
39b871678467 Get test_ioctl to pass on HPUX 11.
Neal Norwitz <nnorwitz@gmail.com>
parents: 24471
diff changeset
21 /* HP-UX requires that this be included to pick up TIOCGPGRP and friends */
39b871678467 Get test_ioctl to pass on HPUX 11.
Neal Norwitz <nnorwitz@gmail.com>
parents: 24471
diff changeset
22 #ifdef HAVE_SYS_BSDTTY_H
39b871678467 Get test_ioctl to pass on HPUX 11.
Neal Norwitz <nnorwitz@gmail.com>
parents: 24471
diff changeset
23 #include <sys/bsdtty.h>
39b871678467 Get test_ioctl to pass on HPUX 11.
Neal Norwitz <nnorwitz@gmail.com>
parents: 24471
diff changeset
24 #endif
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
25
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
26 PyDoc_STRVAR(termios__doc__,
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
27 "This module provides an interface to the Posix calls for tty I/O control.\n\
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
28 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
29 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
30 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
31 \n\
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
32 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
33 argument. This can be an integer file descriptor, such as returned by\n\
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
34 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
35
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
36 static PyObject *TermiosError;
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
37
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
38 static int fdconv(PyObject* obj, void* p)
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
39 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
40 int fd;
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
41
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
42 fd = PyObject_AsFileDescriptor(obj);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
43 if (fd >= 0) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
44 *(int*)p = fd;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
45 return 1;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
46 }
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
47 return 0;
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
48 }
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
49
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
50 PyDoc_STRVAR(termios_tcgetattr__doc__,
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
51 "tcgetattr(fd) -> list_of_attrs\n\
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
52 \n\
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
53 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
54 [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
55 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
56 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
57 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
58 indexing in the cc array must be done using the symbolic constants defined\n\
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
59 in this module.");
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
60
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
61 static PyObject *
13501
ca32ff7a067e ANSI-fication
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 9887
diff changeset
62 termios_tcgetattr(PyObject *self, PyObject *args)
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
63 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
64 int fd;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
65 struct termios mode;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
66 PyObject *cc;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
67 speed_t ispeed, ospeed;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
68 PyObject *v;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
69 int i;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
70 char ch;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
71
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
72 if (!PyArg_ParseTuple(args, "O&:tcgetattr",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
73 fdconv, (void*)&fd))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
74 return NULL;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
75
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
76 if (tcgetattr(fd, &mode) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
77 return PyErr_SetFromErrno(TermiosError);
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
78
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
79 ispeed = cfgetispeed(&mode);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
80 ospeed = cfgetospeed(&mode);
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
81
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
82 cc = PyList_New(NCCS);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
83 if (cc == NULL)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
84 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
85 for (i = 0; i < NCCS; i++) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
86 ch = (char)mode.c_cc[i];
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
87 v = PyBytes_FromStringAndSize(&ch, 1);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
88 if (v == NULL)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
89 goto err;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
90 PyList_SetItem(cc, i, v);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
91 }
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
92
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
93 /* Convert the MIN and TIME slots to integer. On some systems, the
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
94 MIN and TIME slots are the same as the EOF and EOL slots. So we
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
95 only do this in noncanonical input mode. */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
96 if ((mode.c_lflag & ICANON) == 0) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
97 v = PyLong_FromLong((long)mode.c_cc[VMIN]);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
98 if (v == NULL)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
99 goto err;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
100 PyList_SetItem(cc, VMIN, v);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
101 v = PyLong_FromLong((long)mode.c_cc[VTIME]);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
102 if (v == NULL)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
103 goto err;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
104 PyList_SetItem(cc, VTIME, v);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
105 }
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
106
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
107 if (!(v = PyList_New(7)))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
108 goto err;
4928
9be65e6c35c8 The usual return-value and memory management checks. I'm not planning
Barry Warsaw <barry@python.org>
parents: 4653
diff changeset
109
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
110 PyList_SetItem(v, 0, PyLong_FromLong((long)mode.c_iflag));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
111 PyList_SetItem(v, 1, PyLong_FromLong((long)mode.c_oflag));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
112 PyList_SetItem(v, 2, PyLong_FromLong((long)mode.c_cflag));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
113 PyList_SetItem(v, 3, PyLong_FromLong((long)mode.c_lflag));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
114 PyList_SetItem(v, 4, PyLong_FromLong((long)ispeed));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
115 PyList_SetItem(v, 5, PyLong_FromLong((long)ospeed));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
116 PyList_SetItem(v, 6, cc);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
117 if (PyErr_Occurred()){
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
118 Py_DECREF(v);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
119 goto err;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
120 }
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
121 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
122 err:
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
123 Py_DECREF(cc);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
124 return NULL;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
125 }
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
126
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
127 PyDoc_STRVAR(termios_tcsetattr__doc__,
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
128 "tcsetattr(fd, when, attributes) -> None\n\
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
129 \n\
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
130 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
131 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
132 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
133 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
134 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
135 queued output, or termios.TCSAFLUSH to change after transmitting all\n\
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
136 queued output and discarding all queued input. ");
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
137
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
138 static PyObject *
13501
ca32ff7a067e ANSI-fication
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 9887
diff changeset
139 termios_tcsetattr(PyObject *self, PyObject *args)
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
140 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
141 int fd, when;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
142 struct termios mode;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
143 speed_t ispeed, ospeed;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
144 PyObject *term, *cc, *v;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
145 int i;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
146
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
147 if (!PyArg_ParseTuple(args, "O&iO:tcsetattr",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
148 fdconv, &fd, &when, &term))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
149 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
150 if (!PyList_Check(term) || PyList_Size(term) != 7) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
151 PyErr_SetString(PyExc_TypeError,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
152 "tcsetattr, arg 3: must be 7 element list");
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
153 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
154 }
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
155
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
156 /* Get the old mode, in case there are any hidden fields... */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
157 if (tcgetattr(fd, &mode) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
158 return PyErr_SetFromErrno(TermiosError);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
159 mode.c_iflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 0));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
160 mode.c_oflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 1));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
161 mode.c_cflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 2));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
162 mode.c_lflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 3));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
163 ispeed = (speed_t) PyLong_AsLong(PyList_GetItem(term, 4));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
164 ospeed = (speed_t) PyLong_AsLong(PyList_GetItem(term, 5));
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
165 cc = PyList_GetItem(term, 6);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
166 if (PyErr_Occurred())
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
167 return NULL;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
168
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
169 if (!PyList_Check(cc) || PyList_Size(cc) != NCCS) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
170 PyErr_Format(PyExc_TypeError,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
171 "tcsetattr: attributes[6] must be %d element list",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
172 NCCS);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
173 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
174 }
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
175
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
176 for (i = 0; i < NCCS; i++) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
177 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
178
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
179 if (PyBytes_Check(v) && PyBytes_Size(v) == 1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
180 mode.c_cc[i] = (cc_t) * PyBytes_AsString(v);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
181 else if (PyLong_Check(v))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
182 mode.c_cc[i] = (cc_t) PyLong_AsLong(v);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
183 else {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
184 PyErr_SetString(PyExc_TypeError,
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
185 "tcsetattr: elements of attributes must be characters or integers");
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
186 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
187 }
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
188 }
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
189
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
190 if (cfsetispeed(&mode, (speed_t) ispeed) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
191 return PyErr_SetFromErrno(TermiosError);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
192 if (cfsetospeed(&mode, (speed_t) ospeed) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
193 return PyErr_SetFromErrno(TermiosError);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
194 if (tcsetattr(fd, when, &mode) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
195 return PyErr_SetFromErrno(TermiosError);
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
196
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
197 Py_INCREF(Py_None);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
198 return Py_None;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
199 }
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
200
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
201 PyDoc_STRVAR(termios_tcsendbreak__doc__,
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
202 "tcsendbreak(fd, duration) -> None\n\
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
203 \n\
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
204 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
205 A zero duration sends a break for 0.25-0.5 seconds; a nonzero duration\n\
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
206 has a system dependent meaning.");
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
207
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
208 static PyObject *
13501
ca32ff7a067e ANSI-fication
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 9887
diff changeset
209 termios_tcsendbreak(PyObject *self, PyObject *args)
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
210 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
211 int fd, duration;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
212
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
213 if (!PyArg_ParseTuple(args, "O&i:tcsendbreak",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
214 fdconv, &fd, &duration))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
215 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
216 if (tcsendbreak(fd, duration) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
217 return PyErr_SetFromErrno(TermiosError);
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
218
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
219 Py_INCREF(Py_None);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
220 return Py_None;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
221 }
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
222
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
223 PyDoc_STRVAR(termios_tcdrain__doc__,
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
224 "tcdrain(fd) -> None\n\
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
225 \n\
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
226 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
227
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
228 static PyObject *
13501
ca32ff7a067e ANSI-fication
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 9887
diff changeset
229 termios_tcdrain(PyObject *self, PyObject *args)
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
230 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
231 int fd;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
232
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
233 if (!PyArg_ParseTuple(args, "O&:tcdrain",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
234 fdconv, &fd))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
235 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
236 if (tcdrain(fd) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
237 return PyErr_SetFromErrno(TermiosError);
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
238
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
239 Py_INCREF(Py_None);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
240 return Py_None;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
241 }
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
242
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
243 PyDoc_STRVAR(termios_tcflush__doc__,
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
244 "tcflush(fd, queue) -> None\n\
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
245 \n\
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
246 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
247 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
248 queue, termios.TCOFLUSH for the output queue, or termios.TCIOFLUSH for\n\
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
249 both queues. ");
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
250
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
251 static PyObject *
13501
ca32ff7a067e ANSI-fication
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 9887
diff changeset
252 termios_tcflush(PyObject *self, PyObject *args)
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
253 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
254 int fd, queue;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
255
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
256 if (!PyArg_ParseTuple(args, "O&i:tcflush",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
257 fdconv, &fd, &queue))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
258 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
259 if (tcflush(fd, queue) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
260 return PyErr_SetFromErrno(TermiosError);
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
261
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
262 Py_INCREF(Py_None);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
263 return Py_None;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
264 }
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
265
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
266 PyDoc_STRVAR(termios_tcflow__doc__,
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
267 "tcflow(fd, action) -> None\n\
17697
f970195196c4 Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 17419
diff changeset
268 \n\
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
269 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
270 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
271 termios.TCOON to restart output, termios.TCIOFF to suspend input,\n\
23832
ed1ba37a46b7 Patch #568124: Add doc string macros.
Martin v. Löwis <martin@v.loewis.de>
parents: 22114
diff changeset
272 or termios.TCION to restart input.");
7531
b4660ad7dc41 Doc strings added by Mitch Chapman.
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
273
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
274 static PyObject *
13501
ca32ff7a067e ANSI-fication
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 9887
diff changeset
275 termios_tcflow(PyObject *self, PyObject *args)
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
276 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
277 int fd, action;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
278
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
279 if (!PyArg_ParseTuple(args, "O&i:tcflow",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
280 fdconv, &fd, &action))
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
281 return NULL;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
282 if (tcflow(fd, action) == -1)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
283 return PyErr_SetFromErrno(TermiosError);
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
284
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
285 Py_INCREF(Py_None);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
286 return Py_None;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
287 }
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
288
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
289 static PyMethodDef termios_methods[] =
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
290 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
291 {"tcgetattr", termios_tcgetattr,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
292 METH_VARARGS, termios_tcgetattr__doc__},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
293 {"tcsetattr", termios_tcsetattr,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
294 METH_VARARGS, termios_tcsetattr__doc__},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
295 {"tcsendbreak", termios_tcsendbreak,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
296 METH_VARARGS, termios_tcsendbreak__doc__},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
297 {"tcdrain", termios_tcdrain,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
298 METH_VARARGS, termios_tcdrain__doc__},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
299 {"tcflush", termios_tcflush,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
300 METH_VARARGS, termios_tcflush__doc__},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
301 {"tcflow", termios_tcflow,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
302 METH_VARARGS, termios_tcflow__doc__},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
303 {NULL, NULL}
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
304 };
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
305
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
306
16913
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
307 #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
308 #define VSWTC VSWTCH
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
309 #endif
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
310
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
311 #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
312 #define VSWTCH VSWTC
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
313 #endif
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
314
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
315 static struct constant {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
316 char *name;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
317 long value;
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
318 } termios_constants[] = {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
319 /* cfgetospeed(), cfsetospeed() constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
320 {"B0", B0},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
321 {"B50", B50},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
322 {"B75", B75},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
323 {"B110", B110},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
324 {"B134", B134},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
325 {"B150", B150},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
326 {"B200", B200},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
327 {"B300", B300},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
328 {"B600", B600},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
329 {"B1200", B1200},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
330 {"B1800", B1800},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
331 {"B2400", B2400},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
332 {"B4800", B4800},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
333 {"B9600", B9600},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
334 {"B19200", B19200},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
335 {"B38400", B38400},
17419
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17357
diff changeset
336 #ifdef B57600
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
337 {"B57600", B57600},
17419
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17357
diff changeset
338 #endif
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17357
diff changeset
339 #ifdef B115200
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
340 {"B115200", B115200},
17419
3fadc37cfa92 Unixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum <guido@python.org>
parents: 17357
diff changeset
341 #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
342 #ifdef B230400
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
343 {"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
344 #endif
66321
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
345 #ifdef B460800
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
346 {"B460800", B460800},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
347 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
348 #ifdef B500000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
349 {"B500000", B500000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
350 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
351 #ifdef B576000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
352 {"B576000", B576000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
353 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
354 #ifdef B921600
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
355 {"B921600", B921600},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
356 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
357 #ifdef B1000000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
358 {"B1000000", B1000000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
359 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
360 #ifdef B1152000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
361 {"B1152000", B1152000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
362 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
363 #ifdef B1500000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
364 {"B1500000", B1500000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
365 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
366 #ifdef B2000000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
367 {"B2000000", B2000000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
368 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
369 #ifdef B2500000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
370 {"B2500000", B2500000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
371 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
372 #ifdef B3000000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
373 {"B3000000", B3000000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
374 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
375 #ifdef B3500000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
376 {"B3500000", B3500000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
377 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
378 #ifdef B4000000
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
379 {"B4000000", B4000000},
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
380 #endif
59307aa7d2fe Issue #8078: Add constants for higher baud rates in the termios module.
Antoine Pitrou <solipsis@pitrou.net>
parents: 61466
diff changeset
381
16913
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
382 #ifdef CBAUDEX
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
383 {"CBAUDEX", CBAUDEX},
16913
f07fa7f5262a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake <fdrake@acm.org>
parents: 16886
diff changeset
384 #endif
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
385
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
386 /* tcsetattr() constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
387 {"TCSANOW", TCSANOW},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
388 {"TCSADRAIN", TCSADRAIN},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
389 {"TCSAFLUSH", TCSAFLUSH},
57035
4db84045a7f0 Merged revisions 75999 via svnmerge from
Gregory P. Smith <greg@mad-scientist.com>
parents: 47580
diff changeset
390 #ifdef TCSASOFT
61466
cab14be0ada1 Recorded merge of revisions 81029 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 57035
diff changeset
391 {"TCSASOFT", TCSASOFT},
57035
4db84045a7f0 Merged revisions 75999 via svnmerge from
Gregory P. Smith <greg@mad-scientist.com>
parents: 47580
diff changeset
392 #endif
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
393
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
394 /* tcflush() constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
395 {"TCIFLUSH", TCIFLUSH},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
396 {"TCOFLUSH", TCOFLUSH},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
397 {"TCIOFLUSH", TCIOFLUSH},
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
398
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
399 /* tcflow() constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
400 {"TCOOFF", TCOOFF},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
401 {"TCOON", TCOON},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
402 {"TCIOFF", TCIOFF},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
403 {"TCION", TCION},
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
404
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
405 /* struct termios.c_iflag constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
406 {"IGNBRK", IGNBRK},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
407 {"BRKINT", BRKINT},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
408 {"IGNPAR", IGNPAR},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
409 {"PARMRK", PARMRK},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
410 {"INPCK", INPCK},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
411 {"ISTRIP", ISTRIP},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
412 {"INLCR", INLCR},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
413 {"IGNCR", IGNCR},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
414 {"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
415 #ifdef IUCLC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
416 {"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
417 #endif
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
418 {"IXON", IXON},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
419 {"IXANY", IXANY},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
420 {"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
421 #ifdef IMAXBEL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
422 {"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
423 #endif
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
424
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
425 /* struct termios.c_oflag constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
426 {"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
427 #ifdef OLCUC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
428 {"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
429 #endif
22114
c454b76d51e7 OS/2 EMX port changes (Modules part of patch #450267):
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 21944
diff changeset
430 #ifdef ONLCR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
431 {"ONLCR", ONLCR},
22114
c454b76d51e7 OS/2 EMX port changes (Modules part of patch #450267):
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 21944
diff changeset
432 #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
433 #ifdef OCRNL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
434 {"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
435 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
436 #ifdef ONOCR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
437 {"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
438 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
439 #ifdef ONLRET
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
440 {"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
441 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
442 #ifdef OFILL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
443 {"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
444 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
445 #ifdef OFDEL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
446 {"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
447 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
448 #ifdef NLDLY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
449 {"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
450 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
451 #ifdef CRDLY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
452 {"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
453 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
454 #ifdef TABDLY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
455 {"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
456 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
457 #ifdef BSDLY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
458 {"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
459 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
460 #ifdef VTDLY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
461 {"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
462 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
463 #ifdef FFDLY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
464 {"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
465 #endif
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
466
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
467 /* 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
468 #ifdef NL0
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
469 {"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
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 NL1
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
472 {"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
473 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
474 #ifdef CR0
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
475 {"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
476 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
477 #ifdef CR1
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
478 {"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
479 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
480 #ifdef CR2
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
481 {"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
482 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
483 #ifdef CR3
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
484 {"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
485 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
486 #ifdef TAB0
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
487 {"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
488 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
489 #ifdef TAB1
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
490 {"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
491 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
492 #ifdef TAB2
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
493 {"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
494 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
495 #ifdef TAB3
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
496 {"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
497 #endif
16952
832e40909ef4 Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents: 16913
diff changeset
498 #ifdef XTABS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
499 {"XTABS", XTABS},
16952
832e40909ef4 Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents: 16913
diff changeset
500 #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
501 #ifdef BS0
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
502 {"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
503 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
504 #ifdef BS1
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
505 {"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
506 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
507 #ifdef VT0
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
508 {"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
509 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
510 #ifdef VT1
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
511 {"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
512 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
513 #ifdef FF0
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
514 {"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
515 #endif
a79ebba6466a Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
Fred Drake <fdrake@acm.org>
parents: 16952
diff changeset
516 #ifdef FF1
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
517 {"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
518 #endif
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
519
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
520 /* struct termios.c_cflag constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
521 {"CSIZE", CSIZE},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
522 {"CSTOPB", CSTOPB},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
523 {"CREAD", CREAD},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
524 {"PARENB", PARENB},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
525 {"PARODD", PARODD},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
526 {"HUPCL", HUPCL},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
527 {"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
528 #ifdef CIBAUD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
529 {"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
530 #endif
16952
832e40909ef4 Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents: 16913
diff changeset
531 #ifdef CRTSCTS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
532 {"CRTSCTS", (long)CRTSCTS},
16952
832e40909ef4 Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents: 16913
diff changeset
533 #endif
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
534
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
535 /* struct termios.c_cflag-related values (character size) */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
536 {"CS5", CS5},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
537 {"CS6", CS6},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
538 {"CS7", CS7},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
539 {"CS8", CS8},
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
540
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
541 /* struct termios.c_lflag constants */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
542 {"ISIG", ISIG},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
543 {"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
544 #ifdef XCASE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
545 {"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
546 #endif
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
547 {"ECHO", ECHO},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
548 {"ECHOE", ECHOE},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
549 {"ECHOK", ECHOK},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
550 {"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
551 #ifdef ECHOCTL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
552 {"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
553 #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
554 #ifdef ECHOPRT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
555 {"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
556 #endif
18124
1f1364806599 Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents: 18076
diff changeset
557 #ifdef ECHOKE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
558 {"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
559 #endif
1f1364806599 Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents: 18076
diff changeset
560 #ifdef FLUSHO
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
561 {"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
562 #endif
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
563 {"NOFLSH", NOFLSH},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
564 {"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
565 #ifdef PENDIN
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
566 {"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
567 #endif
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
568 {"IEXTEN", IEXTEN},
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
569
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
570 /* indexes into the control chars array returned by tcgetattr() */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
571 {"VINTR", VINTR},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
572 {"VQUIT", VQUIT},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
573 {"VERASE", VERASE},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
574 {"VKILL", VKILL},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
575 {"VEOF", VEOF},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
576 {"VTIME", VTIME},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
577 {"VMIN", VMIN},
16952
832e40909ef4 Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents: 16913
diff changeset
578 #ifdef VSWTC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
579 /* The #defines above ensure that if either is defined, both are,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
580 * but both may be omitted by the system headers. ;-( */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
581 {"VSWTC", VSWTC},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
582 {"VSWTCH", VSWTCH},
16952
832e40909ef4 Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
Fred Drake <fdrake@acm.org>
parents: 16913
diff changeset
583 #endif
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
584 {"VSTART", VSTART},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
585 {"VSTOP", VSTOP},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
586 {"VSUSP", VSUSP},
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
587 {"VEOL", VEOL},
17905
0a7af0e538d4 Correct the sense of a couple of conditional compilations -- used #ifndef
Fred Drake <fdrake@acm.org>
parents: 17788
diff changeset
588 #ifdef VREPRINT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
589 {"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
590 #endif
17905
0a7af0e538d4 Correct the sense of a couple of conditional compilations -- used #ifndef
Fred Drake <fdrake@acm.org>
parents: 17788
diff changeset
591 #ifdef VDISCARD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
592 {"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
593 #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
594 #ifdef VWERASE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
595 {"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
596 #endif
18124
1f1364806599 Forward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters <thomas@python.org>
parents: 18076
diff changeset
597 #ifdef VLNEXT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
598 {"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
599 #endif
22114
c454b76d51e7 OS/2 EMX port changes (Modules part of patch #450267):
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 21944
diff changeset
600 #ifdef VEOL2
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
601 {"VEOL2", VEOL2},
22114
c454b76d51e7 OS/2 EMX port changes (Modules part of patch #450267):
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents: 21944
diff changeset
602 #endif
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
603
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
604
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
605 #ifdef B460800
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
606 {"B460800", B460800},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
607 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
608 #ifdef CBAUD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
609 {"CBAUD", CBAUD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
610 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
611 #ifdef CDEL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
612 {"CDEL", CDEL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
613 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
614 #ifdef CDSUSP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
615 {"CDSUSP", CDSUSP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
616 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
617 #ifdef CEOF
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
618 {"CEOF", CEOF},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
619 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
620 #ifdef CEOL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
621 {"CEOL", CEOL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
622 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
623 #ifdef CEOL2
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
624 {"CEOL2", CEOL2},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
625 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
626 #ifdef CEOT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
627 {"CEOT", CEOT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
628 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
629 #ifdef CERASE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
630 {"CERASE", CERASE},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
631 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
632 #ifdef CESC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
633 {"CESC", CESC},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
634 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
635 #ifdef CFLUSH
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
636 {"CFLUSH", CFLUSH},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
637 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
638 #ifdef CINTR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
639 {"CINTR", CINTR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
640 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
641 #ifdef CKILL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
642 {"CKILL", CKILL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
643 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
644 #ifdef CLNEXT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
645 {"CLNEXT", CLNEXT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
646 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
647 #ifdef CNUL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
648 {"CNUL", CNUL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
649 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
650 #ifdef COMMON
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
651 {"COMMON", COMMON},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
652 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
653 #ifdef CQUIT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
654 {"CQUIT", CQUIT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
655 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
656 #ifdef CRPRNT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
657 {"CRPRNT", CRPRNT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
658 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
659 #ifdef CSTART
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
660 {"CSTART", CSTART},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
661 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
662 #ifdef CSTOP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
663 {"CSTOP", CSTOP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
664 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
665 #ifdef CSUSP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
666 {"CSUSP", CSUSP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
667 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
668 #ifdef CSWTCH
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
669 {"CSWTCH", CSWTCH},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
670 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
671 #ifdef CWERASE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
672 {"CWERASE", CWERASE},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
673 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
674 #ifdef EXTA
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
675 {"EXTA", EXTA},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
676 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
677 #ifdef EXTB
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
678 {"EXTB", EXTB},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
679 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
680 #ifdef FIOASYNC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
681 {"FIOASYNC", FIOASYNC},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
682 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
683 #ifdef FIOCLEX
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
684 {"FIOCLEX", FIOCLEX},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
685 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
686 #ifdef FIONBIO
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
687 {"FIONBIO", FIONBIO},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
688 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
689 #ifdef FIONCLEX
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
690 {"FIONCLEX", FIONCLEX},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
691 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
692 #ifdef FIONREAD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
693 {"FIONREAD", FIONREAD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
694 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
695 #ifdef IBSHIFT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
696 {"IBSHIFT", IBSHIFT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
697 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
698 #ifdef INIT_C_CC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
699 {"INIT_C_CC", INIT_C_CC},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
700 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
701 #ifdef IOCSIZE_MASK
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
702 {"IOCSIZE_MASK", IOCSIZE_MASK},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
703 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
704 #ifdef IOCSIZE_SHIFT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
705 {"IOCSIZE_SHIFT", IOCSIZE_SHIFT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
706 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
707 #ifdef NCC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
708 {"NCC", NCC},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
709 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
710 #ifdef NCCS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
711 {"NCCS", NCCS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
712 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
713 #ifdef NSWTCH
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
714 {"NSWTCH", NSWTCH},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
715 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
716 #ifdef N_MOUSE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
717 {"N_MOUSE", N_MOUSE},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
718 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
719 #ifdef N_PPP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
720 {"N_PPP", N_PPP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
721 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
722 #ifdef N_SLIP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
723 {"N_SLIP", N_SLIP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
724 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
725 #ifdef N_STRIP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
726 {"N_STRIP", N_STRIP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
727 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
728 #ifdef N_TTY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
729 {"N_TTY", N_TTY},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
730 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
731 #ifdef TCFLSH
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
732 {"TCFLSH", TCFLSH},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
733 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
734 #ifdef TCGETA
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
735 {"TCGETA", TCGETA},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
736 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
737 #ifdef TCGETS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
738 {"TCGETS", TCGETS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
739 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
740 #ifdef TCSBRK
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
741 {"TCSBRK", TCSBRK},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
742 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
743 #ifdef TCSBRKP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
744 {"TCSBRKP", TCSBRKP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
745 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
746 #ifdef TCSETA
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
747 {"TCSETA", TCSETA},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
748 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
749 #ifdef TCSETAF
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
750 {"TCSETAF", TCSETAF},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
751 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
752 #ifdef TCSETAW
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
753 {"TCSETAW", TCSETAW},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
754 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
755 #ifdef TCSETS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
756 {"TCSETS", TCSETS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
757 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
758 #ifdef TCSETSF
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
759 {"TCSETSF", TCSETSF},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
760 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
761 #ifdef TCSETSW
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
762 {"TCSETSW", TCSETSW},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
763 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
764 #ifdef TCXONC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
765 {"TCXONC", TCXONC},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
766 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
767 #ifdef TIOCCONS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
768 {"TIOCCONS", TIOCCONS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
769 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
770 #ifdef TIOCEXCL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
771 {"TIOCEXCL", TIOCEXCL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
772 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
773 #ifdef TIOCGETD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
774 {"TIOCGETD", TIOCGETD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
775 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
776 #ifdef TIOCGICOUNT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
777 {"TIOCGICOUNT", TIOCGICOUNT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
778 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
779 #ifdef TIOCGLCKTRMIOS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
780 {"TIOCGLCKTRMIOS", TIOCGLCKTRMIOS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
781 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
782 #ifdef TIOCGPGRP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
783 {"TIOCGPGRP", TIOCGPGRP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
784 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
785 #ifdef TIOCGSERIAL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
786 {"TIOCGSERIAL", TIOCGSERIAL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
787 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
788 #ifdef TIOCGSOFTCAR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
789 {"TIOCGSOFTCAR", TIOCGSOFTCAR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
790 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
791 #ifdef TIOCGWINSZ
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
792 {"TIOCGWINSZ", TIOCGWINSZ},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
793 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
794 #ifdef TIOCINQ
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
795 {"TIOCINQ", TIOCINQ},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
796 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
797 #ifdef TIOCLINUX
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
798 {"TIOCLINUX", TIOCLINUX},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
799 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
800 #ifdef TIOCMBIC
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
801 {"TIOCMBIC", TIOCMBIC},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
802 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
803 #ifdef TIOCMBIS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
804 {"TIOCMBIS", TIOCMBIS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
805 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
806 #ifdef TIOCMGET
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
807 {"TIOCMGET", TIOCMGET},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
808 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
809 #ifdef TIOCMIWAIT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
810 {"TIOCMIWAIT", TIOCMIWAIT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
811 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
812 #ifdef TIOCMSET
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
813 {"TIOCMSET", TIOCMSET},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
814 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
815 #ifdef TIOCM_CAR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
816 {"TIOCM_CAR", TIOCM_CAR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
817 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
818 #ifdef TIOCM_CD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
819 {"TIOCM_CD", TIOCM_CD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
820 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
821 #ifdef TIOCM_CTS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
822 {"TIOCM_CTS", TIOCM_CTS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
823 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
824 #ifdef TIOCM_DSR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
825 {"TIOCM_DSR", TIOCM_DSR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
826 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
827 #ifdef TIOCM_DTR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
828 {"TIOCM_DTR", TIOCM_DTR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
829 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
830 #ifdef TIOCM_LE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
831 {"TIOCM_LE", TIOCM_LE},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
832 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
833 #ifdef TIOCM_RI
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
834 {"TIOCM_RI", TIOCM_RI},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
835 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
836 #ifdef TIOCM_RNG
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
837 {"TIOCM_RNG", TIOCM_RNG},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
838 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
839 #ifdef TIOCM_RTS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
840 {"TIOCM_RTS", TIOCM_RTS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
841 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
842 #ifdef TIOCM_SR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
843 {"TIOCM_SR", TIOCM_SR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
844 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
845 #ifdef TIOCM_ST
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
846 {"TIOCM_ST", TIOCM_ST},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
847 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
848 #ifdef TIOCNOTTY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
849 {"TIOCNOTTY", TIOCNOTTY},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
850 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
851 #ifdef TIOCNXCL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
852 {"TIOCNXCL", TIOCNXCL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
853 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
854 #ifdef TIOCOUTQ
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
855 {"TIOCOUTQ", TIOCOUTQ},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
856 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
857 #ifdef TIOCPKT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
858 {"TIOCPKT", TIOCPKT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
859 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
860 #ifdef TIOCPKT_DATA
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
861 {"TIOCPKT_DATA", TIOCPKT_DATA},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
862 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
863 #ifdef TIOCPKT_DOSTOP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
864 {"TIOCPKT_DOSTOP", TIOCPKT_DOSTOP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
865 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
866 #ifdef TIOCPKT_FLUSHREAD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
867 {"TIOCPKT_FLUSHREAD", TIOCPKT_FLUSHREAD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
868 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
869 #ifdef TIOCPKT_FLUSHWRITE
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
870 {"TIOCPKT_FLUSHWRITE", TIOCPKT_FLUSHWRITE},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
871 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
872 #ifdef TIOCPKT_NOSTOP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
873 {"TIOCPKT_NOSTOP", TIOCPKT_NOSTOP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
874 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
875 #ifdef TIOCPKT_START
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
876 {"TIOCPKT_START", TIOCPKT_START},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
877 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
878 #ifdef TIOCPKT_STOP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
879 {"TIOCPKT_STOP", TIOCPKT_STOP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
880 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
881 #ifdef TIOCSCTTY
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
882 {"TIOCSCTTY", TIOCSCTTY},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
883 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
884 #ifdef TIOCSERCONFIG
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
885 {"TIOCSERCONFIG", TIOCSERCONFIG},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
886 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
887 #ifdef TIOCSERGETLSR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
888 {"TIOCSERGETLSR", TIOCSERGETLSR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
889 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
890 #ifdef TIOCSERGETMULTI
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
891 {"TIOCSERGETMULTI", TIOCSERGETMULTI},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
892 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
893 #ifdef TIOCSERGSTRUCT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
894 {"TIOCSERGSTRUCT", TIOCSERGSTRUCT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
895 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
896 #ifdef TIOCSERGWILD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
897 {"TIOCSERGWILD", TIOCSERGWILD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
898 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
899 #ifdef TIOCSERSETMULTI
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
900 {"TIOCSERSETMULTI", TIOCSERSETMULTI},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
901 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
902 #ifdef TIOCSERSWILD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
903 {"TIOCSERSWILD", TIOCSERSWILD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
904 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
905 #ifdef TIOCSER_TEMT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
906 {"TIOCSER_TEMT", TIOCSER_TEMT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
907 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
908 #ifdef TIOCSETD
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
909 {"TIOCSETD", TIOCSETD},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
910 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
911 #ifdef TIOCSLCKTRMIOS
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
912 {"TIOCSLCKTRMIOS", TIOCSLCKTRMIOS},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
913 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
914 #ifdef TIOCSPGRP
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
915 {"TIOCSPGRP", TIOCSPGRP},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
916 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
917 #ifdef TIOCSSERIAL
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
918 {"TIOCSSERIAL", TIOCSSERIAL},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
919 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
920 #ifdef TIOCSSOFTCAR
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
921 {"TIOCSSOFTCAR", TIOCSSOFTCAR},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
922 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
923 #ifdef TIOCSTI
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
924 {"TIOCSTI", TIOCSTI},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
925 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
926 #ifdef TIOCSWINSZ
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
927 {"TIOCSWINSZ", TIOCSWINSZ},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
928 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
929 #ifdef TIOCTTYGSTRUCT
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
930 {"TIOCTTYGSTRUCT", TIOCTTYGSTRUCT},
17226
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
931 #endif
02a4b0cfc57e Michael Hudson <mwh21@cam.ac.uk>:
Fred Drake <fdrake@acm.org>
parents: 16975
diff changeset
932
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
933 /* sentinel */
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
934 {NULL, 0}
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
935 };
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
936
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
937
47580
94f64f11fdd0 Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents: 47301
diff changeset
938 static struct PyModuleDef termiosmodule = {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
939 PyModuleDef_HEAD_INIT,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
940 "termios",
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
941 termios__doc__,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
942 -1,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
943 termios_methods,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
944 NULL,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
945 NULL,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
946 NULL,
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
947 NULL
47580
94f64f11fdd0 Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents: 47301
diff changeset
948 };
94f64f11fdd0 Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents: 47301
diff changeset
949
24471
f66b3a3509c7 Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype
Mark Hammond <mhammond@skippinet.com.au>
parents: 23832
diff changeset
950 PyMODINIT_FUNC
13651
8a063423e0b7 Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
Thomas Wouters <thomas@python.org>
parents: 13501
diff changeset
951 PyInit_termios(void)
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
952 {
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
953 PyObject *m;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
954 struct constant *constant = termios_constants;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
955
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
956 m = PyModule_Create(&termiosmodule);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
957 if (m == NULL)
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
958 return NULL;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
959
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
960 if (TermiosError == NULL) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
961 TermiosError = PyErr_NewException("termios.error", NULL, NULL);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
962 }
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
963 Py_INCREF(TermiosError);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
964 PyModule_AddObject(m, "error", TermiosError);
16806
b2585d8fdb8b Define the constants needed for working with these functions directly
Fred Drake <fdrake@acm.org>
parents: 13820
diff changeset
965
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
966 while (constant->name != NULL) {
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
967 PyModule_AddIntConstant(m, constant->name, constant->value);
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
968 ++constant;
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
969 }
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 47580
diff changeset
970 return m;
1879
91bfb2771554 Steen Lumholt's termios interface.
Guido van Rossum <guido@python.org>
parents:
diff changeset
971 }