summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 12:15:54 +0000
committerPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 12:15:54 +0000
commit416d413527ed7e9a1a5fe98f94487f6ee4315d2e (patch)
treee4ce3d7d468161576e9d8a139065875804ab61ce
parente89b15691e224f7742b72b9e502580a0189659fe (diff)
downloadcpython-git-416d413527ed7e9a1a5fe98f94487f6ee4315d2e.tar.gz
ANSI-fication
-rw-r--r--Modules/resource.c16
-rw-r--r--Modules/termios.c24
-rw-r--r--Modules/timemodule.c60
3 files changed, 25 insertions, 75 deletions
diff --git a/Modules/resource.c b/Modules/resource.c
index 98a77efe33..373e8d2e89 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -32,9 +32,7 @@ int getpagesize();
static PyObject *ResourceError;
static PyObject *
-resource_getrusage(self, args)
- PyObject *self;
- PyObject *args;
+resource_getrusage(PyObject *self, PyObject *args)
{
int who;
struct rusage ru;
@@ -79,9 +77,7 @@ resource_getrusage(self, args)
static PyObject *
-resource_getrlimit(self, args)
- PyObject *self;
- PyObject *args;
+resource_getrlimit(PyObject *self, PyObject *args)
{
struct rlimit rl;
int resource;
@@ -111,9 +107,7 @@ resource_getrlimit(self, args)
}
static PyObject *
-resource_setrlimit(self, args)
- PyObject *self;
- PyObject *args;
+resource_setrlimit(PyObject *self, PyObject *args)
{
struct rlimit rl;
int resource;
@@ -157,9 +151,7 @@ resource_setrlimit(self, args)
}
static PyObject *
-resource_getpagesize(self, args)
- PyObject *self;
- PyObject *args;
+resource_getpagesize(PyObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, ":getpagesize"))
return NULL;
diff --git a/Modules/termios.c b/Modules/termios.c
index aab6b8a71c..80d41de99c 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -46,9 +46,7 @@ indexing in the cc array must be done using the symbolic constants defined\n\
in the TERMIOS module.";
static PyObject *
-termios_tcgetattr(self, args)
- PyObject *self;
- PyObject *args;
+termios_tcgetattr(PyObject *self, PyObject *args)
{
int fd;
struct termios mode;
@@ -126,9 +124,7 @@ queued output, or TERMIOS.TCSAFLUSH to change after transmitting all\n\
queued output and discarding all queued input. ";
static PyObject *
-termios_tcsetattr(self, args)
- PyObject *self;
- PyObject *args;
+termios_tcsetattr(PyObject *self, PyObject *args)
{
int fd, when;
struct termios mode;
@@ -195,9 +191,7 @@ A zero duration sends a break for 0.25-0.5 seconds; a nonzero duration \n\
has a system dependent meaning. ";
static PyObject *
-termios_tcsendbreak(self, args)
- PyObject *self;
- PyObject *args;
+termios_tcsendbreak(PyObject *self, PyObject *args)
{
int fd, duration;
@@ -219,9 +213,7 @@ tcdrain(fd) -> None\n\
Wait until all output written to file descriptor fd has been transmitted. ";
static PyObject *
-termios_tcdrain(self, args)
- PyObject *self;
- PyObject *args;
+termios_tcdrain(PyObject *self, PyObject *args)
{
int fd;
@@ -246,9 +238,7 @@ queue, TERMIOS.TCOFLUSH for the output queue, or TERMIOS.TCIOFLUSH for\n\
both queues. ";
static PyObject *
-termios_tcflush(self, args)
- PyObject *self;
- PyObject *args;
+termios_tcflush(PyObject *self, PyObject *args)
{
int fd, queue;
@@ -273,9 +263,7 @@ TERMIOS.TCOON to restart output, TERMIOS.TCIOFF to suspend input,\n\
or TERMIOS.TCION to restart input. ";
static PyObject *
-termios_tcflow(self, args)
- PyObject *self;
- PyObject *args;
+termios_tcflow(PyObject *self, PyObject *args)
{
int fd, action;
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 855863b9de..9b2fd99004 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -128,9 +128,7 @@ initmactimezone()
static PyObject *
-time_time(self, args)
- PyObject *self;
- PyObject *args;
+time_time(PyObject *self, PyObject *args)
{
double secs;
if (!PyArg_NoArgs(args))
@@ -160,9 +158,7 @@ Fractions of a second may be present if the system clock provides them.";
#endif
static PyObject *
-time_clock(self, args)
- PyObject *self;
- PyObject *args;
+time_clock(PyObject *self, PyObject *args)
{
if (!PyArg_NoArgs(args))
return NULL;
@@ -173,9 +169,7 @@ time_clock(self, args)
#if defined(MS_WIN32) && !defined(MS_WIN64)
/* Due to Mark Hammond */
static PyObject *
-time_clock(self, args)
- PyObject *self;
- PyObject *args;
+time_clock(PyObject *self, PyObject *args)
{
static LARGE_INTEGER ctrStart;
static LARGE_INTEGER divisor = {0,0};
@@ -217,9 +211,7 @@ the first call to clock(). This has as much precision as the system records.";
#endif
static PyObject *
-time_sleep(self, args)
- PyObject *self;
- PyObject *args;
+time_sleep(PyObject *self, PyObject *args)
{
double secs;
if (!PyArg_Parse(args, "d", &secs))
@@ -237,8 +229,7 @@ Delay execution for a given number of seconds. The argument may be\n\
a floating point number for subsecond precision.";
static PyObject *
-tmtotuple(p)
- struct tm *p;
+tmtotuple(struct tm *p)
{
return Py_BuildValue("(iiiiiiiii)",
p->tm_year + 1900,
@@ -253,9 +244,7 @@ tmtotuple(p)
}
static PyObject *
-time_convert(when, function)
- time_t when;
- struct tm * (*function)(const time_t *);
+time_convert(time_t when, struct tm * (*function)(const time_t *))
{
struct tm *p;
errno = 0;
@@ -274,9 +263,7 @@ time_convert(when, function)
}
static PyObject *
-time_gmtime(self, args)
- PyObject *self;
- PyObject *args;
+time_gmtime(PyObject *self, PyObject *args)
{
double when;
if (!PyArg_Parse(args, "d", &when))
@@ -290,9 +277,7 @@ static char gmtime_doc[] =
Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a. GMT).";
static PyObject *
-time_localtime(self, args)
- PyObject *self;
- PyObject *args;
+time_localtime(PyObject *self, PyObject *args)
{
double when;
if (!PyArg_Parse(args, "d", &when))
@@ -305,9 +290,7 @@ static char localtime_doc[] =
Convert seconds since the Epoch to a time tuple expressing local time.";
static int
-gettmarg(args, p)
- PyObject *args;
- struct tm *p;
+gettmarg(PyObject *args, struct tm *p)
{
int y;
memset((ANY *) p, '\0', sizeof(struct tm));
@@ -351,9 +334,7 @@ gettmarg(args, p)
#ifdef HAVE_STRFTIME
static PyObject *
-time_strftime(self, args)
- PyObject *self;
- PyObject *args;
+time_strftime(PyObject *self, PyObject *args)
{
PyObject *tup;
struct tm buf;
@@ -407,9 +388,7 @@ extern char *strptime(); /* Enable this if it's not declared in <time.h> */
#endif
static PyObject *
-time_strptime(self, args)
- PyObject *self;
- PyObject *args;
+time_strptime(PyObject *self, PyObject *args)
{
struct tm tm;
char *fmt = "%a %b %d %H:%M:%S %Y";
@@ -441,9 +420,7 @@ See the library reference manual for formatting codes (same as strftime()).";
#endif /* HAVE_STRPTIME */
static PyObject *
-time_asctime(self, args)
- PyObject *self;
- PyObject *args;
+time_asctime(PyObject *self, PyObject *args)
{
PyObject *tup;
struct tm buf;
@@ -464,9 +441,7 @@ static char asctime_doc[] =
Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.";
static PyObject *
-time_ctime(self, args)
- PyObject *self;
- PyObject *args;
+time_ctime(PyObject *self, PyObject *args)
{
double dt;
time_t tt;
@@ -495,9 +470,7 @@ This is equivalent to asctime(localtime(seconds)).";
#ifdef HAVE_MKTIME
static PyObject *
-time_mktime(self, args)
- PyObject *self;
- PyObject *args;
+time_mktime(PyObject *self, PyObject *args)
{
PyObject *tup;
struct tm buf;
@@ -549,10 +522,7 @@ static PyMethodDef time_methods[] = {
};
static void
-ins(d, name, v)
- PyObject *d;
- char *name;
- PyObject *v;
+ins(PyObject *d, char *name, PyObject *v)
{
if (v == NULL)
Py_FatalError("Can't initialize time module -- NULL value");