diff xrogue/rogue.h @ 239:837044d2c362

Merge the GCC5 and build fix branches. This fixes all warnings produced by GCC 5, except the ones related to system functions. Those could be fixed by including the proper headers, but it would be better to replace the system-dependent code with functions from mdport.c.
author John "Elwin" Edwards
date Fri, 11 Mar 2016 19:47:52 -0500
parents e1cd27c5464f
children 3d4252fa2ed3
line wrap: on
line diff
--- a/xrogue/rogue.h	Tue Mar 08 19:45:41 2016 -0500
+++ b/xrogue/rogue.h	Fri Mar 11 19:47:52 2016 -0500
@@ -20,12 +20,8 @@
 #include "config.h"
 #endif
 
-/*
- * some compiler don't handle void pointers well so
- */
 #include <assert.h>
 #define reg  register
-#define VOID long
 #undef lines
 #define ENCREAD encread
 #define ENCWRITE encwrite
@@ -933,9 +929,9 @@
 
 struct delayed_action {
     int d_type;
-    int (*d_func)();
+    void (*d_func)();
 	union {
-		VOID *vp;
+		void *vp;
 		int  i;
 	} d_arg;
     int d_time;
@@ -1249,7 +1245,7 @@
 bool    cansee(int y, int x);
 void    carry_obj(struct thing *mp, int chance);
 void    cast(void);
-void    changeclass(long *newclass);
+void    changeclass(int newclass);
 void    chant(void);
 void    chant_recovery(void);
 void    chase(struct thing *tp, coord *ee, struct room *rer, struct room *ree, 
@@ -1258,7 +1254,7 @@
 void    check_residue(struct thing *tp);
 void    chg_str(int amt);
 void    choose_qst(void);
-int     cloak_charge(struct object *obj);
+void    cloak_charge(struct object *obj);
 void    command(void);
 void    confus_player(void);
 int     const_bonus(void);
@@ -1310,19 +1306,19 @@
 void    endmsg(void);
 void    exit_game(int flag);
 void    explode(struct thing *tp);
-void    extinguish(int (*dfunc)());
+void    extinguish(void (*dfunc)());
 void    fall(struct linked_list *item, bool pr);
 coord  *fallpos(coord *pos, bool be_clear, int range);
 void    fatal(char *s);
 bool    fight(coord *mp, struct object *weap, bool thrown);
 struct linked_list *find_mons(int y, int x);
 struct linked_list *find_obj(int y, int x);
-struct delayed_action *find_slot(int (*func)());
+struct delayed_action *find_slot(void (*func)());
 int     findmindex(char *name);
 void    fix_stick(struct object *cur);
 void    fright(struct thing *th);
 void    fumble(void);
-void    fuse(int (*dfunc)(), VOID *arg, int time, int type);
+void    fuse(void (*dfunc)(), void *arg, int time, int type);
 void    genmonsters(int least, bool treas);
 coord   get_coordinates(void);
 bool    get_dir(coord *direction);
@@ -1359,10 +1355,10 @@
 bool    is_magic(struct object *obj);
 bool    isatrap(char ch);
 int     itemweight(struct object *wh);
-void    kill_daemon(int (*dfunc)());
+void    kill_daemon(void (*dfunc)());
 void    killed(struct linked_list *item, bool pr, bool points, bool treasure);
-int     land(void);
-void    lengthen(int (*dfunc)(), int xtime);
+void    land(void);
+void    lengthen(void (*dfunc)(), int xtime);
 void    light(coord *cp);
 bool    lit_room(struct room *rp);
 void    look(bool wakeup, bool runend);
@@ -1415,7 +1411,7 @@
 short   randmonster(bool wander, bool no_unique);
 void    read_scroll(int which, int flag, bool is_scroll);
 void    reap(void);
-int     res_strength(long howmuch);
+void    res_strength(long howmuch);
 bool    restore(char *file, char *envp[]);
 void    restscr(WINDOW *scr);
 int     ring_eat(int hand);
@@ -1452,7 +1448,7 @@
                  bool thrown);
 struct linked_list *spec_item(int type, int which, int hit, int damage);
 void    spell_recovery(void);
-void    start_daemon(int (*dfunc)(), VOID *arg, int type);
+void    start_daemon(void (*dfunc)(), void *arg, int type);
 void    status(bool display);
 void    steal(void);
 bool    step_ok(int y, int x, int can_on_monst, struct thing *flgptr);
@@ -1475,7 +1471,7 @@
 void    unchoke(void);
 void    unclrhead(void);
 void    unconfuse(void);
-int     undance(void);
+void    undance(void);
 void    unphase(void);
 void    unsee(void);
 void    unskill(void);
@@ -1648,7 +1644,6 @@
 extern FILE *logfile;
 extern LEVTYPE levtype;
 extern int (*add_abil[NUMABILITIES])(int); /* Functions to change abilities */
-extern int (*res_abil[NUMABILITIES])(); /* Functions to change abilities */
 extern int mf_count;       /* move_free counter - see actions.c(m_act()) */
 extern int mf_jmpcnt;      /* move_free counter for # of jumps        */
 extern int killed_chance;  /* cumulative chance for goodies to loose it, fight.c */