Mercurial > hg > early-roguelike
diff xrogue/daemon.c @ 225:4f6e056438eb
Merge the GCC5 and build fix branches.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:28:34 -0500 |
parents | f54901b9c39b |
children | b67b99f6c92b |
line wrap: on
line diff
--- a/xrogue/daemon.c Fri Feb 26 17:30:30 2016 -0500 +++ b/xrogue/daemon.c Wed Mar 02 21:28:34 2016 -0500 @@ -41,7 +41,7 @@ * Find an empty slot in the daemon list */ struct delayed_action * -d_slot() +d_slot(void) { reg int i; reg struct delayed_action *dev; @@ -57,7 +57,7 @@ * Find an empty slot in the fuses list */ struct delayed_action * -f_slot() +f_slot(void) { reg int i; reg struct delayed_action *dev; @@ -74,8 +74,7 @@ */ struct delayed_action * -find_slot(func) -reg int (*func)(); +find_slot(int (*func)()) { reg int i; reg struct delayed_action *dev; @@ -91,9 +90,8 @@ * Start a daemon, takes a function. */ -start_daemon(dfunc, arg, type) -reg VOID *arg; -reg int type, (*dfunc)(); +void +start_daemon(int (*dfunc)(), VOID *arg, int type) { reg struct delayed_action *dev; @@ -112,8 +110,8 @@ * Remove a daemon from the list */ -kill_daemon(dfunc) -reg int (*dfunc)(); +void +kill_daemon(int (*dfunc)()) { reg struct delayed_action *dev; reg int i; @@ -140,8 +138,8 @@ * passing the argument to the function. */ -do_daemons(flag) -reg int flag; +void +do_daemons(int flag) { struct delayed_action *dev; int i; @@ -165,9 +163,8 @@ * Start a fuse to go off in a certain number of turns */ -fuse(dfunc, arg, time, type) -VOID *arg; -reg int (*dfunc)(), time, type; +void +fuse(int (*dfunc)(), VOID *arg, int time, int type) { reg struct delayed_action *wire; @@ -186,8 +183,8 @@ * Increase the time until a fuse goes off */ -lengthen(dfunc, xtime) -reg int (*dfunc)(), xtime; +void +lengthen(int (*dfunc)(), int xtime) { reg struct delayed_action *wire; @@ -201,8 +198,8 @@ * Put out a fuse */ -extinguish(dfunc) -reg int (*dfunc)(); +void +extinguish(int (*dfunc)()) { reg struct delayed_action *wire; @@ -220,8 +217,8 @@ * Decrement counters and start needed fuses */ -do_fuses(flag) -reg int flag; +void +do_fuses(int flag) { struct delayed_action *wire; int i; @@ -250,7 +247,8 @@ * Show wizard number of demaons and memory blocks used */ -activity() +void +activity(void) { msg("Daemons = %d : Fuses = %d : Memory Items = %d : Memory Used = %d", demoncnt,fusecnt,total,md_memused());