Mercurial > hg > early-roguelike
diff srogue/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 | 94a0d9dd5ce1 |
children | b67b99f6c92b |
line wrap: on
line diff
--- a/srogue/daemon.c Fri Feb 26 17:30:30 2016 -0500 +++ b/srogue/daemon.c Wed Mar 02 21:28:34 2016 -0500 @@ -34,8 +34,7 @@ * Insert a function in the daemon list. */ struct delayed_action * -d_insert(func, arg, type, time) -int arg, type, time, (*func)(); +d_insert(int (*func)(), int arg, int type, int time) { reg struct delayed_action *dev; @@ -51,8 +50,8 @@ return NULL; } -d_delete(wire) -struct delayed_action *wire; +void +d_delete(struct delayed_action *wire) { reg struct delayed_action *d1, *d2; @@ -73,8 +72,7 @@ * Find a particular slot in the table */ struct delayed_action * -find_slot(func) -int (*func)(); +find_slot(int (*func)()) { reg struct delayed_action *dev; @@ -88,8 +86,8 @@ * start_daemon: * Start a daemon, takes a function. */ -start_daemon(func, arg, type) -int arg, type, (*func)(); +void +start_daemon(int (*func)(), int arg, int type) { d_insert(func, arg, type, DAEMON); } @@ -99,8 +97,8 @@ * Run all the daemons that are active with the current * flag, passing the argument to the function. */ -do_daemons(flag) -int flag; +void +do_daemons(int flag) { reg struct delayed_action *dev; @@ -113,8 +111,8 @@ * fuse: * Start a fuse to go off in a certain number of turns */ -fuse(func, arg, time) -int (*func)(), arg, time; +void +fuse(int (*func)(), int arg, int time) { d_insert(func, arg, AFTER, time); } @@ -123,8 +121,8 @@ * lengthen: * Increase the time until a fuse goes off */ -lengthen(func, xtime) -int (*func)(), xtime; +void +lengthen(int (*func)(), int xtime) { reg struct delayed_action *wire; @@ -137,8 +135,8 @@ * extinguish: * Put out a fuse. Find all such fuses and kill them. */ -extinguish(func) -int (*func)(); +void +extinguish(int (*func)()) { reg struct delayed_action *dev; @@ -151,7 +149,8 @@ * do_fuses: * Decrement counters and start needed fuses */ -do_fuses() +void +do_fuses(void) { reg struct delayed_action *dev; @@ -170,7 +169,8 @@ * activity: * Show wizard number of demaons and memory blocks used */ -activity() +void +activity(void) { msg("Daemons = %d : Memory Items = %d : Memory Used = %d", demoncnt,total,md_memused());