diff arogue5/daemon.c @ 218:56e748983fa8

Advanced Rogue 5: convert to ANSI function declarations. This still leaves over a thousand lines of warning messages, mostly related to the return types of daemons and fuses.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents a5433ba4cabf
children b67b99f6c92b
line wrap: on
line diff
--- a/arogue5/daemon.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/daemon.c	Sun Feb 07 14:39:21 2016 -0500
@@ -36,7 +36,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;
@@ -52,7 +52,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;
@@ -70,8 +70,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;
@@ -87,6 +86,7 @@
  * start_daemon:
  *	Start a daemon, takes a function.
  */
+void
 start_daemon(int (*func)(), void *arg, int type)
 {
 	reg struct delayed_action *dev;
@@ -106,8 +106,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;
@@ -133,8 +133,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;
 
@@ -154,6 +154,7 @@
  * fuse:
  *	Start a fuse to go off in a certain number of turns
  */
+void
 fuse(int (*func)(), void *arg, int time, int type)
 {
 	reg struct delayed_action *wire;
@@ -173,8 +174,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;
 
@@ -188,8 +189,8 @@
  * extinguish:
  *	Put out a fuse
  */
-extinguish(func)
-reg int (*func)();
+void
+extinguish(int (*func)())
 {
 	reg struct delayed_action *wire;
 
@@ -207,8 +208,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;
 
@@ -234,7 +235,8 @@
  * activity:
  *	Show wizard number of demaons and memory blocks used
  */
-activity()
+void
+activity(void)
 {
 	sprintf(outstring,"Daemons = %d : Fuses = %d : Memory Items = %d : Memory Used = %d",
 	    demoncnt,fusecnt,total,md_memused());