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

@ -15,6 +15,8 @@
#include <ctype.h>
#include "rogue.h"
int exp_add(THING *tp);
/*
* List of monsters in rough order of vorpalness
*
@ -39,8 +41,8 @@ char wand_mons[] = {
* Pick a monster to show up. The lower the level,
* the meaner the monster.
*/
randmonster(wander)
bool wander;
char
randmonster(bool wander)
{
register int d;
register char *mons;
@ -61,10 +63,8 @@ bool wander;
* new_monster:
* Pick a new monster and add it to the list
*/
new_monster(tp, type, cp)
register THING *tp;
char type;
register coord *cp;
void
new_monster(THING *tp, char type, coord *cp)
{
register struct monster *mp;
register int lev_add;
@ -109,8 +109,8 @@ register coord *cp;
* expadd:
* Experience to add for this monster's level/hit points
*/
exp_add(tp)
register THING *tp;
int
exp_add(THING *tp)
{
register int mod;
@ -129,7 +129,8 @@ register THING *tp;
* wanderer:
* Create a new wandering monster and aim it at the player
*/
wanderer()
void
wanderer(void)
{
register int i;
register struct room *rp;
@ -166,8 +167,7 @@ wanderer()
* What to do when the hero steps next to a monster
*/
THING *
wake_monster(y, x)
int y, x;
wake_monster(int y, int x)
{
register THING *tp;
register struct room *rp;
@ -226,7 +226,8 @@ int y, x;
* genocide:
* Wipe one monster out of existence (for now...)
*/
genocide()
void
genocide(void)
{
register THING *mp;
register char c;
@ -270,8 +271,8 @@ genocide()
* give_pack:
* Give a pack to a monster if it deserves one
*/
give_pack(tp)
register THING *tp;
void
give_pack(THING *tp)
{
if (rnd(100) < monsters[tp->t_type-'A'].m_carry)
attach(tp->t_pack, new_thing());