summaryrefslogtreecommitdiffstats
path: root/Modules/termios.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-06-13 20:33:02 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-06-13 20:33:02 (GMT)
commit14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f (patch)
tree7b150133cdd51df851c6bdaf261cd9ea30c149af /Modules/termios.c
parent654c11ee3a2c9b72c040524c9cc4f95a1858f20b (diff)
downloadcpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.zip
cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.gz
cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.bz2
Patch #568124: Add doc string macros.
Diffstat (limited to 'Modules/termios.c')
-rw-r--r--Modules/termios.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index 0c5697f..ed78ece 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -20,15 +20,15 @@
#include <sys/modem.h>
#endif
-static char termios__doc__[] = "\
-This module provides an interface to the Posix calls for tty I/O control.\n\
+PyDoc_STRVAR(termios__doc__,
+"This module provides an interface to the Posix calls for tty I/O control.\n\
For a complete description of these calls, see the Posix or Unix manual\n\
pages. It is only available for those Unix versions that support Posix\n\
termios style tty I/O control.\n\
\n\
All functions in this module take a file descriptor fd as their first\n\
argument. This can be an integer file descriptor, such as returned by\n\
-sys.stdin.fileno(), or a file object, such as sys.stdin itself.";
+sys.stdin.fileno(), or a file object, such as sys.stdin itself.");
static PyObject *TermiosError;
@@ -44,8 +44,8 @@ static int fdconv(PyObject* obj, void* p)
return 0;
}
-static char termios_tcgetattr__doc__[] = "\
-tcgetattr(fd) -> list_of_attrs\n\
+PyDoc_STRVAR(termios_tcgetattr__doc__,
+"tcgetattr(fd) -> list_of_attrs\n\
\n\
Get the tty attributes for file descriptor fd, as follows:\n\
[iflag, oflag, cflag, lflag, ispeed, ospeed, cc] where cc is a list\n\
@@ -53,7 +53,7 @@ of the tty special characters (each a string of length 1, except the items\n\
with indices VMIN and VTIME, which are integers when these fields are\n\
defined). The interpretation of the flags and the speeds as well as the\n\
indexing in the cc array must be done using the symbolic constants defined\n\
-in this module.";
+in this module.");
static PyObject *
termios_tcgetattr(PyObject *self, PyObject *args)
@@ -121,8 +121,8 @@ termios_tcgetattr(PyObject *self, PyObject *args)
return NULL;
}
-static char termios_tcsetattr__doc__[] = "\
-tcsetattr(fd, when, attributes) -> None\n\
+PyDoc_STRVAR(termios_tcsetattr__doc__,
+"tcsetattr(fd, when, attributes) -> None\n\
\n\
Set the tty attributes for file descriptor fd.\n\
The attributes to be set are taken from the attributes argument, which\n\
@@ -130,7 +130,7 @@ is a list like the one returned by tcgetattr(). The when argument\n\
determines when the attributes are changed: termios.TCSANOW to\n\
change immediately, termios.TCSADRAIN to change after transmitting all\n\
queued output, or termios.TCSAFLUSH to change after transmitting all\n\
-queued output and discarding all queued input. ";
+queued output and discarding all queued input. ");
static PyObject *
termios_tcsetattr(PyObject *self, PyObject *args)
@@ -195,12 +195,12 @@ termios_tcsetattr(PyObject *self, PyObject *args)
return Py_None;
}
-static char termios_tcsendbreak__doc__[] = "\
-tcsendbreak(fd, duration) -> None\n\
+PyDoc_STRVAR(termios_tcsendbreak__doc__,
+"tcsendbreak(fd, duration) -> None\n\
\n\
Send a break on file descriptor fd.\n\
A zero duration sends a break for 0.25-0.5 seconds; a nonzero duration\n\
-has a system dependent meaning.";
+has a system dependent meaning.");
static PyObject *
termios_tcsendbreak(PyObject *self, PyObject *args)
@@ -217,10 +217,10 @@ termios_tcsendbreak(PyObject *self, PyObject *args)
return Py_None;
}
-static char termios_tcdrain__doc__[] = "\
-tcdrain(fd) -> None\n\
+PyDoc_STRVAR(termios_tcdrain__doc__,
+"tcdrain(fd) -> None\n\
\n\
-Wait until all output written to file descriptor fd has been transmitted.";
+Wait until all output written to file descriptor fd has been transmitted.");
static PyObject *
termios_tcdrain(PyObject *self, PyObject *args)
@@ -237,13 +237,13 @@ termios_tcdrain(PyObject *self, PyObject *args)
return Py_None;
}
-static char termios_tcflush__doc__[] = "\
-tcflush(fd, queue) -> None\n\
+PyDoc_STRVAR(termios_tcflush__doc__,
+"tcflush(fd, queue) -> None\n\
\n\
Discard queued data on file descriptor fd.\n\
The queue selector specifies which queue: termios.TCIFLUSH for the input\n\
queue, termios.TCOFLUSH for the output queue, or termios.TCIOFLUSH for\n\
-both queues. ";
+both queues. ");
static PyObject *
termios_tcflush(PyObject *self, PyObject *args)
@@ -260,13 +260,13 @@ termios_tcflush(PyObject *self, PyObject *args)
return Py_None;
}
-static char termios_tcflow__doc__[] = "\
-tcflow(fd, action) -> None\n\
+PyDoc_STRVAR(termios_tcflow__doc__,
+"tcflow(fd, action) -> None\n\
\n\
Suspend or resume input or output on file descriptor fd.\n\
The action argument can be termios.TCOOFF to suspend output,\n\
termios.TCOON to restart output, termios.TCIOFF to suspend input,\n\
-or termios.TCION to restart input.";
+or termios.TCION to restart input.");
static PyObject *
termios_tcflow(PyObject *self, PyObject *args)