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.
This commit is contained in:
John "Elwin" Edwards 2016-02-19 21:02:28 -05:00
parent f38b2223c8
commit e8e6e604c3
39 changed files with 1181 additions and 889 deletions

View file

@ -44,7 +44,7 @@ int fusecnt = 0;
* 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 @@ d_slot()
* 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 @@ f_slot()
* 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 @@ reg int (*func)();
* 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 @@ reg int arg, type, (*func)();
* 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 @@ reg int (*func)();
* 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 @@ reg int flag;
* 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 @@ reg int (*func)(), arg, time, type;
* 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 @@ reg int (*func)(), xtime;
* extinguish:
* Put out a fuse
*/
extinguish(func)
reg int (*func)();
void
extinguish(int (*func)())
{
reg struct delayed_action *wire;
@ -217,8 +216,8 @@ reg int (*func)();
* 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 @@ reg int flag;
* 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());
}