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

@ -16,12 +16,14 @@
#include <string.h>
#include "rogue.h"
void drain(void);
/*
* fix_stick:
* Set up a new stick
*/
fix_stick(cur)
register THING *cur;
void
fix_stick(THING *cur)
{
if (strcmp(ws_type[cur->o_which], "staff") == 0)
strcpy(cur->o_damage,"2d3");
@ -45,7 +47,8 @@ register THING *cur;
* do_zap:
* Perform a zap with a wand
*/
do_zap()
void
do_zap(void)
{
register THING *obj, *tp;
register int y, x;
@ -272,7 +275,8 @@ do_zap()
* drain:
* Do drain hit points from player shtick
*/
drain()
void
drain(void)
{
register THING *mp;
register int cnt;
@ -321,9 +325,8 @@ drain()
* fire_bolt:
* Fire a bolt in a given direction from a specific starting place
*/
fire_bolt(start, dir, name)
coord *start, *dir;
char *name;
void
fire_bolt(coord *start, coord *dir, char *name)
{
register char dirch, ch;
register THING *tp;
@ -446,8 +449,7 @@ def:
* Return an appropriate string for a wand charge
*/
char *
charge_str(obj)
register THING *obj;
charge_str(THING *obj)
{
static char buf[20];