Commits

Anonymous committed 92e9204

cleaned compiler warnings

Comments (0)

Files changed (14)

 #endif
 
 
-extern int pygame_video_priority_init();
+extern int pygame_video_priority_init(void);
 
 static PyObject* quitfunctions = NULL;
 static PyObject* PyExc_SDLError;
 
 
-static int PyGame_Video_AutoInit();
+static int PyGame_Video_AutoInit(void);
 
 
 
 
-static int CheckSDLVersions() /*compare compiled to linked*/
+static int CheckSDLVersions(void) /*compare compiled to linked*/
 {
 	SDL_version compiled;
 	const SDL_version* linked;
 }
 
 
-static void atexit_quit()
+static void atexit_quit(void)
 {
 	PyObject* quit;
 	int num;
 /*video init needs to be here, because of it's
  *important init order priority
  */
-static void PyGame_Video_AutoQuit()
+static void PyGame_Video_AutoQuit(void)
 {
 	if(SDL_WasInit(SDL_INIT_VIDEO))
 		SDL_QuitSubSystem(SDL_INIT_VIDEO);
 }
 
-static int PyGame_Video_AutoInit()
+static int PyGame_Video_AutoInit(void)
 {
 	if(!SDL_WasInit(SDL_INIT_VIDEO))
 	{
     /*DOC*/    "you'd like to take a look.\n"
     /*DOC*/ ;
 
-void initbase()
+void initbase(void)
 {
 	static int initialized_once = 0;
 	PyObject *module, *dict, *apiobj;
     /*DOC*/    "problem with the documentation or documentation generation code\n"
     /*DOC*/    ":]\n"
     /*DOC*/ ;
-#endif
+#endif
 
 
 
-static void cdrom_autoquit()
+static void cdrom_autoquit(void)
 {
 	int loop;
 	for(loop = 0; loop < CDROM_MAXDRIVES; ++loop)
 	0,
 	0,
 	NULL,
-	0
+	0, 
+	(hashfunc)NULL,
+	(ternaryfunc)NULL,
+	(reprfunc)NULL,
+	0L,0L,0L,0L,
+	doc_CD_MODULE /* Documentation string */
 };
 
 
     /*DOC*/ ;
 
 
-void initcdrom()
+void initcdrom(void)
 {
 	PyObject *module, *dict, *apiobj;
 	static void* c_api[PYGAMEAPI_CDROM_NUMSLOTS];
     /*DOC*/ ;
 
 
-void initconstants()
+void initconstants(void)
 {
 	PyObject* module;
 
+	PyGAME_C_API[0] = PyGAME_C_API[0]; /*this cleans up compiler warning*/
+
+
 	module = Py_InitModule3("constants", builtins, doc_pygame_constants_MODULE);
 
 	DEC_CONST(SWSURFACE);
 
 
 /* display functions */
-
+#if 0
     /*DOC*/ static char docXX_set_driver[] =
     /*DOC*/    "pygame.display.set_driver(name) -> None\n"
     /*DOC*/    "override the default sdl video driver\n"
 
 	RETURN_NONE
 }
-
+#endif
 
     /*DOC*/ static char doc_get_driver[] =
     /*DOC*/    "pygame.display.get_driver() -> name\n"
     /*DOC*/    "display routines that modify the display surface while it is locked.\n"
     /*DOC*/ ;
 
-void initdisplay()
+void initdisplay(void)
 {
 	PyObject *module, *dict, *apiobj;
 	static void* c_api[PYGAMEAPI_DISPLAY_NUMSLOTS];
     /*DOC*/    "the joystick module.\n"
     /*DOC*/ ;
 
-void initevent()
+void initevent(void)
 {
 	PyObject *module, *dict, *apiobj;
 	static void* c_api[PYGAMEAPI_EVENT_NUMSLOTS];
     /*DOC*/    "the SDL_image library.\n"
     /*DOC*/ ;
 
-void initimage()
+void initimage(void)
 {
 	PyObject *module, *dict;
 
 static SDL_Joystick* joystick_stickdata[JOYSTICK_MAXSTICKS] = {NULL};
 
 
-staticforward PyTypeObject Joystick_Type;
+staticforward PyTypeObject PyJoystick_Type;
 static PyObject* PyJoystick_New(int);
 #define PyJoystick_Check(x) ((x)->ob_type == &PyJoystick_Type)
 
 
-
-static void joy_autoquit()
+static void joy_autoquit(void)
 {
 	int loop;
 	for(loop = 0; loop < JOYSTICK_MAXSTICKS; ++loop)
 	0,
 	0,
 	NULL,
-	0
+	0, 
+	(hashfunc)NULL,
+	(ternaryfunc)NULL,
+	(reprfunc)NULL,
+	0L,0L,0L,0L,
+	doc_Joystick_MODULE /* Documentation string */
 };
 
 
     /*DOC*/    "and the Joystick objects.\n"
     /*DOC*/ ;
 
-void initjoystick()
+void initjoystick(void)
 {
 	PyObject *module, *dict, *apiobj;
 	static void* c_api[PYGAMEAPI_JOYSTICK_NUMSLOTS];
     /*DOC*/    "keysyms.\n"
     /*DOC*/ ;
 
-void initkey()
+void initkey(void)
 {
 	PyObject *module, *dict;
 
     /*DOC*/    "the edges of the screen.\n"
     /*DOC*/ ;
 
-void initmouse()
+void initmouse(void)
 {
 	PyObject *module, *dict;
 
 		new1 = *o1;
 		Py_INCREF(new1);
 	}
-	else if(r = GameRect_FromObject(*o1, &temp))
+	else if((r = GameRect_FromObject(*o1, &temp)))
 		new1 = PyRect_New(r);
 	else
 		return 1;
 		new2 = *o2;
 		Py_INCREF(new2);
 	}
-	else if(r = GameRect_FromObject(*o2, &temp))
+	else if((r = GameRect_FromObject(*o2, &temp)))
 		new2 = PyRect_New(r);
 	else
 	{
     /*DOC*/    "Module for the rectangle object\n";
 
 
-void initrect()
+void initrect(void)
 {
 	PyObject *module, *dict, *apiobj;
 	static void* c_api[PYGAMEAPI_RECT_NUMSLOTS];
+	
+	PyGAME_C_API[0] = PyGAME_C_API[0]; /*this cleans a compiler warning*/
 
 	/* Create the module and add the functions */
 	PyType_Init(PyRect_Type);
 
 
 
-void initrwobject()
+void initrwobject(void)
 {
 	PyObject *module, *dict, *apiobj;
 	static void* c_api[PYGAMEAPI_RWOBJECT_NUMSLOTS];
 
+	PyGAME_C_API[0] = PyGAME_C_API[0]; /*this cleans a compiler warning*/
+
 	/* Create the module and add the functions */
 	module = Py_InitModule3("rwobject", rwobject__builtins__, "SDL_RWops support");
 	dict = PyModule_GetDict(module);
 }
 
 
-/*clip blit source rect to source image*/
-static void screencroprect(GAME_Rect* r, int w, int h)
-{
-	if(r->x >= w || r->y >= h)
-		r->x = r->y = r->w = r->h = 0;
-	else
-	{
-		if(r->x < 0) r->x = 0;
-		if(r->y < 0) r->y = 0;
-		if(r->x + r->w >= w) r->w = (w-1)-r->x;
-		if(r->y + r->h >= h) r->h = (h-1)-r->y;
-	}
-}
 
 
 
 		return NULL;
 	src = PySurface_AsSurface(srcobject);
 
-	if(src_rect = GameRect_FromObject(argpos, &temp))
+	if((src_rect = GameRect_FromObject(argpos, &temp)))
 	{
 		dx = src_rect->x;
 		dy = src_rect->y;
 	{"get_shifts",		surf_get_shifts,	1, doc_surf_get_shifts },
 	{"get_losses",		surf_get_losses,	1, doc_surf_get_losses },
 
+	{"save",		surf_save,		1, doc_surf_save }, 
+
 	{NULL,		NULL}
 };
 
     /*DOC*/    "surfaces, pygame.surface().\n"
     /*DOC*/ ;
 
-void initsurface()
+void initsurface(void)
 {
 	PyObject *module, *dict, *apiobj;
 	static void* c_api[PYGAMEAPI_SURFACE_NUMSLOTS];
 	SDL_PixelFormat* format;
 	PyArrayObject* array;
 	int loopx, loopy;
-	int stridex, stridey, stridez, stridez2, sizex, sizey;
+	int stridex, stridey, stridez=0, stridez2=0, sizex, sizey;
 	int Rloss, Gloss, Bloss, Rshift, Gshift, Bshift;
 
 	if(!PyArg_ParseTuple(arg, "O!O!", &PySurface_Type, &surfobj, &PyArray_Type, &arrayobj))
     /*DOC*/    "surfaces\n"
     /*DOC*/ ;
 
-void initsurfarray()
+void initsurfarray(void)
 {
 	PyObject *module, *dict;
 
     /*DOC*/    "Seconds*1000.(therefore 2500 milliseconds is 2.5 seconds)\n"
     /*DOC*/ ;
 
-void inittime()
+void inittime(void)
 {
 	PyObject *module, *dict;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.