Super-Rogue: convert to ANSI-style function declarations.
This fixes most of the build warnings.
This commit is contained in:
parent
0f87d5b4d8
commit
59f448e92e
33 changed files with 783 additions and 518 deletions
|
|
@ -34,8 +34,7 @@ struct delayed_action d_list[MAXDAEMONS] = {
|
|||
* 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 @@ int arg, type, time, (*func)();
|
|||
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 @@ struct delayed_action *wire;
|
|||
* 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 @@ int (*func)();
|
|||
* 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 @@ int arg, type, (*func)();
|
|||
* 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 @@ int flag;
|
|||
* 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 @@ int (*func)(), arg, time;
|
|||
* 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 @@ int (*func)(), xtime;
|
|||
* 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 @@ int (*func)();
|
|||
* do_fuses:
|
||||
* Decrement counters and start needed fuses
|
||||
*/
|
||||
do_fuses()
|
||||
void
|
||||
do_fuses(void)
|
||||
{
|
||||
reg struct delayed_action *dev;
|
||||
|
||||
|
|
@ -170,7 +169,8 @@ do_fuses()
|
|||
* 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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue