diff srogue/daemon.c @ 217:94a0d9dd5ce1

Super-Rogue: convert to ANSI-style function declarations. This fixes most of the build warnings.
author John "Elwin" Edwards
date Sun, 31 Jan 2016 13:45:07 -0500
parents d6b7c3fb37ea
children b67b99f6c92b
line wrap: on
line diff
--- a/srogue/daemon.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/daemon.c	Sun Jan 31 13:45:07 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());