Mercurial > hg > early-roguelike
diff arogue7/daemon.c @ 219:f9ef86cf22b2
Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
author | John "Elwin" Edwards |
---|---|
date | Fri, 19 Feb 2016 21:02:28 -0500 |
parents | cadff8f047a1 |
children | b67b99f6c92b |
line wrap: on
line diff
--- a/arogue7/daemon.c Sun Feb 07 14:39:21 2016 -0500 +++ b/arogue7/daemon.c Fri Feb 19 21:02:28 2016 -0500 @@ -44,7 +44,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; @@ -60,7 +60,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; @@ -78,8 +78,7 @@ * Find a particular slot in the table */ struct delayed_action * -find_slot(func) -reg int (*func)(); +find_slot(int (*func)()) { reg int i; reg struct delayed_action *dev; @@ -95,8 +94,8 @@ * start_daemon: * Start a daemon, takes a function. */ -start_daemon(func, arg, type) -reg int arg, type, (*func)(); +void +start_daemon(int (*func)(), int arg, int type) { reg struct delayed_action *dev; @@ -115,8 +114,8 @@ * kill_daemon: * Remove a daemon from the list */ -kill_daemon(func) -reg int (*func)(); +void +kill_daemon(int (*func)()) { reg struct delayed_action *dev; reg int i; @@ -142,8 +141,8 @@ * Run all the daemons that are active with the current flag, * passing the argument to the function. */ -do_daemons(flag) -reg int flag; +void +do_daemons(int flag) { reg struct delayed_action *dev; @@ -163,8 +162,8 @@ * fuse: * Start a fuse to go off in a certain number of turns */ -fuse(func, arg, time, type) -reg int (*func)(), arg, time, type; +void +fuse(int (*func)(), int arg, int time, int type) { reg struct delayed_action *wire; @@ -183,8 +182,8 @@ * lengthen: * Increase the time until a fuse goes off */ -lengthen(func, xtime) -reg int (*func)(), xtime; +void +lengthen(int (*func)(), int xtime) { reg struct delayed_action *wire; @@ -198,8 +197,8 @@ * extinguish: * Put out a fuse */ -extinguish(func) -reg int (*func)(); +void +extinguish(int (*func)()) { reg struct delayed_action *wire; @@ -217,8 +216,8 @@ * do_fuses: * Decrement counters and start needed fuses */ -do_fuses(flag) -reg int flag; +void +do_fuses(int flag) { reg struct delayed_action *wire; @@ -245,8 +244,9 @@ * activity: * 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(0)); + demoncnt,fusecnt,total,md_memused()); }