File xbl-fix-gcc15.patch of Package xbl

diff --git a/initmenu.c b/initmenu.c
index 7e0e5b1..d69aeb0 100644
--- a/initmenu.c
+++ b/initmenu.c
@@ -64,25 +64,25 @@ void initmenu(struct bl *bl)
 
   init_movinggc(d,w,&movinggc,bl->x.back_pixel,bl->x.white_pixel,bl->x.black_pixel) ;
 
-  m->score = create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)()) NULL,textthescore,
+  m->score = create_button(CSTP,FLAT_TEXT,&movinggc,(void*) NULL,textthescore,
 			   create_line("Score",m->xfont,m->text1),
 			   create_line("000000",m->xfont2,m->text2),
 			   NULL) ;
-  m->hiscore = create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)())NULL,texthiscore,
+  m->hiscore = create_button(CSTP,FLAT_TEXT,&movinggc,(void*)NULL,texthiscore,
 			     create_line("High Score",m->xfont,m->text1),
 			     create_line("000000",m->xfont2,m->text2),
 			     NULL) ;
-  m->cube = create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)())NULL,textcube,
+  m->cube = create_button(CSTP,FLAT_TEXT,&movinggc,(void*)NULL,textcube,
 			  create_line("#cubes 00000",m->xfont,m->text1),
 			  NULL) ;
-  m->bloc = create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)())NULL,textbloc,
+  m->bloc = create_button(CSTP,FLAT_TEXT,&movinggc,(void*)NULL,textbloc,
 			  create_line("#blocs 00000",m->xfont,m->text1),
 			  NULL) ;
-  m->destroylevel = create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)())NULL,textdlevel,
+  m->destroylevel = create_button(CSTP,FLAT_TEXT,&movinggc,(void*)NULL,textdlevel,
 				  create_line("#destroy level",m->xfont,m->text1),
 				  create_line("0000",m->xfont,m->text1),
 				  NULL) ;
-  m->level = create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)())NULL,textlevel,
+  m->level = create_button(CSTP,FLAT_TEXT,&movinggc,(void*)NULL,textlevel,
 			   create_line("current level",m->xfont,m->text1),
 			   create_line("00",m->xfont,m->text1),
 			   NULL) ;
@@ -135,7 +135,7 @@ void initmenu(struct bl *bl)
   m->stereo = create_button(CSTP,RELIEF_TEXT,&movinggc,fctstereo,textstereo,
 			    create_line("Eye Distance 9.9",m->xfont,m->text1),
 			    NULL) ;
-  m->frame=create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)())NULL,textframe,
+  m->frame=create_button(CSTP,FLAT_TEXT,&movinggc,(void*)NULL,textframe,
 			 create_line("Frame/Sec. 000",m->xfont,m->text1),
 			 NULL) ;
 
@@ -177,10 +177,10 @@ void initmenu(struct bl *bl)
 			 NULL) ;
   createhelp(m->key,bl->key) ;
 
