annotate Modules/termios.c @ 78069:a8aa77458e12 3.2

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