Mercurial > hg > early-roguelike
diff arogue7/daemon.c @ 228:b67b99f6c92b
Daemons and fuses now return void.
Functions for starting and stopping daemons and fuses now expect the
type 'void (*func)()'. Only a few functions in XRogue needed to be
modified to fit. Determining the type of the argument is left for a
later date.
Building with GCC5 should now produce less than 200 lines of warnings
per game.
author | John "Elwin" Edwards |
---|---|
date | Sat, 05 Mar 2016 20:49:37 -0500 |
parents | f9ef86cf22b2 |
children | e1cd27c5464f |
line wrap: on
line diff
--- a/arogue7/daemon.c Sat Mar 05 12:10:20 2016 -0500 +++ b/arogue7/daemon.c Sat Mar 05 20:49:37 2016 -0500 @@ -78,7 +78,7 @@ * Find a particular slot in the table */ struct delayed_action * -find_slot(int (*func)()) +find_slot(void (*func)()) { reg int i; reg struct delayed_action *dev; @@ -95,7 +95,7 @@ * Start a daemon, takes a function. */ void -start_daemon(int (*func)(), int arg, int type) +start_daemon(void (*func)(), int arg, int type) { reg struct delayed_action *dev; @@ -115,7 +115,7 @@ * Remove a daemon from the list */ void -kill_daemon(int (*func)()) +kill_daemon(void (*func)()) { reg struct delayed_action *dev; reg int i; @@ -163,7 +163,7 @@ * Start a fuse to go off in a certain number of turns */ void -fuse(int (*func)(), int arg, int time, int type) +fuse(void (*func)(), int arg, int time, int type) { reg struct delayed_action *wire; @@ -183,7 +183,7 @@ * Increase the time until a fuse goes off */ void -lengthen(int (*func)(), int xtime) +lengthen(void (*func)(), int xtime) { reg struct delayed_action *wire; @@ -198,7 +198,7 @@ * Put out a fuse */ void -extinguish(int (*func)()) +extinguish(void (*func)()) { reg struct delayed_action *wire;