-  m->quit = create_button(CSTP,RELIEF_TEXT,&movinggc,fctquit,(void(*)())NULL,
+  m->quit = create_button(CSTP,RELIEF_TEXT,&movinggc,fctquit,(void*)NULL,
 			  create_line("QUIT",m->xfont,m->text1),
 			  NULL) ;
-  m->state = create_button(CSTP,FLAT_TEXT,&movinggc,(void(*)())NULL,textstate,
+  m->state = create_button(CSTP,FLAT_TEXT,&movinggc,(void*)NULL,textstate,
 			   create_line(SUSPENDED_GAME,m->xfont,m->text1),
 			   NULL) ;
 
@@ -194,7 +194,7 @@ void initmenu(struct bl *bl)
   m->quit->menu = m ;
   m->state->menu = m ;
 
-  m->copyright = create_button(CSTP,RELIEF_TEXT,&movinggc,fctcopyright,(void(*)())NULL,
+  m->copyright = create_button(CSTP,RELIEF_TEXT,&movinggc,fctcopyright,(void*)NULL,
 			       create_line("Copyright (C) 1992-1994,2001,2003 Thierry EXCOFFIER",m->xfont,m->text1),
 			       create_line("XBlockOut comes with ABSOLUTELY NO WARRANTY, This is",m->xfont,m->text1),
 			       create_line("free software, and you are welcome to redistribute it",m->xfont,m->text1),
@@ -248,7 +248,7 @@ void initmenu(struct bl *bl)
 
 Pixmap createhelpbitmap(struct bl *bl, int l, int h, int *tx, int *ty)
 {
-  char *helpbitmap() ;
+  char *helpbitmap(int,int,int*,int*) ;
 
   bl->menu.widthhelpkey = l ;
   bl->menu.heighthelpkey = h ;
diff --git a/loop.c b/loop.c
index aac3785..e06dc7d 100644
--- a/loop.c
+++ b/loop.c
@@ -71,7 +71,7 @@ void loop(struct bl *bl)
 {
   XEvent event ;
   time_t last_event,tmp ;
-  void demo() ;
+  void demo(struct bl *) ;
   int last_global_c ;
 
   /*
@@ -140,7 +140,7 @@ void loop(struct bl *bl)
 	  gameevent(bl,&event) ;
 	}
 
-      walkrowcol(bl->menu.all,next_button,0,0,0,0) ; /* Display buttons */
+      walkrowcol(bl->menu.all,(void *)next_button,0,0,0,0) ; /* Display buttons */
       if ( bl->opt.state!=STOP && bl->opt.state!=SUSPEND )
 	{
 	  /* Here : Its RUNNING or DEMO */
diff --git a/menu.c b/menu.c
index 90b1be9..83c0d50 100644
--- a/menu.c
+++ b/menu.c
@@ -26,7 +26,7 @@
 
 void displaymenu(struct menu *m, int x, int y, int dx, int dy)
 {
-  void displayhelp() ;
+  void displayhelp(struct moving_button *) ;
 
   displaystairs( m ) ;
   display_rowcol( m->all,x,y,dx,dy ) ;
diff --git a/movingbutton.c b/movingbutton.c
index dac03e3..6b7d973 100644
--- a/movingbutton.c
+++ b/movingbutton.c
@@ -105,7 +105,7 @@ void button_extent(struct moving_button *b)
 /* Utility to create a button                  				*/
 /************************************************************************/
 struct moving_button* create_button(Display *d,Window w, int h, int type, struct movinggc *gc,
-				    void (*fct)(), void (*prp)(), ...)
+				    void (*fct)(struct moving_button *,int), void (*prp)(struct moving_button *), ...)
      /*Display *d ;
        int h ;
        Window w ;
@@ -439,9 +439,9 @@ struct row_column* scotch(struct row_column *cur, ...)
   return(first) ;
 }
 /************************************************************************/
-/* Recursive call of a fonction                                         */
+/* Recursive call of a function                                         */
 /************************************************************************/
-void walkrowcol(struct row_column *r, void (*fct) (/* ??? */), int x, int y, int b, int b2)
+void walkrowcol(struct row_column *r, void (*fct) (struct row_column *, int,int,int,int), int x, int y, int b, int b2)
 {
   if ( r==0 ) return ;
   if ( r->type==A_BUTTON )
@@ -590,33 +590,33 @@ void posit_button(struct row_column *r, int x, int y)
 int compute_height(struct row_column *r)
 {
   (void)minimumheight((struct moving_button*)NULL,INIT_MINIMUM) ;
-  walkrowcol(r, (void (*)())minimumheight,COMPUTE_MINIMUM,0,0,0) ;
+  walkrowcol(r, (void *)minimumheight,COMPUTE_MINIMUM,0,0,0) ;
   return( minimumheight((struct moving_button*)NULL,GIVE_MINIMUM) ) ;
 }
 /* Stretch to minimum height or 2* 3* ... minimum height */
 void compute_stretch(struct row_column *r, int minimum)
 {
-  walkrowcol(r,stretch,minimum,0,0,0) ;
+  walkrowcol(r,(void*)stretch,minimum,0,0,0) ;
 }
 /* Compute the size of all columns and rows */
 void compute_rowcol(struct row_column *r)
 {
-  walkrowcol(r,sizerowcol,0,0,0,0) ;
+  walkrowcol(r,(void*)sizerowcol,0,0,0,0) ;
 }
 /* Compute the position of all columns and rows */
 void compute_posit(struct row_column *r, int xdecal)
 {
-  walkrowcol(r,posit_button,xdecal,0,0,0) ;
+  walkrowcol(r,(void*)posit_button,xdecal,0,0,0) ;
 }
 /* Display all the buttons */
 void display_rowcol(struct row_column *r, int x, int y, int dx, int dy)
 {
-  walkrowcol(r,display_button,x,y,dx,dy) ;
+  walkrowcol(r,(void*)display_button,x,y,dx,dy) ;
 }
 /* Push buttons... */
 void push_rowcol(struct row_column *r, int x, int y, int b)
 {
-  walkrowcol(r,push_button,x,y,b,0) ;
+  walkrowcol(r,(void*)push_button,x,y,b,0) ;
 }
 /* Set window value */
 static void setwindowvalue(struct moving_button *b, int x)
@@ -627,6 +627,6 @@ void windowset(struct row_column *b, Window x)
 {
   /* Sorry for the warning    v         */
   /* May be this thing doesn't work with all compiler */
-  walkrowcol(b,setwindowvalue,x,0,0,0) ;
+  walkrowcol(b,(void*)setwindowvalue,x,0,0,0) ;
 }
 
diff --git a/movingbutton.h b/movingbutton.h
index d46e630..334eeb4 100644
--- a/movingbutton.h
+++ b/movingbutton.h
@@ -66,9 +66,9 @@ struct moving_button
 	int margin ;		/* Size of margin in pixel */
 	int linestretching ;	/* */
 	struct movinggc *gc ;
-	void (*fct)() ;		/* fct to call if press */
+	void (*fct)(struct moving_button *,int) ;		/* fct to call if press */
 	int but ;		/* Argument for fct */
-	void (*prp)() ;		/* fct to call before display */
+	void (*prp)(struct moving_button *) ;		/* fct to call before display */
 	struct menu *menu ;
 	} ;
 
@@ -82,10 +82,10 @@ struct row_column
 
 extern struct text_line* create_line(char *maximum, XFontStruct *xfont, GC gc) ;
 extern struct moving_button* create_button(Display *d,Window w,int height,int type,struct movinggc *gc,
-		  void (*fct)(),void (*prp)(),...) ;
+		  void (*fct)(struct moving_button *,int),void (*prp)(struct moving_button *),...) ;
 extern void init_movinggc(Display *d, Window w, struct movinggc *mgc, long unsigned int background, long unsigned int foreground, long unsigned int shadow) ;
 extern struct row_column* scotch(struct row_column *r, ...) ;
-extern void walkrowcol(struct row_column *r, void (*fct) (/* ??? */), int x, int y, int b, int b2) ;
+extern void walkrowcol(struct row_column *r, void (*fct) (struct row_column*, int,int,int,int), int x, int y, int b, int b2) ;
 extern void button_extent(struct moving_button *b) ;
 extern void display_button(struct moving_button *b,int x,int y, int dx,int dy) ;
 extern void next_button(struct moving_button *b) ;
openSUSE Build Service is sponsored by