diff options
Diffstat (limited to 'Modules/imgfile.c')
-rw-r--r-- | Modules/imgfile.c | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/Modules/imgfile.c b/Modules/imgfile.c index 5bab540367..0b9dd54b51 100644 --- a/Modules/imgfile.c +++ b/Modules/imgfile.c @@ -46,8 +46,7 @@ static int error_called; /* The error handler */ static void -imgfile_error(str) - char *str; +imgfile_error(char *str) { PyErr_SetString(ImgfileError, str); error_called = 1; @@ -59,8 +58,7 @@ imgfile_error(str) Make sure we raise an exception if we fail. */ static IMAGE * -imgfile_open(fname) - char *fname; +imgfile_open(char *fname) { IMAGE *image; i_seterror(imgfile_error); @@ -81,9 +79,7 @@ imgfile_open(fname) } static PyObject * -imgfile_ttob(self, args) - PyObject *self; -PyObject *args; +imgfile_ttob(PyObject *self, PyObject *args) { int newval; PyObject *rv; @@ -96,9 +92,7 @@ PyObject *args; } static PyObject * -imgfile_read(self, args) - PyObject *self; -PyObject *args; +imgfile_read(PyObject *self, PyObject *args) { char *fname; PyObject *rv; @@ -190,9 +184,7 @@ static long *glob_datap; static int glob_width, glob_z, glob_ysize; static void -xs_get(buf, y) - short *buf; -int y; +xs_get(short *buf, int y) { if (top_to_bottom) getrow(glob_image, buf, (glob_ysize-1-y), glob_z); @@ -201,9 +193,7 @@ int y; } static void -xs_put_c(buf, y) - short *buf; -int y; +xs_put_c(short *buf, int y) { char *datap = (char *)glob_datap + y*glob_width; int width = glob_width; @@ -213,9 +203,7 @@ int y; } static void -xs_put_0(buf, y) - short *buf; -int y; +xs_put_0(short *buf, int y) { long *datap = glob_datap + y*glob_width; int width = glob_width; @@ -224,9 +212,7 @@ int y; *datap++ = (*buf++) & 0xff; } static void -xs_put_12(buf, y) - short *buf; -int y; +xs_put_12(short *buf, int y) { long *datap = glob_datap + y*glob_width; int width = glob_width; @@ -236,13 +222,8 @@ int y; } static void -xscale(image, xsize, ysize, zsize, datap, xnew, ynew, fmode, blur) - IMAGE *image; -int xsize, ysize, zsize; -long *datap; -int xnew, ynew; -int fmode; -double blur; +xscale(IMAGE *image, int xsize, int ysize, int zsize, + long *datap, int xnew, int ynew, int fmode, double blur) { glob_image = image; glob_datap = datap; @@ -267,9 +248,7 @@ double blur; static PyObject * -imgfile_readscaled(self, args) - PyObject *self; -PyObject *args; +imgfile_readscaled(PyObject *self, PyObject *args) { char *fname; PyObject *rv; @@ -415,9 +394,7 @@ PyObject *args; } static PyObject * -imgfile_getsizes(self, args) - PyObject *self; -PyObject *args; +imgfile_getsizes(PyObject *self, PyObject *args) { char *fname; PyObject *rv; @@ -434,9 +411,7 @@ PyObject *args; } static PyObject * -imgfile_write(self, args) - PyObject *self; -PyObject *args; +imgfile_write(PyObject *self, PyObject *args) { IMAGE *image; char *fname; |