rogue4: fix most GCC5 warnings.

Converting all function definitions to ANSI style accounts for most of
the change.  This has exposed other problems, such as daemons not
actually being their stated type, that will require more careful
solutions.
This commit is contained in:
John "Elwin" Edwards 2016-01-27 19:41:05 -05:00
parent 384386d71c
commit c1d6a6af6a
32 changed files with 625 additions and 394 deletions

View file

@ -14,6 +14,9 @@
#include <ctype.h>
#include "rogue.h"
void turnref(void);
char be_trapped(coord *tc);
/*
* Used to hold the new hero position
*/
@ -24,8 +27,8 @@ coord nh;
* do_run:
* Start the hero running
*/
do_run(ch)
char ch;
void
do_run(char ch)
{
running = TRUE;
after = FALSE;
@ -37,8 +40,8 @@ char ch;
* Check to see that a move is legal. If it is handle the
* consequences (fighting, picking up, etc.)
*/
do_move(dy, dx)
int dy, dx;
void
do_move(int dy, int dx)
{
register char ch, fl;
@ -189,7 +192,8 @@ move_stuff:
* turnref:
* Decide whether to refresh at a passage turning or not
*/
turnref()
void
turnref(void)
{
register int index;
@ -211,8 +215,8 @@ turnref()
* Called to illuminate a room. If it is dark, remove anything
* that might move.
*/
door_open(rp)
struct room *rp;
void
door_open(struct room *rp)
{
register int j, k;
register char ch;
@ -238,8 +242,8 @@ struct room *rp;
* be_trapped:
* The guy stepped on a trap.... Make him pay.
*/
be_trapped(tc)
register coord *tc;
char
be_trapped(coord *tc)
{
register char tr;
register int index;
@ -316,8 +320,7 @@ register coord *tc;
* Move in a random direction if the monster/person is confused
*/
coord *
rndmove(who)
THING *who;
rndmove(THING *who)
{
register int x, y;
register char ch;