]> granicus.if.org Git - python/commitdiff
Even more ANSIfication: fix as many function pointers and declarations as
authorThomas Wouters <thomas@python.org>
Sat, 22 Jul 2000 23:57:55 +0000 (23:57 +0000)
committerThomas Wouters <thomas@python.org>
Sat, 22 Jul 2000 23:57:55 +0000 (23:57 +0000)
possible.

Modules/cryptmodule.c
Modules/flmodule.c
Modules/getpath.c
Modules/nismodule.c
Modules/parsermodule.c
Modules/posixmodule.c
Modules/python.c
Modules/selectmodule.c
Modules/socketmodule.c
Modules/timemodule.c

index 770965e505110a76d88e36a66416e844b0179d75..d3e07931920d096bdf7c9b449e537b3ebd0c6b6f 100644 (file)
@@ -12,7 +12,7 @@
 static PyObject *crypt_crypt(PyObject *self, PyObject *args)
 {
        char *word, *salt; 
-       extern char * crypt();
+       extern char * crypt(const char *, const char *);
 
        if (!PyArg_Parse(args, "(ss)", &word, &salt)) {
                return NULL;
index ffb4d4d5961a65fa1f3ae866e0f8fe30bce12c8c..8bfd83aa0916faa85ccfc4f2be489dab35bce725 100644 (file)
@@ -1672,7 +1672,7 @@ forms_set_event_call_back(PyObject *dummy, PyObject *args)
 }
 
 static PyObject *
-forms_do_or_check_forms(PyObject *dummy, PyObject *args, FL_OBJECT *(*func)())
+forms_do_or_check_forms(PyObject *dummy, PyObject *args, FL_OBJECT *(*func)(void))
 {
        FL_OBJECT *generic;
        genericobject *g;
@@ -1751,7 +1751,7 @@ forms_check_only_forms(PyObject *dummy, PyObject *args)
 
 #ifdef UNUSED
 static PyObject *
-fl_call(void (*func)(), PyObject *args)
+fl_call(void (*func)(void), PyObject *args)
 {
        if (!PyArg_NoArgs(args))
                return NULL;
@@ -2058,7 +2058,7 @@ forms_file_selector(PyObject *f, PyObject *args)
 
 
 static PyObject *
-forms_file_selector_func(PyObject *args, char *(*func)())
+forms_file_selector_func(PyObject *args, char *(*func)(void))
 {
        char *str;
 
index 3c418d6c875996ff2a62a7a290d2066dcd1a08d9..f96f7ed48369f8852bda56d61792b3f66fa57d37 100644 (file)
@@ -349,7 +349,7 @@ search_for_exec_prefix(char *argv0_path, char *home)
 static void
 calculate_path(void)
 {
-    extern char *Py_GetProgramName();
+    extern char *Py_GetProgramName(void);
 
     static char delimiter[2] = {DELIM, '\0'};
     static char separator[2] = {SEP, '\0'};
index 3649fd529e11f20739e951c4c6ece9398a392760..36959cf0c13c48f2b2aa3ae5476c31f7118f64f8 100644 (file)
@@ -20,7 +20,7 @@
 
 #ifdef __sgi
 /* This is missing from rpcsvc/ypclnt.h */
-extern int yp_get_default_domain();
+extern int yp_get_default_domain(char **);
 #endif
 
 static PyObject *NisError;
index b5414af8bed618bae88eb67183b1e9ec8c930e44..91ffef11ee4f36afb668094032a21c5048cf42ab 100644 (file)
@@ -963,7 +963,7 @@ validate_terminal(node *terminal, int type, char *string)
 /*  X (',' X) [',']
  */
 static int
-validate_repeating_list(node *tree, int ntype, int (*vfunc)(),
+validate_repeating_list(node *tree, int ntype, int (*vfunc)(node *),
                         const char *const name)
 {
     int nch = NCH(tree);
index c22be542d8ca4dc5ed0f2415ae1e8b1fc4988cf3..fef4bbb2c34b18befd8c7fcb3b670357a2c72935 100644 (file)
@@ -130,11 +130,11 @@ corresponding Unix manual entries for more information on calls.";
 
 #ifdef HAVE_UNISTD_H
 /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */
-extern int rename();
-extern int pclose();
-extern int lstat();
-extern int symlink();
-extern int fsync();
+extern int rename(const char *, const char *);
+extern int pclose(FILE *);
+extern int lstat(const char *, struct stat *);
+extern int symlink(const char *, const char *);
+extern int fsync(int fd);
 #else /* !HAVE_UNISTD_H */
 #if defined(PYCC_VACPP)
 extern int mkdir(char *);
index 7b456a9e7287237278a018295a0fc97537dcc3b2..316dd3b6636ca23e597f6825ab03c34b7b37fbfe 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "Python.h"
 
-extern DL_EXPORT(int) Py_Main();
+extern DL_EXPORT(int) Py_Main(int, char **);
 
 int
 main(int argc, char **argv)
index 1adde1936683d15831045a21a59afa5ee21af2b4..2860f3758844bb3d42d254a548e75dccff198679 100644 (file)
@@ -27,7 +27,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
 #ifdef __sgi
 /* This is missing from unistd.h */
-extern void bzero();
+extern void bzero(void *, int);
 #endif
 
 #ifndef DONT_HAVE_SYS_TYPES_H
index 50cd3eb1095bcc926de83b544f163ea3a3ae6a1b..5d6f24a2efc31565fb2b668fb653e31056f53ae2 100644 (file)
@@ -111,7 +111,7 @@ Socket methods:
 #endif
 
 #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) && !defined(__BEOS__)
-extern int gethostname(); /* For Solaris, at least */
+extern int gethostname(char *, size_t); /* For Solaris, at least */
 #endif
 
 #if defined(PYCC_VACPP)
index b9aba51835f3b3b3412f59b19829d264e67a9a47..005189a507dcd02692fe48adda6cfafb255c3510 100644 (file)
@@ -49,7 +49,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #ifdef HAVE_FTIME
 #include <sys/timeb.h>
 #if !defined(MS_WINDOWS) && !defined(PYOS_OS2)
-extern int ftime();
+extern int ftime(struct timeb *);
 #endif /* MS_WINDOWS */
 #endif /* HAVE_FTIME */
 
@@ -384,7 +384,8 @@ See the library reference manual for formatting codes.";
 #ifdef HAVE_STRPTIME
 
 #if 0
-extern char *strptime(); /* Enable this if it's not declared in <time.h> */
+/* Enable this if it's not declared in <time.h> */
+extern char *strptime(const char *, const char *, struct tm *);
 #endif
 
 static PyObject *