diff options
author | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 17:04:33 (GMT) |
---|---|---|
committer | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 17:04:33 (GMT) |
commit | 6a85027a97d090e2a7e38bb37d816ca22d072760 (patch) | |
tree | 42eb15029fe97868160358a6f8702402df30dd59 /Modules/fmmodule.c | |
parent | 10723347c61e204224307340dc79f661c43e7ae1 (diff) | |
download | cpython-6a85027a97d090e2a7e38bb37d816ca22d072760.zip cpython-6a85027a97d090e2a7e38bb37d816ca22d072760.tar.gz cpython-6a85027a97d090e2a7e38bb37d816ca22d072760.tar.bz2 |
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in)
UNTESTED!
Diffstat (limited to 'Modules/fmmodule.c')
-rw-r--r-- | Modules/fmmodule.c | 59 |
1 files changed, 17 insertions, 42 deletions
diff --git a/Modules/fmmodule.c b/Modules/fmmodule.c index 65dffec..db3fd03 100644 --- a/Modules/fmmodule.c +++ b/Modules/fmmodule.c @@ -29,8 +29,7 @@ staticforward PyTypeObject Fhtype; #define is_fhobject(v) ((v)->ob_type == &Fhtype) static PyObject * -newfhobject(fh) - fmfonthandle fh; +newfhobject(fmfonthandle fh) { fhobject *fhp; if (fh == NULL) { @@ -48,9 +47,7 @@ newfhobject(fh) /* Font Handle methods */ static PyObject * -fh_scalefont(self, args) - fhobject *self; -PyObject *args; +fh_scalefont(fhobject *self, PyObject *args) { double size; if (!PyArg_Parse(args, "d", &size)) @@ -61,9 +58,7 @@ PyObject *args; /* XXX fmmakefont */ static PyObject * -fh_setfont(self, args) - fhobject *self; -PyObject *args; +fh_setfont(fhobject *self, PyObject *args) { if (!PyArg_NoArgs(args)) return NULL; @@ -73,9 +68,7 @@ PyObject *args; } static PyObject * -fh_getfontname(self, args) - fhobject *self; -PyObject *args; +fh_getfontname(fhobject *self, PyObject *args) { char fontname[256]; int len; @@ -90,9 +83,7 @@ PyObject *args; } static PyObject * -fh_getcomment(self, args) - fhobject *self; -PyObject *args; +fh_getcomment(fhobject *self, PyObject *args) { char comment[256]; int len; @@ -107,9 +98,7 @@ PyObject *args; } static PyObject * -fh_getfontinfo(self, args) - fhobject *self; -PyObject *args; +fh_getfontinfo(fhobject *self, PyObject *args) { fmfontinfo info; if (!PyArg_NoArgs(args)) @@ -131,17 +120,13 @@ PyObject *args; #if 0 static PyObject * -fh_getwholemetrics(self, args) - fhobject *self; -PyObject *args; +fh_getwholemetrics(fhobject *self, PyObject *args) { } #endif static PyObject * -fh_getstrwidth(self, args) - fhobject *self; -PyObject *args; +fh_getstrwidth(fhobject *self, PyObject *args) { char *str; if (!PyArg_Parse(args, "s", &str)) @@ -163,16 +148,13 @@ static PyMethodDef fh_methods[] = { }; static PyObject * -fh_getattr(fhp, name) - fhobject *fhp; -char *name; +fh_getattr(fhobject *fhp, char *name) { return Py_FindMethod(fh_methods, (PyObject *)fhp, name); } static void -fh_dealloc(fhp) - fhobject *fhp; +fh_dealloc(fhobject *fhp) { fmfreefont(fhp->fh_fh); PyObject_Del(fhp); @@ -197,8 +179,7 @@ static PyTypeObject Fhtype = { /* Font Manager functions */ static PyObject * -fm_init(self, args) - PyObject *self, *args; +fm_init(PyObject *self, *args) { if (!PyArg_NoArgs(args)) return NULL; @@ -208,8 +189,7 @@ fm_init(self, args) } static PyObject * -fm_findfont(self, args) - PyObject *self, *args; +fm_findfont(PyObject *self, *args) { char *str; if (!PyArg_Parse(args, "s", &str)) @@ -218,8 +198,7 @@ fm_findfont(self, args) } static PyObject * -fm_prstr(self, args) - PyObject *self, *args; +fm_prstr(PyObject *self, *args) { char *str; if (!PyArg_Parse(args, "s", &str)) @@ -234,8 +213,7 @@ fm_prstr(self, args) static PyObject *fontlist; static void -clientproc(fontname) - char *fontname; +clientproc(char *fontname) { int err; PyObject *v; @@ -255,8 +233,7 @@ clientproc(fontname) } static PyObject * -fm_enumerate(self, args) - PyObject *self, *args; +fm_enumerate(PyObject *self, PyObject *args) { PyObject *res; if (!PyArg_NoArgs(args)) @@ -271,8 +248,7 @@ fm_enumerate(self, args) } static PyObject * -fm_setpath(self, args) - PyObject *self, *args; +fm_setpath(PyObject *self, PyObject *args) { char *str; if (!PyArg_Parse(args, "s", &str)) @@ -283,8 +259,7 @@ fm_setpath(self, args) } static PyObject * -fm_fontpath(self, args) - PyObject *self, *args; +fm_fontpath(PyObject *self, *args) { if (!PyArg_NoArgs(args)) return NULL; |