#include "Python.h"
-void initxyzzy(); /* Forward */
+void initxyzzy(void); /* Forward */
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
/* Pass argv[0] to the Python interpreter */
Py_SetProgramName(argv[0]);
/* A static module */
+/* 'self' is not used */
static PyObject *
-xyzzy_foo(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+xyzzy_foo(PyObject *self, PyObjecT *args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
};
void
-initxyzzy()
+initxyzzy(void)
{
PyImport_AddModule("xyzzy");
Py_InitModule("xyzzy", xyzzy_methods);
extern int optind;
extern char *optarg;
-extern int getopt();
+extern int getopt(int, char **, char *);
struct workorder {
int conn;
static char usage_line[] = "usage: %s [port]\n";
static void
-usage()
+usage(void)
{
fprintf(stderr, usage_line, progname);
exit(2);
static PyObject *the_builtins;
static void
-init_python()
+init_python(void)
{
if (gtstate)
return;
}
static void
-oprogname()
+oprogname(void)
{
int save = errno;
fprintf(stderr, "%s: ", progname);
}
static void
-ps()
+ps(void)
{
char buffer[100];
sprintf(buffer, "ps -l -p %d </dev/null | tail +2l\n", getpid());
((O)->ob_type==PycStringIO->OutputType)
static void *
-xxxPyCObject_Import(module_name, name)
- char *module_name;
- char *name;
+xxxPyCObject_Import(char *module_name, char *name)
{
PyObject *m, *c;
void *r=NULL;
} dictobject;
PyObject *
-PyDict_New()
+PyDict_New(void)
{
register dictobject *mp;
if (dummy == NULL) { /* Auto-initialize dummy */
return -1;
}
-const char *PyUnicode_GetDefaultEncoding()
+const char *PyUnicode_GetDefaultEncoding(void)
{
return unicode_default_encoding;
}
/* Helpers for PyUnicode_Format() */
static PyObject *
-getnextarg(args, arglen, p_argidx)
- PyObject *args;
-int arglen;
-int *p_argidx;
+getnextarg(PyObject *args, int arglen, int *p_argidx)
{
int argidx = *p_argidx;
if (argidx < arglen) {
#define F_ZERO (1<<4)
static
-#ifdef HAVE_STDARG_PROTOTYPES
int usprintf(register Py_UNICODE *buffer, char *format, ...)
-#else
-int usprintf(va_alist) va_dcl
-#endif
{
register int i;
int len;
va_list va;
char *charbuffer;
-#ifdef HAVE_STDARG_PROTOTYPES
va_start(va, format);
-#else
- Py_UNICODE *args;
- char *format;
-
- va_start(va);
- buffer = va_arg(va, Py_UNICODE *);
- format = va_arg(va, char *);
-#endif
/* First, format the string as char array, then expand to Py_UNICODE
array. */
/* Initialize the Unicode implementation */
-void _PyUnicode_Init()
+void _PyUnicode_Init(void)
{
/* Doublecheck the configuration... */
if (sizeof(Py_UNICODE) != 2)
/* Finalize the Unicode implementation */
void
-_PyUnicode_Fini()
+_PyUnicode_Fini(void)
{
PyUnicodeObject *u = unicode_freelist;
#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[] = {
#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);
};
void
-initexample()
+initexample(void)
{
Py_InitModule("example", example_methods);
}
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++) {
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;
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;
static void
-reduce(dir)
- char *dir;
+reduce(char *dir)
{
size_t i = strlen(dir);
while (i > 0 && !is_sep(dir[i]))
static int
-exists(filename)
- char *filename;
+exists(char *filename)
{
struct stat buf;
return stat(filename, &buf) == 0;
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;
static void
-join(buffer, stuff)
- char *buffer;
- char *stuff;
+join(char *buffer, char *stuff)
{
size_t n, k;
if (is_sep(stuff[0]))
static int
-gotlandmark(landmark)
- char *landmark;
+gotlandmark(char *landmark)
{
int n, ok;
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);
#endif /* MS_WIN32 */
static void
-get_progpath()
+get_progpath(void)
{
extern char *Py_GetProgramName();
char *path = getenv("PATH");
}
static void
-calculate_path()
+calculate_path(void)
{
char argv0_path[MAXPATHLEN+1];
char *buf;
/* External interface */
char *
-Py_GetPath()
+Py_GetPath(void)
{
if (!module_search_path)
calculate_path();
}
char *
-Py_GetPrefix()
+Py_GetPrefix(void)
{
if (!module_search_path)
calculate_path();
}
char *
-Py_GetExecPrefix()
+Py_GetExecPrefix(void)
{
return Py_GetPrefix();
}
char *
-Py_GetProgramFullPath()
+Py_GetProgramFullPath(void)
{
if (!module_search_path)
calculate_path();
#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[] = {
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;
static void
-reduce(dir)
- char *dir;
+reduce(char *dir)
{
int i = strlen(dir);
while (i > 0 && !is_sep(dir[i]))
static int
-exists(filename)
- char *filename;
+exists(char *filename)
{
struct stat buf;
return stat(filename, &buf) == 0;
static void
-join(buffer, stuff)
- char *buffer;
- char *stuff;
+join(char *buffer, char *stuff)
{
int n, k;
if (is_sep(stuff[0]))
static int
-search_for_prefix(argv0_path, landmark)
- char *argv0_path;
- char *landmark;
+search_for_prefix(char *argv0_path, char *landmark)
{
int n;
#endif /* MS_WIN32 */
static void
-get_progpath()
+get_progpath(void)
{
extern char *Py_GetProgramName();
char *path = getenv("PATH");
}
static void
-calculate_path()
+calculate_path(void)
{
char argv0_path[MAXPATHLEN+1];
char *buf;
/* External interface */
char *
-Py_GetPath()
+Py_GetPath(void)
{
if (!module_search_path)
calculate_path();
}
char *
-Py_GetPrefix()
+Py_GetPrefix(void)
{
if (!module_search_path)
calculate_path();
}
char *
-Py_GetExecPrefix()
+Py_GetExecPrefix(void)
{
if (!module_search_path)
calculate_path();
}
char *
-Py_GetProgramFullPath()
+Py_GetProgramFullPath(void)
{
if (!module_search_path)
calculate_path();
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;
closedir(dpath);
}
return 0;
- }
+}
#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);
#ifdef _MSC_VER
_declspec(dllexport)
#endif
-void initperfhash()
+void initperfhash(void)
{
PyObject *m;