summaryrefslogtreecommitdiff
path: root/Modules/imgfile.c
diff options
context:
space:
mode:
authorPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 17:04:33 +0000
committerPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 17:04:33 +0000
commit6a85027a97d090e2a7e38bb37d816ca22d072760 (patch)
tree42eb15029fe97868160358a6f8702402df30dd59 /Modules/imgfile.c
parent10723347c61e204224307340dc79f661c43e7ae1 (diff)
downloadcpython-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/imgfile.c')
-rw-r--r--Modules/imgfile.c51
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;