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

@ -10,14 +10,21 @@
* See the file LICENSE.TXT for full copyright and licensing information.
*/
#include <stdlib.h>
#include <curses.h>
#include "rogue.h"
void conn(int r1, int r2);
void door(struct room *rm, coord *cp);
void passnum(void);
void numpass(int y, int x);
/*
* do_passages:
* Draw all the passages on a level.
*/
do_passages()
void
do_passages(void)
{
register struct rdes *r1, *r2 = NULL;
register int i, j;
@ -125,8 +132,8 @@ do_passages()
* conn:
* Draw a corridor from a room in a certain direction.
*/
conn(r1, r2)
int r1, r2;
void
conn(int r1, int r2)
{
register struct room *rpf, *rpt = NULL;
register char rmt;
@ -269,9 +276,8 @@ int r1, r2;
* Add a door or possibly a secret door. Also enters the door in
* the exits array of the room.
*/
door(rm, cp)
register struct room *rm;
register coord *cp;
void
door(struct room *rm, coord *cp)
{
register int index;
@ -291,7 +297,8 @@ register coord *cp;
* add_pass:
* Add the passages to the current window (wizard command)
*/
add_pass()
void
add_pass(void)
{
register int y, x, ch;
@ -309,7 +316,8 @@ add_pass()
static int pnum;
static bool newpnum;
passnum()
void
passnum(void)
{
register struct room *rp;
register int i;
@ -330,8 +338,8 @@ passnum()
* numpass:
* Number a passageway square and its brethren
*/
numpass(y, x)
register int y, x;
void
numpass(int y, int x)
{
register char *fp;
register struct room *rp;