switch source tree from k&r to c99

This commit is contained in:
nhmall
2021-01-26 21:06:16 -05:00
parent a2a9cb7b4f
commit f963c5aca7
232 changed files with 12099 additions and 17782 deletions

View File

@@ -5,14 +5,13 @@
#include "hack.h"
static boolean FDECL(no_bones_level, (d_level *));
static void FDECL(goodfruit, (int));
static void FDECL(resetobjs, (struct obj *, BOOLEAN_P));
static boolean FDECL(fixuporacle, (struct monst *));
static boolean no_bones_level(d_level *);
static void goodfruit(int);
static void resetobjs(struct obj *, boolean);
static boolean fixuporacle(struct monst *);
static boolean
no_bones_level(lev)
d_level *lev;
no_bones_level(d_level *lev)
{
s_level *sptr;
@@ -36,8 +35,7 @@ d_level *lev;
* chain of fruit types, we know to only save the types that exist.
*/
static void
goodfruit(id)
int id;
goodfruit(int id)
{
struct fruit *f = fruit_from_indx(-id);
@@ -46,9 +44,7 @@ int id;
}
static void
resetobjs(ochain, restore)
struct obj *ochain;
boolean restore;
resetobjs(struct obj *ochain, boolean restore)
{
struct obj *otmp, *nobj;
@@ -193,8 +189,7 @@ boolean restore;
/* while loading bones, strip out text possibly supplied by old player
that might accidentally or maliciously disrupt new player's display */
void
sanitize_name(namebuf)
char *namebuf;
sanitize_name(char *namebuf)
{
int c;
boolean strip_8th_bit = (WINDOWPORT("tty")
@@ -220,10 +215,9 @@ char *namebuf;
/* called by savebones(); also by finish_paybill(shk.c) */
void
drop_upon_death(mtmp, cont, x, y)
struct monst *mtmp; /* monster if hero turned into one (other than ghost) */
struct obj *cont; /* container if hero is turned into a statue */
int x, y;
drop_upon_death(struct monst *mtmp, /* monster if hero turned into one (other than ghost) */
struct obj *cont, /* container if hero is turned into a statue */
int x, int y)
{
struct obj *otmp;
@@ -265,8 +259,7 @@ int x, y;
/* possibly restore oracle's room and/or put her back inside it; returns
False if she's on the wrong level and should be removed, True otherwise */
static boolean
fixuporacle(oracle)
struct monst *oracle;
fixuporacle(struct monst *oracle)
{
coord cc;
int ridx, o_ridx;
@@ -314,7 +307,7 @@ struct monst *oracle;
/* check whether bones are feasible */
boolean
can_make_bones()
can_make_bones(void)
{
register struct trap *ttmp;
@@ -347,10 +340,7 @@ can_make_bones()
/* save bones and possessions of a deceased adventurer */
void
savebones(how, when, corpse)
int how;
time_t when;
struct obj *corpse;
savebones(int how, time_t when, struct obj *corpse)
{
int x, y;
struct trap *ttmp;
@@ -545,7 +535,7 @@ struct obj *corpse;
}
int
getbones()
getbones(void)
{
int ok;
NHFILE *nhfp = (NHFILE *) 0;
@@ -658,8 +648,7 @@ getbones()
/* check whether current level contains bones from a particular player */
boolean
bones_include_name(name)
const char *name;
bones_include_name(const char *name)
{
struct cemetery *bp;
int len;