diff options
Diffstat (limited to 'PC')
-rw-r--r-- | PC/config.c | 58 | ||||
-rw-r--r-- | PC/example_nt/example.c | 5 | ||||
-rw-r--r-- | PC/frozen_dllmain.c | 4 | ||||
-rw-r--r-- | PC/getpathp.c | 35 | ||||
-rw-r--r-- | PC/os2vacpp/config.c | 60 | ||||
-rw-r--r-- | PC/os2vacpp/getpathp.c | 29 | ||||
-rwxr-xr-x | PC/utils/makesrc.c | 6 | ||||
-rw-r--r-- | PC/winsound.c | 2 |
8 files changed, 92 insertions, 107 deletions
diff --git a/PC/config.c b/PC/config.c index d9d9187..d71b669 100644 --- a/PC/config.c +++ b/PC/config.c @@ -15,48 +15,48 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. #include "Python.h" -extern void initarray(); +extern void initarray(void); #ifndef MS_WIN64 -extern void initaudioop(); -extern void initbinascii(); +extern void initaudioop(void); +extern void initbinascii(void); #endif -extern void initcmath(); -extern void initerrno(); +extern void initcmath(void); +extern void initerrno(void); #ifdef WITH_CYCLE_GC -extern void initgc(); +extern void initgc(void); #endif #ifndef MS_WIN64 -extern void initimageop(); +extern void initimageop(void); #endif -extern void initmath(); -extern void initmd5(); -extern void initnew(); -extern void initnt(); -extern void initoperator(); -extern void initregex(); +extern void initmath(void); +extern void initmd5(void); +extern void initnew(void); +extern void initnt(void); +extern void initoperator(void); +extern void initregex(void); #ifndef MS_WIN64 -extern void initrgbimg(); +extern void initrgbimg(void); #endif -extern void initrotor(); -extern void initsignal(); -extern void initsha(); -extern void initstrop(); -extern void initstruct(); -extern void inittime(); -extern void initthread(); -extern void initcStringIO(); -extern void initcPickle(); -extern void initpcre(); +extern void initrotor(void); +extern void initsignal(void); +extern void initsha(void); +extern void initstrop(void); +extern void initstruct(void); +extern void inittime(void); +extern void initthread(void); +extern void initcStringIO(void); +extern void initcPickle(void); +extern void initpcre(void); #ifdef WIN32 -extern void initmsvcrt(); -extern void init_locale(); +extern void initmsvcrt(void); +extern void init_locale(void); #endif -extern void init_codecs(); +extern void init_codecs(void); /* -- ADDMODULE MARKER 1 -- */ -extern void PyMarshal_Init(); -extern void initimp(); +extern void PyMarshal_Init(void); +extern void initimp(void); struct _inittab _PyImport_Inittab[] = { diff --git a/PC/example_nt/example.c b/PC/example_nt/example.c index dd8964b..63682f1 100644 --- a/PC/example_nt/example.c +++ b/PC/example_nt/example.c @@ -1,8 +1,7 @@ #include "Python.h" static PyObject * -ex_foo(self, args) - PyObject *self, *args; +ex_foo(PyObject *self, PyObject *args) { printf("Hello, world\n"); Py_INCREF(Py_None); @@ -15,7 +14,7 @@ static PyMethodDef example_methods[] = { }; void -initexample() +initexample(void) { Py_InitModule("example", example_methods); } diff --git a/PC/frozen_dllmain.c b/PC/frozen_dllmain.c index 6ca4cd4..0873d8f 100644 --- a/PC/frozen_dllmain.c +++ b/PC/frozen_dllmain.c @@ -60,7 +60,7 @@ BOOL CallModuleDllMain(char *modName, DWORD dwReason); Called by a frozen .EXE only, so that built-in extension modules are initialized correctly */ -void PyWinFreeze_ExeInit() +void PyWinFreeze_ExeInit(void) { char **modName; for (modName = possibleModules;*modName;*modName++) { @@ -73,7 +73,7 @@ void PyWinFreeze_ExeInit() Called by a frozen .EXE only, so that built-in extension modules are cleaned up */ -void PyWinFreeze_ExeTerm() +void PyWinFreeze_ExeTerm(void) { // Must go backwards char **modName; diff --git a/PC/getpathp.c b/PC/getpathp.c index ea388f2..e4ff136 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -98,8 +98,7 @@ static char *module_search_path = NULL; static int -is_sep(ch) /* determine if "ch" is a separator character */ - char ch; +is_sep(char ch) /* determine if "ch" is a separator character */ { #ifdef ALTSEP return ch == SEP || ch == ALTSEP; @@ -110,8 +109,7 @@ is_sep(ch) /* determine if "ch" is a separator character */ static void -reduce(dir) - char *dir; +reduce(char *dir) { size_t i = strlen(dir); while (i > 0 && !is_sep(dir[i])) @@ -121,8 +119,7 @@ reduce(dir) static int -exists(filename) - char *filename; +exists(char *filename) { struct stat buf; return stat(filename, &buf) == 0; @@ -130,8 +127,7 @@ exists(filename) static int -ismodule(filename) /* Is module -- check for .pyc/.pyo too */ - char *filename; +ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ { if (exists(filename)) return 1; @@ -147,9 +143,7 @@ ismodule(filename) /* Is module -- check for .pyc/.pyo too */ static void -join(buffer, stuff) - char *buffer; - char *stuff; +join(char *buffer, char *stuff) { size_t n, k; if (is_sep(stuff[0])) @@ -168,8 +162,7 @@ join(buffer, stuff) static int -gotlandmark(landmark) - char *landmark; +gotlandmark(char *landmark) { int n, ok; @@ -182,9 +175,7 @@ gotlandmark(landmark) static int -search_for_prefix(argv0_path, landmark) - char *argv0_path; - char *landmark; +search_for_prefix(char *argv0_path, char *landmark) { /* Search from argv0_path, until landmark is found */ strcpy(prefix, argv0_path); @@ -343,7 +334,7 @@ done: #endif /* MS_WIN32 */ static void -get_progpath() +get_progpath(void) { extern char *Py_GetProgramName(); char *path = getenv("PATH"); @@ -403,7 +394,7 @@ get_progpath() } static void -calculate_path() +calculate_path(void) { char argv0_path[MAXPATHLEN+1]; char *buf; @@ -565,7 +556,7 @@ calculate_path() /* External interface */ char * -Py_GetPath() +Py_GetPath(void) { if (!module_search_path) calculate_path(); @@ -573,7 +564,7 @@ Py_GetPath() } char * -Py_GetPrefix() +Py_GetPrefix(void) { if (!module_search_path) calculate_path(); @@ -581,13 +572,13 @@ Py_GetPrefix() } char * -Py_GetExecPrefix() +Py_GetExecPrefix(void) { return Py_GetPrefix(); } char * -Py_GetProgramFullPath() +Py_GetProgramFullPath(void) { if (!module_search_path) calculate_path(); diff --git a/PC/os2vacpp/config.c b/PC/os2vacpp/config.c index 3b8f854..3d54e53 100644 --- a/PC/os2vacpp/config.c +++ b/PC/os2vacpp/config.c @@ -15,41 +15,41 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. #include "Python.h" -extern void initarray(); -extern void initaudioop(); -extern void initbinascii(); -extern void initcmath(); -extern void initerrno(); -extern void initimageop(); -extern void initmath(); -extern void initmd5(); -extern void initnew(); -extern void initnt(); -extern void initos2(); -extern void initoperator(); -extern void initposix(); -extern void initregex(); -extern void initrgbimg(); -extern void initrotor(); -extern void initsignal(); -extern void initselect(); -extern void init_socket(); -extern void initsoundex(); -extern void initstrop(); -extern void initstruct(); -extern void inittime(); -extern void initthread(); -extern void initcStringIO(); -extern void initcPickle(); -extern void initpcre(); +extern void initarray(void); +extern void initaudioop(void); +extern void initbinascii(void); +extern void initcmath(void); +extern void initerrno(void); +extern void initimageop(void); +extern void initmath(void); +extern void initmd5(void); +extern void initnew(void); +extern void initnt(void); +extern void initos2(void); +extern void initoperator(void); +extern void initposix(void); +extern void initregex(void); +extern void initrgbimg(void); +extern void initrotor(void); +extern void initsignal(void); +extern void initselect(void); +extern void init_socket(void); +extern void initsoundex(void); +extern void initstrop(void); +extern void initstruct(void); +extern void inittime(void); +extern void initthread(void); +extern void initcStringIO(void); +extern void initcPickle(void); +extern void initpcre(void); #ifdef WIN32 -extern void initmsvcrt(); +extern void initmsvcrt(void); #endif /* -- ADDMODULE MARKER 1 -- */ -extern void PyMarshal_Init(); -extern void initimp(); +extern void PyMarshal_Init(void); +extern void initimp(void); struct _inittab _PyImport_Inittab[] = { diff --git a/PC/os2vacpp/getpathp.c b/PC/os2vacpp/getpathp.c index f796851..1c78674 100644 --- a/PC/os2vacpp/getpathp.c +++ b/PC/os2vacpp/getpathp.c @@ -64,8 +64,7 @@ static char *module_search_path = NULL; static int -is_sep(ch) /* determine if "ch" is a separator character */ - char ch; +is_sep(char ch) /* determine if "ch" is a separator character */ { #ifdef ALTSEP return ch == SEP || ch == ALTSEP; @@ -76,8 +75,7 @@ is_sep(ch) /* determine if "ch" is a separator character */ static void -reduce(dir) - char *dir; +reduce(char *dir) { int i = strlen(dir); while (i > 0 && !is_sep(dir[i])) @@ -87,8 +85,7 @@ reduce(dir) static int -exists(filename) - char *filename; +exists(char *filename) { struct stat buf; return stat(filename, &buf) == 0; @@ -96,9 +93,7 @@ exists(filename) static void -join(buffer, stuff) - char *buffer; - char *stuff; +join(char *buffer, char *stuff) { int n, k; if (is_sep(stuff[0])) @@ -117,9 +112,7 @@ join(buffer, stuff) static int -search_for_prefix(argv0_path, landmark) - char *argv0_path; - char *landmark; +search_for_prefix(char *argv0_path, char *landmark) { int n; @@ -247,7 +240,7 @@ getpythonregpath(HKEY keyBase, BOOL bWin32s) #endif /* MS_WIN32 */ static void -get_progpath() +get_progpath(void) { extern char *Py_GetProgramName(); char *path = getenv("PATH"); @@ -299,7 +292,7 @@ get_progpath() } static void -calculate_path() +calculate_path(void) { char argv0_path[MAXPATHLEN+1]; char *buf; @@ -451,7 +444,7 @@ calculate_path() /* External interface */ char * -Py_GetPath() +Py_GetPath(void) { if (!module_search_path) calculate_path(); @@ -460,7 +453,7 @@ Py_GetPath() } char * -Py_GetPrefix() +Py_GetPrefix(void) { if (!module_search_path) calculate_path(); @@ -469,7 +462,7 @@ Py_GetPrefix() } char * -Py_GetExecPrefix() +Py_GetExecPrefix(void) { if (!module_search_path) calculate_path(); @@ -478,7 +471,7 @@ Py_GetExecPrefix() } char * -Py_GetProgramFullPath() +Py_GetProgramFullPath(void) { if (!module_search_path) calculate_path(); diff --git a/PC/utils/makesrc.c b/PC/utils/makesrc.c index 883b4d8..458bfab 100755 --- a/PC/utils/makesrc.c +++ b/PC/utils/makesrc.c @@ -7,7 +7,9 @@ file names and #include names to 8x3 lower case */ char *usage = "You must be in the \"pc\" directory.\n"; char *list[] = {"..\\Include", "..\\Modules", "..\\Objects", "..\\Parser", "..\\Python", ".", 0}; -main() + +int +main(int argc, char ** argv) { DIR *dpath; struct dirent *dir; @@ -64,4 +66,4 @@ main() closedir(dpath); } return 0; - } +} diff --git a/PC/winsound.c b/PC/winsound.c index 63906c9..a9c14a6 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -140,7 +140,7 @@ static void add_define(PyObject *dict, const char *key, long value) #define ADD_DEFINE(tok) add_define(dict,#tok,tok) DL_EXPORT(void) -initwinsound() +initwinsound(void) { PyObject *module=Py_InitModule3("winsound", sound_methods, sound_module_doc); PyObject *dict=PyModule_GetDict(module); |