diff options
author | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 17:04:33 +0000 |
---|---|---|
committer | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 17:04:33 +0000 |
commit | 6a85027a97d090e2a7e38bb37d816ca22d072760 (patch) | |
tree | 42eb15029fe97868160358a6f8702402df30dd59 /Modules/cdmodule.c | |
parent | 10723347c61e204224307340dc79f661c43e7ae1 (diff) | |
download | cpython-git-6a85027a97d090e2a7e38bb37d816ca22d072760.tar.gz |
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in)
UNTESTED!
Diffstat (limited to 'Modules/cdmodule.c')
-rw-r--r-- | Modules/cdmodule.c | 126 |
1 files changed, 33 insertions, 93 deletions
diff --git a/Modules/cdmodule.c b/Modules/cdmodule.c index 614eca1b06..a7cfb5428a 100644 --- a/Modules/cdmodule.c +++ b/Modules/cdmodule.c @@ -25,9 +25,7 @@ typedef struct { static PyObject *CdError; /* exception cd.error */ static PyObject * -CD_allowremoval(self, args) - cdplayerobject *self; - PyObject *args; +CD_allowremoval(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":allowremoval")) return NULL; @@ -39,9 +37,7 @@ CD_allowremoval(self, args) } static PyObject * -CD_preventremoval(self, args) - cdplayerobject *self; - PyObject *args; +CD_preventremoval(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":preventremoval")) return NULL; @@ -53,9 +49,7 @@ CD_preventremoval(self, args) } static PyObject * -CD_bestreadsize(self, args) - cdplayerobject *self; - PyObject *args; +CD_bestreadsize(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":bestreadsize")) return NULL; @@ -64,9 +58,7 @@ CD_bestreadsize(self, args) } static PyObject * -CD_close(self, args) - cdplayerobject *self; - PyObject *args; +CD_close(cdplayerobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":close")) return NULL; @@ -82,9 +74,7 @@ CD_close(self, args) } static PyObject * -CD_eject(self, args) - cdplayerobject *self; - PyObject *args; +CD_eject(cdplayerobject *self, PyObject *args) { CDSTATUS status; @@ -105,9 +95,7 @@ CD_eject(self, args) } static PyObject * -CD_getstatus(self, args) - cdplayerobject *self; - PyObject *args; +CD_getstatus(cdplayerobject *self, PyObject *args) { CDSTATUS status; @@ -128,9 +116,7 @@ CD_getstatus(self, args) } static PyObject * -CD_gettrackinfo(self, args) - cdplayerobject *self; - PyObject *args; +CD_gettrackinfo(cdplayerobject *self, PyObject *args) { int track; CDTRACKINFO info; @@ -154,9 +140,7 @@ CD_gettrackinfo(self, args) } static PyObject * -CD_msftoblock(self, args) - cdplayerobject *self; - PyObject *args; +CD_msftoblock(cdplayerobject *self, PyObject *args) { int min, sec, frame; @@ -168,9 +152,7 @@ CD_msftoblock(self, args) } static PyObject * -CD_play(self, args) - cdplayerobject *self; - PyObject *args; +CD_play(cdplayerobject *self, PyObject *args) { int start, play; CDSTATUS status; @@ -192,9 +174,7 @@ CD_play(self, args) } static PyObject * -CD_playabs(self, args) - cdplayerobject *self; - PyObject *args; +CD_playabs(cdplayerobject *self, PyObject *args) { int min, sec, frame, play; CDSTATUS status; @@ -216,9 +196,7 @@ CD_playabs(self, args) } static PyObject * -CD_playtrack(self, args) - cdplayerobject *self; - PyObject *args; +CD_playtrack(cdplayerobject *self, PyObject *args) { int start, play; CDSTATUS status; @@ -240,9 +218,7 @@ CD_playtrack(self, args) } static PyObject * -CD_playtrackabs(self, args) - cdplayerobject *self; - PyObject *args; +CD_playtrackabs(cdplayerobject *self, PyObject *args) { int track, min, sec, frame, play; CDSTATUS status; @@ -265,9 +241,7 @@ CD_playtrackabs(self, args) } static PyObject * -CD_readda(self, args) - cdplayerobject *self; - PyObject *args; +CD_readda(cdplayerobject *self, PyObject *args) { int numframes, n; PyObject *result; @@ -294,9 +268,7 @@ CD_readda(self, args) } static PyObject * -CD_seek(self, args) - cdplayerobject *self; - PyObject *args; +CD_seek(cdplayerobject *self, PyObject *args) { int min, sec, frame; long PyTryBlock; @@ -314,9 +286,7 @@ CD_seek(self, args) } static PyObject * -CD_seektrack(self, args) - cdplayerobject *self; - PyObject *args; +CD_seektrack(cdplayerobject *self, PyObject *args) { int track; long PyTryBlock; @@ -334,9 +304,7 @@ CD_seektrack(self, args) } static PyObject * -CD_seekblock(self, args) - cdplayerobject *self; - PyObject *args; +CD_seekblock(cdplayerobject *self, PyObject *args) { unsigned long PyTryBlock; @@ -353,9 +321,7 @@ CD_seekblock(self, args) } static PyObject * -CD_stop(self, args) - cdplayerobject *self; - PyObject *args; +CD_stop(cdplayerobject *self, PyObject *args) { CDSTATUS status; @@ -376,9 +342,7 @@ CD_stop(self, args) } static PyObject * -CD_togglepause(self, args) - cdplayerobject *self; - PyObject *args; +CD_togglepause(cdplayerobject *self, PyObject *args) { CDSTATUS status; @@ -421,8 +385,7 @@ static PyMethodDef cdplayer_methods[] = { }; static void -cdplayer_dealloc(self) - cdplayerobject *self; +cdplayer_dealloc(cdplayerobject *self) { if (self->ob_cdplayer != NULL) CDclose(self->ob_cdplayer); @@ -430,9 +393,7 @@ cdplayer_dealloc(self) } static PyObject * -cdplayer_getattr(self, name) - cdplayerobject *self; - char *name; +cdplayer_getattr(cdplayerobject *self, char *name) { if (self->ob_cdplayer == NULL) { PyErr_SetString(PyExc_RuntimeError, "no player active"); @@ -457,8 +418,7 @@ PyTypeObject CdPlayertype = { }; static PyObject * -newcdplayerobject(cdp) - CDPLAYER *cdp; +newcdplayerobject(CDPLAYER *cdp) { cdplayerobject *p; @@ -470,8 +430,7 @@ newcdplayerobject(cdp) } static PyObject * -CD_open(self, args) - PyObject *self, *args; +CD_open(PyObject *self, PyObject *args) { char *dev, *direction; CDPLAYER *cdp; @@ -504,10 +463,7 @@ typedef struct { } cdparserobject; static void -CD_callback(arg, type, data) - void *arg; - CDDATATYPES type; - void *data; +CD_callback(void *arg, CDDATATYPES type, void *data) { PyObject *result, *args, *v = NULL; char *p; @@ -578,9 +534,7 @@ CD_callback(arg, type, data) } static PyObject * -CD_deleteparser(self, args) - cdparserobject *self; - PyObject *args; +CD_deleteparser(cdparserobject *self, PyObject *args) { int i; @@ -603,9 +557,7 @@ CD_deleteparser(self, args) } static PyObject * -CD_parseframe(self, args) - cdparserobject *self; - PyObject *args; +CD_parseframe(cdparserobject *self, PyObject *args) { char *cdfp; int length; @@ -633,9 +585,7 @@ CD_parseframe(self, args) } static PyObject * -CD_removecallback(self, args) - cdparserobject *self; - PyObject *args; +CD_removecallback(cdparserobject *self, PyObject *args) { int type; @@ -660,9 +610,7 @@ CD_removecallback(self, args) } static PyObject * -CD_resetparser(self, args) - cdparserobject *self; - PyObject *args; +CD_resetparser(cdparserobject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":resetparser")) return NULL; @@ -674,9 +622,7 @@ CD_resetparser(self, args) } static PyObject * -CD_addcallback(self, args) - cdparserobject *self; - PyObject *args; +CD_addcallback(cdparserobject *self, PyObject *args) { int type; PyObject *func, *funcarg; @@ -728,8 +674,7 @@ static PyMethodDef cdparser_methods[] = { }; static void -cdparser_dealloc(self) - cdparserobject *self; +cdparser_dealloc(cdparserobject *self) { int i; @@ -744,9 +689,7 @@ cdparser_dealloc(self) } static PyObject * -cdparser_getattr(self, name) - cdparserobject *self; - char *name; +cdparser_getattr(cdparserobject *self, char *name) { if (self->ob_cdparser == NULL) { PyErr_SetString(PyExc_RuntimeError, "no parser active"); @@ -772,8 +715,7 @@ PyTypeObject CdParsertype = { }; static PyObject * -newcdparserobject(cdp) - CDPARSER *cdp; +newcdparserobject(CDPARSER *cdp) { cdparserobject *p; int i; @@ -790,8 +732,7 @@ newcdparserobject(cdp) } static PyObject * -CD_createparser(self, args) - PyObject *self, *args; +CD_createparser(PyObject *self, PyObject *args) { CDPARSER *cdp; @@ -807,8 +748,7 @@ CD_createparser(self, args) } static PyObject * -CD_msftoframe(self, args) - PyObject *self, *args; +CD_msftoframe(PyObject *self, PyObject *args) { int min, sec, frame; |