diff options
author | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 12:43:58 (GMT) |
---|---|---|
committer | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 12:43:58 (GMT) |
commit | 286da3b46a3647db07c422058381ac65e74e47a2 (patch) | |
tree | 42402b809cb6e956c2ee3a35ead93add033aaa55 /Modules/svmodule.c | |
parent | 41c36ffe83d22e84cc072130b3914d66d9d722f0 (diff) | |
download | cpython-286da3b46a3647db07c422058381ac65e74e47a2.zip cpython-286da3b46a3647db07c422058381ac65e74e47a2.tar.gz cpython-286da3b46a3647db07c422058381ac65e74e47a2.tar.bz2 |
ANSI-fying
added excplicit node * parameter to termvalid argument in
validate_two_chain_ops of parsermodule.c (as proposed by fred)
Diffstat (limited to 'Modules/svmodule.c')
-rw-r--r-- | Modules/svmodule.c | 171 |
1 files changed, 45 insertions, 126 deletions
diff --git a/Modules/svmodule.c b/Modules/svmodule.c index 4133ae3..ffbea11 100644 --- a/Modules/svmodule.c +++ b/Modules/svmodule.c @@ -48,11 +48,7 @@ sv_error() } static PyObject * -svc_conversion(self, args, function, factor) - captureobject *self; - PyObject *args; - void (*function)(); - float factor; +svc_conversion(captureobject *self, PyObject *args, void (*function)(), float factor) { PyObject *output; int invert; @@ -84,9 +80,7 @@ svc_conversion(self, args, function, factor) * Compression Library 4:2:2 Duplicate Chroma format. */ static PyObject * -svc_YUVtoYUV422DC(self, args) - captureobject *self; - PyObject *args; +svc_YUVtoYUV422DC(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { PyErr_SetString(SvError, "data has bad format"); @@ -96,9 +90,7 @@ svc_YUVtoYUV422DC(self, args) } static PyObject * -svc_YUVtoYUV422DC_quarter(self, args) - captureobject *self; - PyObject *args; +svc_YUVtoYUV422DC_quarter(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { PyErr_SetString(SvError, "data has bad format"); @@ -109,9 +101,7 @@ svc_YUVtoYUV422DC_quarter(self, args) } static PyObject * -svc_YUVtoYUV422DC_sixteenth(self, args) - captureobject *self; - PyObject *args; +svc_YUVtoYUV422DC_sixteenth(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_YUV411_FRAMES) { PyErr_SetString(SvError, "data has bad format"); @@ -122,9 +112,7 @@ svc_YUVtoYUV422DC_sixteenth(self, args) } static PyObject * -svc_YUVtoRGB(self, args) - captureobject *self; - PyObject *args; +svc_YUVtoRGB(captureobject *self, PyObject *args) { switch (self->ob_info.format) { case SV_YUV411_FRAMES: @@ -138,9 +126,7 @@ svc_YUVtoRGB(self, args) } static PyObject * -svc_RGB8toRGB32(self, args) - captureobject *self; - PyObject *args; +svc_RGB8toRGB32(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_RGB8_FRAMES) { PyErr_SetString(SvError, "data has bad format"); @@ -150,9 +136,7 @@ svc_RGB8toRGB32(self, args) } static PyObject * -svc_InterleaveFields(self, args) - captureobject *self; - PyObject *args; +svc_InterleaveFields(captureobject *self, PyObject *args) { if (self->ob_info.format != SV_RGB8_FRAMES) { PyErr_SetString(SvError, "data has bad format"); @@ -162,9 +146,7 @@ svc_InterleaveFields(self, args) } static PyObject * -svc_GetFields(self, args) - captureobject *self; - PyObject *args; +svc_GetFields(captureobject *self, PyObject *args) { PyObject *f1 = NULL; PyObject *f2 = NULL; @@ -194,9 +176,7 @@ svc_GetFields(self, args) } static PyObject * -svc_UnlockCaptureData(self, args) - captureobject *self; - PyObject *args; +svc_UnlockCaptureData(captureobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) return NULL; @@ -219,9 +199,7 @@ svc_UnlockCaptureData(self, args) #include <gl.h> static PyObject * -svc_lrectwrite(self, args) - captureobject *self; - PyObject *args; +svc_lrectwrite(captureobject *self, PyObject *args) { Screencoord x1, x2, y1, y2; @@ -236,9 +214,7 @@ svc_lrectwrite(self, args) #endif static PyObject * -svc_writefile(self, args) - captureobject *self; - PyObject *args; +svc_writefile(captureobject *self, PyObject *args) { PyObject *file; int size; @@ -267,9 +243,7 @@ svc_writefile(self, args) } static PyObject * -svc_FindVisibleRegion(self, args) - captureobject *self; - PyObject *args; +svc_FindVisibleRegion(captureobject *self, PyObject *args) { void *visible; int width; @@ -308,8 +282,7 @@ static PyMethodDef capture_methods[] = { }; static void -capture_dealloc(self) - captureobject *self; +capture_dealloc(captureobject *self) { if (self->ob_capture != NULL) { if (self->ob_mustunlock) @@ -323,9 +296,7 @@ capture_dealloc(self) } static PyObject * -capture_getattr(self, name) - svobject *self; - char *name; +capture_getattr(svobject *self, char *name) { return Py_FindMethod(capture_methods, (PyObject *)self, name); } @@ -346,10 +317,7 @@ PyTypeObject Capturetype = { }; static PyObject * -newcaptureobject(self, ptr, mustunlock) - svobject *self; - void *ptr; - int mustunlock; +newcaptureobject(svobject *self, void *ptr, int mustunlock) { captureobject *p; @@ -365,9 +333,7 @@ newcaptureobject(self, ptr, mustunlock) } static PyObject * -sv_GetCaptureData(self, args) - svobject *self; - PyObject *args; +sv_GetCaptureData(svobject *self, PyObject *args) { void *ptr; long fieldID; @@ -393,9 +359,7 @@ sv_GetCaptureData(self, args) } static PyObject * -sv_BindGLWindow(self, args) - svobject *self; - PyObject *args; +sv_BindGLWindow(svobject *self, PyObject *args) { long wid; int mode; @@ -411,9 +375,7 @@ sv_BindGLWindow(self, args) } static PyObject * -sv_EndContinuousCapture(self, args) - svobject *self; - PyObject *args; +sv_EndContinuousCapture(svobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) @@ -427,9 +389,7 @@ sv_EndContinuousCapture(self, args) } static PyObject * -sv_IsVideoDisplayed(self, args) - svobject *self; - PyObject *args; +sv_IsVideoDisplayed(svobject *self, PyObject *args) { int v; @@ -444,9 +404,7 @@ sv_IsVideoDisplayed(self, args) } static PyObject * -sv_OutputOffset(self, args) - svobject *self; - PyObject *args; +sv_OutputOffset(svobject *self, PyObject *args) { int x_offset; int y_offset; @@ -462,9 +420,7 @@ sv_OutputOffset(self, args) } static PyObject * -sv_PutFrame(self, args) - svobject *self; - PyObject *args; +sv_PutFrame(svobject *self, PyObject *args) { char *buffer; @@ -479,9 +435,7 @@ sv_PutFrame(self, args) } static PyObject * -sv_QuerySize(self, args) - svobject *self; - PyObject *args; +sv_QuerySize(svobject *self, PyObject *args) { int w; int h; @@ -498,9 +452,7 @@ sv_QuerySize(self, args) } static PyObject * -sv_SetSize(self, args) - svobject *self; - PyObject *args; +sv_SetSize(svobject *self, PyObject *args) { int w; int h; @@ -516,9 +468,7 @@ sv_SetSize(self, args) } static PyObject * -sv_SetStdDefaults(self, args) - svobject *self; - PyObject *args; +sv_SetStdDefaults(svobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) @@ -532,9 +482,7 @@ sv_SetStdDefaults(self, args) } static PyObject * -sv_UseExclusive(self, args) - svobject *self; - PyObject *args; +sv_UseExclusive(svobject *self, PyObject *args) { boolean onoff; int mode; @@ -550,9 +498,7 @@ sv_UseExclusive(self, args) } static PyObject * -sv_WindowOffset(self, args) - svobject *self; - PyObject *args; +sv_WindowOffset(svobject *self, PyObject *args) { int x_offset; int y_offset; @@ -568,9 +514,7 @@ sv_WindowOffset(self, args) } static PyObject * -sv_CaptureBurst(self, args) - svobject *self; - PyObject *args; +sv_CaptureBurst(svobject *self, PyObject *args) { int bytes, i; svCaptureInfo info; @@ -661,9 +605,7 @@ sv_CaptureBurst(self, args) } static PyObject * -sv_CaptureOneFrame(self, args) - svobject *self; - PyObject *args; +sv_CaptureOneFrame(svobject *self, PyObject *args) { svCaptureInfo info; int format, width, height; @@ -703,9 +645,7 @@ sv_CaptureOneFrame(self, args) } static PyObject * -sv_InitContinuousCapture(self, args) - svobject *self; - PyObject *args; +sv_InitContinuousCapture(svobject *self, PyObject *args) { svCaptureInfo info; @@ -724,9 +664,7 @@ sv_InitContinuousCapture(self, args) } static PyObject * -sv_LoadMap(self, args) - svobject *self; - PyObject *args; +sv_LoadMap(svobject *self, PyObject *args) { PyObject *rgb; PyObject *res = NULL; @@ -787,9 +725,7 @@ sv_LoadMap(self, args) } static PyObject * -sv_CloseVideo(self, args) - svobject *self; - PyObject *args; +sv_CloseVideo(svobject *self, PyObject *args) { if (!PyArg_Parse(args, "")) return NULL; @@ -803,11 +739,8 @@ sv_CloseVideo(self, args) } static PyObject * -doParams(self, args, func, modified) - svobject *self; - PyObject *args; - int (*func)(SV_nodeP, long *, int); - int modified; +doParams(svobject *self, PyObject *args, + int (*func)(SV_nodeP, long *, int), int modified) { PyObject *list; PyObject *res = NULL; @@ -869,22 +802,19 @@ doParams(self, args, func, modified) } static PyObject * -sv_GetParam(self, args) - PyObject *self, *args; +sv_GetParam(PyObject *self, PyObject *args) { return doParams(self, args, svGetParam, 1); } static PyObject * -sv_GetParamRange(self, args) - PyObject *self, *args; +sv_GetParamRange(PyObject *self, PyObject *args) { return doParams(self, args, svGetParamRange, 1); } static PyObject * -sv_SetParam(self, args) - PyObject *self, *args; +sv_SetParam(PyObject *self, PyObject *args) { return doParams(self, args, svSetParam, 0); } @@ -913,11 +843,8 @@ static PyMethodDef svideo_methods[] = { }; static PyObject * -sv_conversion(self, args, function, inputfactor, factor) - PyObject *self, *args; - void (*function)(); - int inputfactor; - float factor; +sv_conversion(PyObject *self, PyObject *args, void (*function)(), + int inputfactor, float factor) { int invert, width, height, inputlength; char *input, *str; @@ -947,29 +874,25 @@ sv_conversion(self, args, function, inputfactor, factor) } static PyObject * -sv_InterleaveFields(self, args) - PyObject *self, *args; +sv_InterleaveFields(PyObject *self, PyObject *args) { return sv_conversion(self, args, svInterleaveFields, 1, 1.0); } static PyObject * -sv_RGB8toRGB32(self, args) - PyObject *self, *args; +sv_RGB8toRGB32(PyObject *self, PyObject *args) { return sv_conversion(self, args, svRGB8toRGB32, 1, (float) sizeof(long)); } static PyObject * -sv_YUVtoRGB(self, args) - PyObject *self, *args; +sv_YUVtoRGB(PyObject *self, PyObject *args) { return sv_conversion(self, args, svYUVtoRGB, 2, (float) sizeof(long)); } static void -svideo_dealloc(self) - svobject *self; +svideo_dealloc(svobject *self) { if (self->ob_svideo != NULL) (void) svCloseVideo(self->ob_svideo); @@ -977,9 +900,7 @@ svideo_dealloc(self) } static PyObject * -svideo_getattr(self, name) - svobject *self; - char *name; +svideo_getattr(svobject *self, char *name) { return Py_FindMethod(svideo_methods, (PyObject *)self, name); } @@ -1000,8 +921,7 @@ PyTypeObject Svtype = { }; static PyObject * -newsvobject(svp) - SV_nodeP svp; +newsvobject(SV_nodeP svp) { svobject *p; @@ -1018,8 +938,7 @@ newsvobject(svp) } static PyObject * -sv_OpenVideo(self, args) - PyObject *self, *args; +sv_OpenVideo(PyObject *self, PyObject *args) { SV_nodeP svp; |