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.
This commit is contained in:
John "Elwin" Edwards 2016-02-07 14:39:21 -05:00
parent 59f448e92e
commit f38b2223c8
37 changed files with 977 additions and 733 deletions

View file

@ -14,6 +14,7 @@
#include "curses.h"
#include "rogue.h"
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
@ -21,8 +22,8 @@
/*
* Check_residue takes care of any effect of the monster
*/
check_residue(tp)
register struct thing *tp;
void
check_residue(struct thing *tp)
{
/*
* Take care of special abilities
@ -63,13 +64,11 @@ register struct thing *tp;
/*
* Creat_mons creates the specified monster -- any if 0
* person: Where to create next to
*/
bool
creat_mons(person, monster, report)
struct thing *person; /* Where to create next to */
short monster;
bool report;
creat_mons(struct thing *person, short monster, bool report)
{
struct linked_list *nitem;
register struct thing *tp;
@ -121,9 +120,7 @@ bool report;
*/
void
genmonsters(least, treas)
register int least;
bool treas;
genmonsters(int least, bool treas)
{
reg int i;
reg struct room *rp = &rooms[0];
@ -166,8 +163,7 @@ bool treas;
*/
short
id_monst(monster)
register char monster;
id_monst(char monster)
{
register short result;
@ -187,11 +183,8 @@ register char monster;
* Pick a new monster and add it to the list
*/
new_monster(item, type, cp, max_monster)
struct linked_list *item;
short type;
register coord *cp;
bool max_monster;
void
new_monster(struct linked_list *item, short type, coord *cp, bool max_monster)
{
register struct thing *tp;
register struct monster *mp;
@ -379,8 +372,7 @@ bool max_monster;
*/
short
randmonster(wander, no_unique)
register bool wander, no_unique;
randmonster(bool wander, bool no_unique)
{
register int d, cur_level, range, i;
@ -418,8 +410,8 @@ register bool wander, no_unique;
* to purchase something.
*/
sell(tp)
register struct thing *tp;
void
sell(struct thing *tp)
{
register struct linked_list *item;
register struct object *obj;
@ -731,8 +723,7 @@ register struct thing *tp;
* what to do when the hero steps next to a monster
*/
struct linked_list *
wake_monster(y, x)
int y, x;
wake_monster(int y, int x)
{
register struct thing *tp;
register struct linked_list *it;
@ -957,7 +948,8 @@ int y, x;
* A wandering monster has awakened and is headed for the player
*/
wanderer()
void
wanderer(void)
{
register int i;
register struct room *hr = roomin(&hero);