mirror of
https://github.com/python/cpython.git
synced 2025-11-11 22:55:08 +00:00
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in) UNTESTED!
This commit is contained in:
parent
10723347c6
commit
6a85027a97
7 changed files with 769 additions and 2295 deletions
|
|
@ -253,10 +253,7 @@ python2params(int resource1, int resource2, PyObject *list, ALpv **pvsp, ALparam
|
||||||
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
SetConfig(self, args, func)
|
SetConfig(alcobject *self, PyObject *args, int (*func)(ALconfig, int))
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
int (*func)(ALconfig, int);
|
|
||||||
{
|
{
|
||||||
int par;
|
int par;
|
||||||
|
|
||||||
|
|
@ -271,10 +268,7 @@ SetConfig(self, args, func)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
GetConfig(self, args, func)
|
GetConfig(alcobject *self, PyObject *args, int (*func)(ALconfig))
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
int (*func)(ALconfig);
|
|
||||||
{
|
{
|
||||||
int par;
|
int par;
|
||||||
|
|
||||||
|
|
@ -292,9 +286,7 @@ static char alc_SetWidth__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_SetWidth(self, args)
|
alc_SetWidth(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return SetConfig(self, args, alSetWidth);
|
return SetConfig(self, args, alSetWidth);
|
||||||
}
|
}
|
||||||
|
|
@ -305,9 +297,7 @@ static char alc_GetWidth__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_GetWidth(self, args)
|
alc_GetWidth(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return GetConfig(self, args, alGetWidth);
|
return GetConfig(self, args, alGetWidth);
|
||||||
}
|
}
|
||||||
|
|
@ -318,9 +308,7 @@ static char alc_SetSampFmt__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_SetSampFmt(self, args)
|
alc_SetSampFmt(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return SetConfig(self, args, alSetSampFmt);
|
return SetConfig(self, args, alSetSampFmt);
|
||||||
}
|
}
|
||||||
|
|
@ -331,9 +319,7 @@ static char alc_GetSampFmt__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_GetSampFmt(self, args)
|
alc_GetSampFmt(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return GetConfig(self, args, alGetSampFmt);
|
return GetConfig(self, args, alGetSampFmt);
|
||||||
}
|
}
|
||||||
|
|
@ -344,9 +330,7 @@ static char alc_SetChannels__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_SetChannels(self, args)
|
alc_SetChannels(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return SetConfig(self, args, alSetChannels);
|
return SetConfig(self, args, alSetChannels);
|
||||||
}
|
}
|
||||||
|
|
@ -357,9 +341,7 @@ static char alc_GetChannels__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_GetChannels(self, args)
|
alc_GetChannels(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return GetConfig(self, args, alGetChannels);
|
return GetConfig(self, args, alGetChannels);
|
||||||
}
|
}
|
||||||
|
|
@ -370,9 +352,7 @@ static char alc_SetFloatMax__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_SetFloatMax(self, args)
|
alc_SetFloatMax(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
double maximum_value;
|
double maximum_value;
|
||||||
|
|
||||||
|
|
@ -390,9 +370,7 @@ static char alc_GetFloatMax__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_GetFloatMax(self, args)
|
alc_GetFloatMax(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
double maximum_value;
|
double maximum_value;
|
||||||
|
|
||||||
|
|
@ -409,9 +387,7 @@ static char alc_SetDevice__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_SetDevice(self, args)
|
alc_SetDevice(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return SetConfig(self, args, alSetDevice);
|
return SetConfig(self, args, alSetDevice);
|
||||||
}
|
}
|
||||||
|
|
@ -422,9 +398,7 @@ static char alc_GetDevice__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_GetDevice(self, args)
|
alc_GetDevice(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return GetConfig(self, args, alGetDevice);
|
return GetConfig(self, args, alGetDevice);
|
||||||
}
|
}
|
||||||
|
|
@ -435,9 +409,7 @@ static char alc_SetQueueSize__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_SetQueueSize(self, args)
|
alc_SetQueueSize(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return SetConfig(self, args, alSetQueueSize);
|
return SetConfig(self, args, alSetQueueSize);
|
||||||
}
|
}
|
||||||
|
|
@ -448,9 +420,7 @@ static char alc_GetQueueSize__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_GetQueueSize(self, args)
|
alc_GetQueueSize(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return GetConfig(self, args, alGetQueueSize);
|
return GetConfig(self, args, alGetQueueSize);
|
||||||
}
|
}
|
||||||
|
|
@ -458,10 +428,7 @@ alc_GetQueueSize(self, args)
|
||||||
#endif /* AL_NO_ELEM */
|
#endif /* AL_NO_ELEM */
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
setconfig(self, args, func)
|
setconfig(alcobject *self, PyObject *args, int (*func)(ALconfig, long))
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
int (*func)(ALconfig, long);
|
|
||||||
{
|
{
|
||||||
long par;
|
long par;
|
||||||
|
|
||||||
|
|
@ -476,10 +443,7 @@ setconfig(self, args, func)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
getconfig(self, args, func)
|
getconfig(alcobject *self, PyObject *args, long (*func)(ALconfig))
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
long (*func)(ALconfig);
|
|
||||||
{
|
{
|
||||||
long par;
|
long par;
|
||||||
|
|
||||||
|
|
@ -493,49 +457,37 @@ getconfig(self, args, func)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_setqueuesize (self, args)
|
alc_setqueuesize (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return setconfig(self, args, ALsetqueuesize);
|
return setconfig(self, args, ALsetqueuesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_getqueuesize (self, args)
|
alc_getqueuesize (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return getconfig(self, args, ALgetqueuesize);
|
return getconfig(self, args, ALgetqueuesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_setwidth (self, args)
|
alc_setwidth (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return setconfig(self, args, ALsetwidth);
|
return setconfig(self, args, ALsetwidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_getwidth (self, args)
|
alc_getwidth (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return getconfig(self, args, ALgetwidth);
|
return getconfig(self, args, ALgetwidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_getchannels (self, args)
|
alc_getchannels (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return getconfig(self, args, ALgetchannels);
|
return getconfig(self, args, ALgetchannels);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_setchannels (self, args)
|
alc_setchannels (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return setconfig(self, args, ALsetchannels);
|
return setconfig(self, args, ALsetchannels);
|
||||||
}
|
}
|
||||||
|
|
@ -543,25 +495,19 @@ alc_setchannels (self, args)
|
||||||
#ifdef AL_405
|
#ifdef AL_405
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_getsampfmt (self, args)
|
alc_getsampfmt (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return getconfig(self, args, ALgetsampfmt);
|
return getconfig(self, args, ALgetsampfmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_setsampfmt (self, args)
|
alc_setsampfmt (alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
return setconfig(self, args, ALsetsampfmt);
|
return setconfig(self, args, ALsetsampfmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_getfloatmax(self, args)
|
alc_getfloatmax(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
double arg;
|
double arg;
|
||||||
|
|
||||||
|
|
@ -573,9 +519,7 @@ alc_getfloatmax(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_setfloatmax(self, args)
|
alc_setfloatmax(alcobject *self, PyObject *args)
|
||||||
alcobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
double arg;
|
double arg;
|
||||||
|
|
||||||
|
|
@ -637,8 +581,7 @@ newalcobject(ALconfig config)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
alc_dealloc(self)
|
alc_dealloc(alcobject *self)
|
||||||
alcobject *self;
|
|
||||||
{
|
{
|
||||||
/* XXXX Add your own cleanup code here */
|
/* XXXX Add your own cleanup code here */
|
||||||
#ifdef AL_NO_ELEM /* IRIX 6 */
|
#ifdef AL_NO_ELEM /* IRIX 6 */
|
||||||
|
|
@ -650,9 +593,7 @@ alc_dealloc(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alc_getattr(self, name)
|
alc_getattr(alcobject *self, char *name)
|
||||||
alcobject *self;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
/* XXXX Add your own getattr code here */
|
/* XXXX Add your own getattr code here */
|
||||||
return Py_FindMethod(alc_methods, (PyObject *)self, name);
|
return Py_FindMethod(alc_methods, (PyObject *)self, name);
|
||||||
|
|
@ -697,9 +638,7 @@ static char alp_SetConfig__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_SetConfig(self, args)
|
alp_SetConfig(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
alcobject *config;
|
alcobject *config;
|
||||||
if (!PyArg_ParseTuple(args, "O!:SetConfig", &Alctype, &config))
|
if (!PyArg_ParseTuple(args, "O!:SetConfig", &Alctype, &config))
|
||||||
|
|
@ -716,9 +655,7 @@ static char alp_GetConfig__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetConfig(self, args)
|
alp_GetConfig(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
ALconfig config;
|
ALconfig config;
|
||||||
if (!PyArg_ParseTuple(args, ":GetConfig"))
|
if (!PyArg_ParseTuple(args, ":GetConfig"))
|
||||||
|
|
@ -734,9 +671,7 @@ static char alp_GetResource__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetResource(self, args)
|
alp_GetResource(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int resource;
|
int resource;
|
||||||
|
|
||||||
|
|
@ -753,9 +688,7 @@ static char alp_GetFD__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetFD(self, args)
|
alp_GetFD(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
|
|
@ -774,9 +707,7 @@ static char alp_GetFilled__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetFilled(self, args)
|
alp_GetFilled(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int filled;
|
int filled;
|
||||||
|
|
||||||
|
|
@ -793,9 +724,7 @@ static char alp_GetFillable__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetFillable(self, args)
|
alp_GetFillable(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int fillable;
|
int fillable;
|
||||||
|
|
||||||
|
|
@ -812,9 +741,7 @@ static char alp_ReadFrames__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_ReadFrames(self, args)
|
alp_ReadFrames(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
void *samples;
|
void *samples;
|
||||||
int framecount;
|
int framecount;
|
||||||
|
|
@ -883,9 +810,7 @@ static char alp_DiscardFrames__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_DiscardFrames(self, args)
|
alp_DiscardFrames(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int framecount;
|
int framecount;
|
||||||
|
|
||||||
|
|
@ -908,9 +833,7 @@ static char alp_ZeroFrames__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_ZeroFrames(self, args)
|
alp_ZeroFrames(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int framecount;
|
int framecount;
|
||||||
|
|
||||||
|
|
@ -936,9 +859,7 @@ static char alp_SetFillPoint__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_SetFillPoint(self, args)
|
alp_SetFillPoint(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int fillpoint;
|
int fillpoint;
|
||||||
|
|
||||||
|
|
@ -958,9 +879,7 @@ static char alp_GetFillPoint__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetFillPoint(self, args)
|
alp_GetFillPoint(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int fillpoint;
|
int fillpoint;
|
||||||
|
|
||||||
|
|
@ -979,9 +898,7 @@ static char alp_GetFrameNumber__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetFrameNumber(self, args)
|
alp_GetFrameNumber(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
stamp_t fnum;
|
stamp_t fnum;
|
||||||
|
|
||||||
|
|
@ -1000,9 +917,7 @@ static char alp_GetFrameTime__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_GetFrameTime(self, args)
|
alp_GetFrameTime(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
stamp_t fnum, time;
|
stamp_t fnum, time;
|
||||||
PyObject *ret, *v0, *v1;
|
PyObject *ret, *v0, *v1;
|
||||||
|
|
@ -1030,9 +945,7 @@ static char alp_WriteFrames__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_WriteFrames(self, args)
|
alp_WriteFrames(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char *samples;
|
char *samples;
|
||||||
int length;
|
int length;
|
||||||
|
|
@ -1098,9 +1011,7 @@ static char alp_ClosePort__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_ClosePort(self, args)
|
alp_ClosePort(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args, ":ClosePort"))
|
if (!PyArg_ParseTuple(args, ":ClosePort"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -1115,9 +1026,7 @@ alp_ClosePort(self, args)
|
||||||
|
|
||||||
#ifdef OLD_INTERFACE
|
#ifdef OLD_INTERFACE
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_closeport(self, args)
|
alp_closeport(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args, ":ClosePort"))
|
if (!PyArg_ParseTuple(args, ":ClosePort"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -1129,9 +1038,7 @@ alp_closeport(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_getfd(self, args)
|
alp_getfd(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
|
|
@ -1143,9 +1050,7 @@ alp_getfd(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_getfilled(self, args)
|
alp_getfilled(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
long count;
|
long count;
|
||||||
|
|
||||||
|
|
@ -1157,9 +1062,7 @@ alp_getfilled(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_getfillable(self, args)
|
alp_getfillable(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
long count;
|
long count;
|
||||||
|
|
||||||
|
|
@ -1171,9 +1074,7 @@ alp_getfillable(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_readsamps(self, args)
|
alp_readsamps(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
long count;
|
long count;
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
|
|
@ -1218,9 +1119,7 @@ alp_readsamps(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_writesamps(self, args)
|
alp_writesamps(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
int size, width;
|
int size, width;
|
||||||
|
|
@ -1254,9 +1153,7 @@ alp_writesamps(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_getfillpoint(self, args)
|
alp_getfillpoint(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
long count;
|
long count;
|
||||||
|
|
||||||
|
|
@ -1268,9 +1165,7 @@ alp_getfillpoint(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_setfillpoint(self, args)
|
alp_setfillpoint(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
long count;
|
long count;
|
||||||
|
|
||||||
|
|
@ -1283,9 +1178,7 @@ alp_setfillpoint(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_setconfig(self, args)
|
alp_setconfig(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
alcobject *config;
|
alcobject *config;
|
||||||
|
|
||||||
|
|
@ -1298,9 +1191,7 @@ alp_setconfig(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_getconfig(self, args)
|
alp_getconfig(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
ALconfig config;
|
ALconfig config;
|
||||||
|
|
||||||
|
|
@ -1314,9 +1205,7 @@ alp_getconfig(self, args)
|
||||||
|
|
||||||
#ifdef AL_405
|
#ifdef AL_405
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_getstatus(self, args)
|
alp_getstatus(alpobject *self, PyObject *args)
|
||||||
alpobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
PyObject *list, *v;
|
PyObject *list, *v;
|
||||||
long *PVbuffer;
|
long *PVbuffer;
|
||||||
|
|
@ -1410,8 +1299,7 @@ newalpobject(ALport port)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
alp_dealloc(self)
|
alp_dealloc(alpobject *self)
|
||||||
alpobject *self;
|
|
||||||
{
|
{
|
||||||
/* XXXX Add your own cleanup code here */
|
/* XXXX Add your own cleanup code here */
|
||||||
if (self->port) {
|
if (self->port) {
|
||||||
|
|
@ -1425,9 +1313,7 @@ alp_dealloc(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
alp_getattr(self, name)
|
alp_getattr(alpobject *self, char *name)
|
||||||
alpobject *self;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
/* XXXX Add your own getattr code here */
|
/* XXXX Add your own getattr code here */
|
||||||
if (self->port == NULL) {
|
if (self->port == NULL) {
|
||||||
|
|
@ -1477,9 +1363,7 @@ static char al_NewConfig__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_NewConfig(self, args)
|
al_NewConfig(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
ALconfig config;
|
ALconfig config;
|
||||||
|
|
||||||
|
|
@ -1495,9 +1379,7 @@ static char al_OpenPort__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_OpenPort(self, args)
|
al_OpenPort(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
ALport port;
|
ALport port;
|
||||||
char *name, *dir;
|
char *name, *dir;
|
||||||
|
|
@ -1515,9 +1397,7 @@ static char al_Connect__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_Connect(self, args)
|
al_Connect(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int source, dest, nprops = 0, id, i;
|
int source, dest, nprops = 0, id, i;
|
||||||
ALpv *props = NULL;
|
ALpv *props = NULL;
|
||||||
|
|
@ -1557,9 +1437,7 @@ static char al_Disconnect__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_Disconnect(self, args)
|
al_Disconnect(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
|
@ -1576,9 +1454,7 @@ static char al_GetParams__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_GetParams(self, args)
|
al_GetParams(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int resource;
|
int resource;
|
||||||
PyObject *pvslist, *item = NULL, *v = NULL;
|
PyObject *pvslist, *item = NULL, *v = NULL;
|
||||||
|
|
@ -1722,9 +1598,7 @@ static char al_SetParams__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_SetParams(self, args)
|
al_SetParams(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int resource;
|
int resource;
|
||||||
PyObject *pvslist, *item;
|
PyObject *pvslist, *item;
|
||||||
|
|
@ -1770,9 +1644,7 @@ static char al_QueryValues__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_QueryValues(self, args)
|
al_QueryValues(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int resource, param;
|
int resource, param;
|
||||||
ALvalue *return_set = NULL;
|
ALvalue *return_set = NULL;
|
||||||
|
|
@ -1852,9 +1724,7 @@ static char al_GetParamInfo__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_GetParamInfo(self, args)
|
al_GetParamInfo(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int res, param;
|
int res, param;
|
||||||
ALparamInfo pinfo;
|
ALparamInfo pinfo;
|
||||||
|
|
@ -1937,9 +1807,7 @@ static char al_GetResourceByName__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_GetResourceByName(self, args)
|
al_GetResourceByName(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int res, start_res, type;
|
int res, start_res, type;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
@ -1956,9 +1824,7 @@ static char al_IsSubtype__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_IsSubtype(self, args)
|
al_IsSubtype(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int type, subtype;
|
int type, subtype;
|
||||||
|
|
||||||
|
|
@ -1972,9 +1838,7 @@ static char al_SetErrorHandler__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_SetErrorHandler(self, args)
|
al_SetErrorHandler(PyObject *self, PyObject *args)
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, ":SetErrorHandler"))
|
if (!PyArg_ParseTuple(args, ":SetErrorHandler"))
|
||||||
|
|
@ -1988,8 +1852,7 @@ al_SetErrorHandler(self, args)
|
||||||
#ifdef OLD_INTERFACE
|
#ifdef OLD_INTERFACE
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_openport(self, args)
|
al_openport(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
char *name, *dir;
|
char *name, *dir;
|
||||||
ALport port;
|
ALport port;
|
||||||
|
|
@ -2003,8 +1866,7 @@ al_openport(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_newconfig(self, args)
|
al_newconfig(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
ALconfig config;
|
ALconfig config;
|
||||||
|
|
||||||
|
|
@ -2016,8 +1878,7 @@ al_newconfig(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_queryparams(self, args)
|
al_queryparams(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
long device;
|
long device;
|
||||||
long length;
|
long length;
|
||||||
|
|
@ -2042,10 +1903,7 @@ al_queryparams(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
doParams(args, func, modified)
|
doParams(PyObject *args, int (*func)(long, long *, long), int modified)
|
||||||
PyObject *args;
|
|
||||||
int (*func)(long, long *, long);
|
|
||||||
int modified;
|
|
||||||
{
|
{
|
||||||
long device;
|
long device;
|
||||||
PyObject *list, *v;
|
PyObject *list, *v;
|
||||||
|
|
@ -2086,22 +1944,19 @@ doParams(args, func, modified)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_getparams(self, args)
|
al_getparams(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
return doParams(args, ALgetparams, 1);
|
return doParams(args, ALgetparams, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_setparams(self, args)
|
al_setparams(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
return doParams(args, ALsetparams, 0);
|
return doParams(args, ALsetparams, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_getname(self, args)
|
al_getname(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
long device, descriptor;
|
long device, descriptor;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
@ -2114,8 +1969,7 @@ al_getname(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_getdefault(self, args)
|
al_getdefault(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
long device, descriptor, value;
|
long device, descriptor, value;
|
||||||
|
|
||||||
|
|
@ -2127,8 +1981,7 @@ al_getdefault(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
al_getminmax(self, args)
|
al_getminmax(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
long device, descriptor, min, max;
|
long device, descriptor, min, max;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,7 @@ typedef struct {
|
||||||
static PyObject *CdError; /* exception cd.error */
|
static PyObject *CdError; /* exception cd.error */
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_allowremoval(self, args)
|
CD_allowremoval(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args, ":allowremoval"))
|
if (!PyArg_ParseTuple(args, ":allowremoval"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -39,9 +37,7 @@ CD_allowremoval(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_preventremoval(self, args)
|
CD_preventremoval(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args, ":preventremoval"))
|
if (!PyArg_ParseTuple(args, ":preventremoval"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -53,9 +49,7 @@ CD_preventremoval(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_bestreadsize(self, args)
|
CD_bestreadsize(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args, ":bestreadsize"))
|
if (!PyArg_ParseTuple(args, ":bestreadsize"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -64,9 +58,7 @@ CD_bestreadsize(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_close(self, args)
|
CD_close(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args, ":close"))
|
if (!PyArg_ParseTuple(args, ":close"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -82,9 +74,7 @@ CD_close(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_eject(self, args)
|
CD_eject(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
||||||
|
|
@ -105,9 +95,7 @@ CD_eject(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_getstatus(self, args)
|
CD_getstatus(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
||||||
|
|
@ -128,9 +116,7 @@ CD_getstatus(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_gettrackinfo(self, args)
|
CD_gettrackinfo(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int track;
|
int track;
|
||||||
CDTRACKINFO info;
|
CDTRACKINFO info;
|
||||||
|
|
@ -154,9 +140,7 @@ CD_gettrackinfo(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_msftoblock(self, args)
|
CD_msftoblock(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int min, sec, frame;
|
int min, sec, frame;
|
||||||
|
|
||||||
|
|
@ -168,9 +152,7 @@ CD_msftoblock(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_play(self, args)
|
CD_play(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int start, play;
|
int start, play;
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
@ -192,9 +174,7 @@ CD_play(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_playabs(self, args)
|
CD_playabs(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int min, sec, frame, play;
|
int min, sec, frame, play;
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
@ -216,9 +196,7 @@ CD_playabs(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_playtrack(self, args)
|
CD_playtrack(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int start, play;
|
int start, play;
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
@ -240,9 +218,7 @@ CD_playtrack(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_playtrackabs(self, args)
|
CD_playtrackabs(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int track, min, sec, frame, play;
|
int track, min, sec, frame, play;
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
@ -265,9 +241,7 @@ CD_playtrackabs(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_readda(self, args)
|
CD_readda(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int numframes, n;
|
int numframes, n;
|
||||||
PyObject *result;
|
PyObject *result;
|
||||||
|
|
@ -294,9 +268,7 @@ CD_readda(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_seek(self, args)
|
CD_seek(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int min, sec, frame;
|
int min, sec, frame;
|
||||||
long PyTryBlock;
|
long PyTryBlock;
|
||||||
|
|
@ -314,9 +286,7 @@ CD_seek(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_seektrack(self, args)
|
CD_seektrack(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int track;
|
int track;
|
||||||
long PyTryBlock;
|
long PyTryBlock;
|
||||||
|
|
@ -334,9 +304,7 @@ CD_seektrack(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_seekblock(self, args)
|
CD_seekblock(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
unsigned long PyTryBlock;
|
unsigned long PyTryBlock;
|
||||||
|
|
||||||
|
|
@ -353,9 +321,7 @@ CD_seekblock(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_stop(self, args)
|
CD_stop(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
||||||
|
|
@ -376,9 +342,7 @@ CD_stop(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_togglepause(self, args)
|
CD_togglepause(cdplayerobject *self, PyObject *args)
|
||||||
cdplayerobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
|
|
||||||
|
|
@ -421,8 +385,7 @@ static PyMethodDef cdplayer_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cdplayer_dealloc(self)
|
cdplayer_dealloc(cdplayerobject *self)
|
||||||
cdplayerobject *self;
|
|
||||||
{
|
{
|
||||||
if (self->ob_cdplayer != NULL)
|
if (self->ob_cdplayer != NULL)
|
||||||
CDclose(self->ob_cdplayer);
|
CDclose(self->ob_cdplayer);
|
||||||
|
|
@ -430,9 +393,7 @@ cdplayer_dealloc(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
cdplayer_getattr(self, name)
|
cdplayer_getattr(cdplayerobject *self, char *name)
|
||||||
cdplayerobject *self;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
if (self->ob_cdplayer == NULL) {
|
if (self->ob_cdplayer == NULL) {
|
||||||
PyErr_SetString(PyExc_RuntimeError, "no player active");
|
PyErr_SetString(PyExc_RuntimeError, "no player active");
|
||||||
|
|
@ -457,8 +418,7 @@ PyTypeObject CdPlayertype = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
newcdplayerobject(cdp)
|
newcdplayerobject(CDPLAYER *cdp)
|
||||||
CDPLAYER *cdp;
|
|
||||||
{
|
{
|
||||||
cdplayerobject *p;
|
cdplayerobject *p;
|
||||||
|
|
||||||
|
|
@ -470,8 +430,7 @@ newcdplayerobject(cdp)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_open(self, args)
|
CD_open(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
char *dev, *direction;
|
char *dev, *direction;
|
||||||
CDPLAYER *cdp;
|
CDPLAYER *cdp;
|
||||||
|
|
@ -504,10 +463,7 @@ typedef struct {
|
||||||
} cdparserobject;
|
} cdparserobject;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CD_callback(arg, type, data)
|
CD_callback(void *arg, CDDATATYPES type, void *data)
|
||||||
void *arg;
|
|
||||||
CDDATATYPES type;
|
|
||||||
void *data;
|
|
||||||
{
|
{
|
||||||
PyObject *result, *args, *v = NULL;
|
PyObject *result, *args, *v = NULL;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
@ -578,9 +534,7 @@ CD_callback(arg, type, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_deleteparser(self, args)
|
CD_deleteparser(cdparserobject *self, PyObject *args)
|
||||||
cdparserobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
@ -603,9 +557,7 @@ CD_deleteparser(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_parseframe(self, args)
|
CD_parseframe(cdparserobject *self, PyObject *args)
|
||||||
cdparserobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char *cdfp;
|
char *cdfp;
|
||||||
int length;
|
int length;
|
||||||
|
|
@ -633,9 +585,7 @@ CD_parseframe(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_removecallback(self, args)
|
CD_removecallback(cdparserobject *self, PyObject *args)
|
||||||
cdparserobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
|
|
@ -660,9 +610,7 @@ CD_removecallback(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_resetparser(self, args)
|
CD_resetparser(cdparserobject *self, PyObject *args)
|
||||||
cdparserobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args, ":resetparser"))
|
if (!PyArg_ParseTuple(args, ":resetparser"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -674,9 +622,7 @@ CD_resetparser(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_addcallback(self, args)
|
CD_addcallback(cdparserobject *self, PyObject *args)
|
||||||
cdparserobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
PyObject *func, *funcarg;
|
PyObject *func, *funcarg;
|
||||||
|
|
@ -728,8 +674,7 @@ static PyMethodDef cdparser_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cdparser_dealloc(self)
|
cdparser_dealloc(cdparserobject *self)
|
||||||
cdparserobject *self;
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
@ -744,9 +689,7 @@ cdparser_dealloc(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
cdparser_getattr(self, name)
|
cdparser_getattr(cdparserobject *self, char *name)
|
||||||
cdparserobject *self;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
if (self->ob_cdparser == NULL) {
|
if (self->ob_cdparser == NULL) {
|
||||||
PyErr_SetString(PyExc_RuntimeError, "no parser active");
|
PyErr_SetString(PyExc_RuntimeError, "no parser active");
|
||||||
|
|
@ -772,8 +715,7 @@ PyTypeObject CdParsertype = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
newcdparserobject(cdp)
|
newcdparserobject(CDPARSER *cdp)
|
||||||
CDPARSER *cdp;
|
|
||||||
{
|
{
|
||||||
cdparserobject *p;
|
cdparserobject *p;
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -790,8 +732,7 @@ newcdparserobject(cdp)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_createparser(self, args)
|
CD_createparser(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
CDPARSER *cdp;
|
CDPARSER *cdp;
|
||||||
|
|
||||||
|
|
@ -807,8 +748,7 @@ CD_createparser(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
CD_msftoframe(self, args)
|
CD_msftoframe(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
int min, sec, frame;
|
int min, sec, frame;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
one argument. */
|
one argument. */
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetObject(args, nargs, i, p_arg)
|
PyArg_GetObject(register PyObject *args, int nargs, int i, PyObject **p_arg)
|
||||||
register PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
PyObject **p_arg;
|
|
||||||
{
|
{
|
||||||
if (nargs != 1) {
|
if (nargs != 1) {
|
||||||
if (args == NULL || !PyTuple_Check(args) ||
|
if (args == NULL || !PyTuple_Check(args) ||
|
||||||
|
|
@ -43,10 +40,7 @@ PyArg_GetObject(args, nargs, i, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetLong(args, nargs, i, p_arg)
|
PyArg_GetLong(register PyObject *args, int nargs, int i, long *p_arg)
|
||||||
register PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
long *p_arg;
|
|
||||||
{
|
{
|
||||||
if (nargs != 1) {
|
if (nargs != 1) {
|
||||||
if (args == NULL || !PyTuple_Check(args) ||
|
if (args == NULL || !PyTuple_Check(args) ||
|
||||||
|
|
@ -64,10 +58,7 @@ PyArg_GetLong(args, nargs, i, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetShort(args, nargs, i, p_arg)
|
PyArg_GetShort(register PyObject *args, int nargs, int i, short *p_arg)
|
||||||
register PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
short *p_arg;
|
|
||||||
{
|
{
|
||||||
long x;
|
long x;
|
||||||
if (!PyArg_GetLong(args, nargs, i, &x))
|
if (!PyArg_GetLong(args, nargs, i, &x))
|
||||||
|
|
@ -77,9 +68,7 @@ PyArg_GetShort(args, nargs, i, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extractdouble(v, p_arg)
|
extractdouble(register PyObject *v, double *p_arg)
|
||||||
register PyObject *v;
|
|
||||||
double *p_arg;
|
|
||||||
{
|
{
|
||||||
if (v == NULL) {
|
if (v == NULL) {
|
||||||
/* Fall through to error return at end of function */
|
/* Fall through to error return at end of function */
|
||||||
|
|
@ -100,9 +89,7 @@ extractdouble(v, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extractfloat(v, p_arg)
|
extractfloat(register PyObject *v, float *p_arg)
|
||||||
register PyObject *v;
|
|
||||||
float *p_arg;
|
|
||||||
{
|
{
|
||||||
if (v == NULL) {
|
if (v == NULL) {
|
||||||
/* Fall through to error return at end of function */
|
/* Fall through to error return at end of function */
|
||||||
|
|
@ -123,10 +110,7 @@ extractfloat(v, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetFloat(args, nargs, i, p_arg)
|
PyArg_GetFloat(register PyObject *args, int nargs, int i, float *p_arg)
|
||||||
register PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
float *p_arg;
|
|
||||||
{
|
{
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
float x;
|
float x;
|
||||||
|
|
@ -139,10 +123,7 @@ PyArg_GetFloat(args, nargs, i, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetString(args, nargs, i, p_arg)
|
PyArg_GetString(PyObject *args, int nargs, int i, string *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
string *p_arg;
|
|
||||||
{
|
{
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
if (!PyArg_GetObject(args, nargs, i, &v))
|
if (!PyArg_GetObject(args, nargs, i, &v))
|
||||||
|
|
@ -155,10 +136,7 @@ PyArg_GetString(args, nargs, i, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetChar(args, nargs, i, p_arg)
|
PyArg_GetChar(PyObject *args, int nargs, int i, char *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
char *p_arg;
|
|
||||||
{
|
{
|
||||||
string x;
|
string x;
|
||||||
if (!PyArg_GetString(args, nargs, i, &x))
|
if (!PyArg_GetString(args, nargs, i, &x))
|
||||||
|
|
@ -172,10 +150,7 @@ PyArg_GetChar(args, nargs, i, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetLongArraySize(args, nargs, i, p_arg)
|
PyArg_GetLongArraySize(PyObject *args, int nargs, int i, long *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
long *p_arg;
|
|
||||||
{
|
{
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
if (!PyArg_GetObject(args, nargs, i, &v))
|
if (!PyArg_GetObject(args, nargs, i, &v))
|
||||||
|
|
@ -192,10 +167,7 @@ PyArg_GetLongArraySize(args, nargs, i, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetShortArraySize(args, nargs, i, p_arg)
|
PyArg_GetShortArraySize(PyObject *args, int nargs, int i, short *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
short *p_arg;
|
|
||||||
{
|
{
|
||||||
long x;
|
long x;
|
||||||
if (!PyArg_GetLongArraySize(args, nargs, i, &x))
|
if (!PyArg_GetLongArraySize(args, nargs, i, &x))
|
||||||
|
|
@ -207,11 +179,7 @@ PyArg_GetShortArraySize(args, nargs, i, p_arg)
|
||||||
/* XXX The following four are too similar. Should share more code. */
|
/* XXX The following four are too similar. Should share more code. */
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetLongArray(args, nargs, i, n, p_arg)
|
PyArg_GetLongArray(PyObject *args, int nargs, int i, int n, long *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
int n;
|
|
||||||
long *p_arg; /* [n] */
|
|
||||||
{
|
{
|
||||||
PyObject *v, *w;
|
PyObject *v, *w;
|
||||||
if (!PyArg_GetObject(args, nargs, i, &v))
|
if (!PyArg_GetObject(args, nargs, i, &v))
|
||||||
|
|
@ -248,11 +216,7 @@ PyArg_GetLongArray(args, nargs, i, n, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetShortArray(args, nargs, i, n, p_arg)
|
PyArg_GetShortArray(PyObject *args, int nargs, int i, int n, short *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
int n;
|
|
||||||
short *p_arg; /* [n] */
|
|
||||||
{
|
{
|
||||||
PyObject *v, *w;
|
PyObject *v, *w;
|
||||||
if (!PyArg_GetObject(args, nargs, i, &v))
|
if (!PyArg_GetObject(args, nargs, i, &v))
|
||||||
|
|
@ -289,11 +253,7 @@ PyArg_GetShortArray(args, nargs, i, n, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetDoubleArray(args, nargs, i, n, p_arg)
|
PyArg_GetDoubleArray(PyObject *args, int nargs, int i, int n, double *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
int n;
|
|
||||||
double *p_arg; /* [n] */
|
|
||||||
{
|
{
|
||||||
PyObject *v, *w;
|
PyObject *v, *w;
|
||||||
if (!PyArg_GetObject(args, nargs, i, &v))
|
if (!PyArg_GetObject(args, nargs, i, &v))
|
||||||
|
|
@ -326,11 +286,7 @@ PyArg_GetDoubleArray(args, nargs, i, n, p_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyArg_GetFloatArray(args, nargs, i, n, p_arg)
|
PyArg_GetFloatArray(PyObject *args, int nargs, int i, int n, float *p_arg)
|
||||||
PyObject *args;
|
|
||||||
int nargs, i;
|
|
||||||
int n;
|
|
||||||
float *p_arg; /* [n] */
|
|
||||||
{
|
{
|
||||||
PyObject *v, *w;
|
PyObject *v, *w;
|
||||||
if (!PyArg_GetObject(args, nargs, i, &v))
|
if (!PyArg_GetObject(args, nargs, i, &v))
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -29,8 +29,7 @@ staticforward PyTypeObject Fhtype;
|
||||||
#define is_fhobject(v) ((v)->ob_type == &Fhtype)
|
#define is_fhobject(v) ((v)->ob_type == &Fhtype)
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
newfhobject(fh)
|
newfhobject(fmfonthandle fh)
|
||||||
fmfonthandle fh;
|
|
||||||
{
|
{
|
||||||
fhobject *fhp;
|
fhobject *fhp;
|
||||||
if (fh == NULL) {
|
if (fh == NULL) {
|
||||||
|
|
@ -48,9 +47,7 @@ newfhobject(fh)
|
||||||
/* Font Handle methods */
|
/* Font Handle methods */
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_scalefont(self, args)
|
fh_scalefont(fhobject *self, PyObject *args)
|
||||||
fhobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
double size;
|
double size;
|
||||||
if (!PyArg_Parse(args, "d", &size))
|
if (!PyArg_Parse(args, "d", &size))
|
||||||
|
|
@ -61,9 +58,7 @@ PyObject *args;
|
||||||
/* XXX fmmakefont */
|
/* XXX fmmakefont */
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_setfont(self, args)
|
fh_setfont(fhobject *self, PyObject *args)
|
||||||
fhobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_NoArgs(args))
|
if (!PyArg_NoArgs(args))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -73,9 +68,7 @@ PyObject *args;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_getfontname(self, args)
|
fh_getfontname(fhobject *self, PyObject *args)
|
||||||
fhobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char fontname[256];
|
char fontname[256];
|
||||||
int len;
|
int len;
|
||||||
|
|
@ -90,9 +83,7 @@ PyObject *args;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_getcomment(self, args)
|
fh_getcomment(fhobject *self, PyObject *args)
|
||||||
fhobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char comment[256];
|
char comment[256];
|
||||||
int len;
|
int len;
|
||||||
|
|
@ -107,9 +98,7 @@ PyObject *args;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_getfontinfo(self, args)
|
fh_getfontinfo(fhobject *self, PyObject *args)
|
||||||
fhobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
fmfontinfo info;
|
fmfontinfo info;
|
||||||
if (!PyArg_NoArgs(args))
|
if (!PyArg_NoArgs(args))
|
||||||
|
|
@ -131,17 +120,13 @@ PyObject *args;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_getwholemetrics(self, args)
|
fh_getwholemetrics(fhobject *self, PyObject *args)
|
||||||
fhobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_getstrwidth(self, args)
|
fh_getstrwidth(fhobject *self, PyObject *args)
|
||||||
fhobject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
if (!PyArg_Parse(args, "s", &str))
|
if (!PyArg_Parse(args, "s", &str))
|
||||||
|
|
@ -163,16 +148,13 @@ static PyMethodDef fh_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fh_getattr(fhp, name)
|
fh_getattr(fhobject *fhp, char *name)
|
||||||
fhobject *fhp;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
return Py_FindMethod(fh_methods, (PyObject *)fhp, name);
|
return Py_FindMethod(fh_methods, (PyObject *)fhp, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fh_dealloc(fhp)
|
fh_dealloc(fhobject *fhp)
|
||||||
fhobject *fhp;
|
|
||||||
{
|
{
|
||||||
fmfreefont(fhp->fh_fh);
|
fmfreefont(fhp->fh_fh);
|
||||||
PyObject_Del(fhp);
|
PyObject_Del(fhp);
|
||||||
|
|
@ -197,8 +179,7 @@ static PyTypeObject Fhtype = {
|
||||||
/* Font Manager functions */
|
/* Font Manager functions */
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fm_init(self, args)
|
fm_init(PyObject *self, *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_NoArgs(args))
|
if (!PyArg_NoArgs(args))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -208,8 +189,7 @@ fm_init(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fm_findfont(self, args)
|
fm_findfont(PyObject *self, *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
if (!PyArg_Parse(args, "s", &str))
|
if (!PyArg_Parse(args, "s", &str))
|
||||||
|
|
@ -218,8 +198,7 @@ fm_findfont(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fm_prstr(self, args)
|
fm_prstr(PyObject *self, *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
if (!PyArg_Parse(args, "s", &str))
|
if (!PyArg_Parse(args, "s", &str))
|
||||||
|
|
@ -234,8 +213,7 @@ fm_prstr(self, args)
|
||||||
static PyObject *fontlist;
|
static PyObject *fontlist;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clientproc(fontname)
|
clientproc(char *fontname)
|
||||||
char *fontname;
|
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
|
|
@ -255,8 +233,7 @@ clientproc(fontname)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fm_enumerate(self, args)
|
fm_enumerate(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
PyObject *res;
|
PyObject *res;
|
||||||
if (!PyArg_NoArgs(args))
|
if (!PyArg_NoArgs(args))
|
||||||
|
|
@ -271,8 +248,7 @@ fm_enumerate(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fm_setpath(self, args)
|
fm_setpath(PyObject *self, PyObject *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
if (!PyArg_Parse(args, "s", &str))
|
if (!PyArg_Parse(args, "s", &str))
|
||||||
|
|
@ -283,8 +259,7 @@ fm_setpath(self, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
fm_fontpath(self, args)
|
fm_fontpath(PyObject *self, *args)
|
||||||
PyObject *self, *args;
|
|
||||||
{
|
{
|
||||||
if (!PyArg_NoArgs(args))
|
if (!PyArg_NoArgs(args))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
1736
Modules/glmodule.c
1736
Modules/glmodule.c
File diff suppressed because it is too large
Load diff
|
|
@ -46,8 +46,7 @@ static int error_called;
|
||||||
/* The error handler */
|
/* The error handler */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
imgfile_error(str)
|
imgfile_error(char *str)
|
||||||
char *str;
|
|
||||||
{
|
{
|
||||||
PyErr_SetString(ImgfileError, str);
|
PyErr_SetString(ImgfileError, str);
|
||||||
error_called = 1;
|
error_called = 1;
|
||||||
|
|
@ -59,8 +58,7 @@ imgfile_error(str)
|
||||||
Make sure we raise an exception if we fail. */
|
Make sure we raise an exception if we fail. */
|
||||||
|
|
||||||
static IMAGE *
|
static IMAGE *
|
||||||
imgfile_open(fname)
|
imgfile_open(char *fname)
|
||||||
char *fname;
|
|
||||||
{
|
{
|
||||||
IMAGE *image;
|
IMAGE *image;
|
||||||
i_seterror(imgfile_error);
|
i_seterror(imgfile_error);
|
||||||
|
|
@ -81,9 +79,7 @@ imgfile_open(fname)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
imgfile_ttob(self, args)
|
imgfile_ttob(PyObject *self, PyObject *args)
|
||||||
PyObject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
int newval;
|
int newval;
|
||||||
PyObject *rv;
|
PyObject *rv;
|
||||||
|
|
@ -96,9 +92,7 @@ PyObject *args;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
imgfile_read(self, args)
|
imgfile_read(PyObject *self, PyObject *args)
|
||||||
PyObject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char *fname;
|
char *fname;
|
||||||
PyObject *rv;
|
PyObject *rv;
|
||||||
|
|
@ -190,9 +184,7 @@ static long *glob_datap;
|
||||||
static int glob_width, glob_z, glob_ysize;
|
static int glob_width, glob_z, glob_ysize;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xs_get(buf, y)
|
xs_get(short *buf, int y)
|
||||||
short *buf;
|
|
||||||
int y;
|
|
||||||
{
|
{
|
||||||
if (top_to_bottom)
|
if (top_to_bottom)
|
||||||
getrow(glob_image, buf, (glob_ysize-1-y), glob_z);
|
getrow(glob_image, buf, (glob_ysize-1-y), glob_z);
|
||||||
|
|
@ -201,9 +193,7 @@ int y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xs_put_c(buf, y)
|
xs_put_c(short *buf, int y)
|
||||||
short *buf;
|
|
||||||
int y;
|
|
||||||
{
|
{
|
||||||
char *datap = (char *)glob_datap + y*glob_width;
|
char *datap = (char *)glob_datap + y*glob_width;
|
||||||
int width = glob_width;
|
int width = glob_width;
|
||||||
|
|
@ -213,9 +203,7 @@ int y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xs_put_0(buf, y)
|
xs_put_0(short *buf, int y)
|
||||||
short *buf;
|
|
||||||
int y;
|
|
||||||
{
|
{
|
||||||
long *datap = glob_datap + y*glob_width;
|
long *datap = glob_datap + y*glob_width;
|
||||||
int width = glob_width;
|
int width = glob_width;
|
||||||
|
|
@ -224,9 +212,7 @@ int y;
|
||||||
*datap++ = (*buf++) & 0xff;
|
*datap++ = (*buf++) & 0xff;
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
xs_put_12(buf, y)
|
xs_put_12(short *buf, int y)
|
||||||
short *buf;
|
|
||||||
int y;
|
|
||||||
{
|
{
|
||||||
long *datap = glob_datap + y*glob_width;
|
long *datap = glob_datap + y*glob_width;
|
||||||
int width = glob_width;
|
int width = glob_width;
|
||||||
|
|
@ -236,13 +222,8 @@ int y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xscale(image, xsize, ysize, zsize, datap, xnew, ynew, fmode, blur)
|
xscale(IMAGE *image, int xsize, int ysize, int zsize,
|
||||||
IMAGE *image;
|
long *datap, int xnew, int ynew, int fmode, double blur)
|
||||||
int xsize, ysize, zsize;
|
|
||||||
long *datap;
|
|
||||||
int xnew, ynew;
|
|
||||||
int fmode;
|
|
||||||
double blur;
|
|
||||||
{
|
{
|
||||||
glob_image = image;
|
glob_image = image;
|
||||||
glob_datap = datap;
|
glob_datap = datap;
|
||||||
|
|
@ -267,9 +248,7 @@ double blur;
|
||||||
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
imgfile_readscaled(self, args)
|
imgfile_readscaled(PyObject *self, PyObject *args)
|
||||||
PyObject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char *fname;
|
char *fname;
|
||||||
PyObject *rv;
|
PyObject *rv;
|
||||||
|
|
@ -415,9 +394,7 @@ PyObject *args;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
imgfile_getsizes(self, args)
|
imgfile_getsizes(PyObject *self, PyObject *args)
|
||||||
PyObject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
char *fname;
|
char *fname;
|
||||||
PyObject *rv;
|
PyObject *rv;
|
||||||
|
|
@ -434,9 +411,7 @@ PyObject *args;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
imgfile_write(self, args)
|
imgfile_write(PyObject *self, PyObject *args)
|
||||||
PyObject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
{
|
||||||
IMAGE *image;
|
IMAGE *image;
|
||||||
char *fname;
|
char *fname;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue