remove register from variable declarations
This commit is contained in:
@@ -2813,4 +2813,5 @@ remove the window port get_menu_coloring() calls from all the existing window
|
||||
remove TEXTCOLOR build option
|
||||
relocate general-purpose function choose_classes_menu(), from
|
||||
options.c to windows.c
|
||||
remove register from variable declarations
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ ATTRNORETURN extern void panic(const char *, ...) PRINTF_F(1, 2) NORETURN;
|
||||
long *
|
||||
alloc(unsigned int lth)
|
||||
{
|
||||
register genericptr_t ptr;
|
||||
genericptr_t ptr;
|
||||
|
||||
ForceAlignedLength(lth);
|
||||
ptr = malloc(lth);
|
||||
|
||||
+13
-13
@@ -692,7 +692,7 @@ number_leashed(void)
|
||||
void
|
||||
o_unleash(struct obj *otmp)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
||||
if (mtmp->m_id == (unsigned) otmp->leashmon) {
|
||||
@@ -707,7 +707,7 @@ o_unleash(struct obj *otmp)
|
||||
void
|
||||
m_unleash(struct monst *mtmp, boolean feedback)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
if (feedback) {
|
||||
if (canseemon(mtmp))
|
||||
@@ -726,8 +726,8 @@ m_unleash(struct monst *mtmp, boolean feedback)
|
||||
void
|
||||
unleash_all(void)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj)
|
||||
if (otmp->otyp == LEASH)
|
||||
@@ -910,8 +910,8 @@ next_to_u(void)
|
||||
void
|
||||
check_leash(coordxy x, coordxy y)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj) {
|
||||
if (otmp->otyp != LEASH || otmp->leashmon == 0)
|
||||
@@ -1180,7 +1180,7 @@ use_mirror(struct obj *obj)
|
||||
static void
|
||||
use_bell(struct obj **optr)
|
||||
{
|
||||
register struct obj *obj = *optr;
|
||||
struct obj *obj = *optr;
|
||||
struct monst *mtmp;
|
||||
boolean wakem = FALSE, learno = FALSE,
|
||||
ordinary = (obj->otyp != BELL_OF_OPENING || !obj->spe),
|
||||
@@ -1365,8 +1365,8 @@ use_candelabrum(struct obj *obj)
|
||||
static void
|
||||
use_candle(struct obj **optr)
|
||||
{
|
||||
register struct obj *obj = *optr;
|
||||
register struct obj *otmp;
|
||||
struct obj *obj = *optr;
|
||||
struct obj *otmp;
|
||||
const char *s = (obj->quan != 1) ? "candles" : "candle";
|
||||
char qbuf[QBUFSZ], qsfx[QBUFSZ], *q;
|
||||
boolean was_lamplit;
|
||||
@@ -2514,7 +2514,7 @@ figurine_location_checks(struct obj *obj, coord *cc, boolean quietly)
|
||||
static int
|
||||
use_figurine(struct obj **optr)
|
||||
{
|
||||
register struct obj *obj = *optr;
|
||||
struct obj *obj = *optr;
|
||||
coordxy x, y;
|
||||
coord cc;
|
||||
|
||||
@@ -3803,9 +3803,9 @@ do_break_wand(struct obj *obj)
|
||||
{
|
||||
#define BY_OBJECT ((struct monst *) 0)
|
||||
static const char nothing_else_happens[] = "But nothing else happens...";
|
||||
register int i;
|
||||
int i;
|
||||
coordxy x, y;
|
||||
register struct monst *mon;
|
||||
struct monst *mon;
|
||||
int dmg, damage;
|
||||
boolean affects_objects;
|
||||
boolean shop_damage = FALSE;
|
||||
@@ -4095,7 +4095,7 @@ int
|
||||
doapply(void)
|
||||
{
|
||||
struct obj *obj;
|
||||
register int res = ECMD_TIME;
|
||||
int res = ECMD_TIME;
|
||||
|
||||
if (nohands(gy.youmonst.data)) {
|
||||
You("aren't able to use or apply tools in your current form.");
|
||||
|
||||
+13
-13
@@ -244,8 +244,8 @@ artifact_name(
|
||||
short *otyp_p, /* secondary output */
|
||||
boolean fuzzy) /* whether to allow extra or omitted spaces or dashes */
|
||||
{
|
||||
register const struct artifact *a;
|
||||
register const char *aname;
|
||||
const struct artifact *a;
|
||||
const char *aname;
|
||||
|
||||
if (!strncmpi(name, "the ", 4))
|
||||
name += 4;
|
||||
@@ -268,7 +268,7 @@ artifact_name(
|
||||
boolean
|
||||
exist_artifact(int otyp, const char *name)
|
||||
{
|
||||
register const struct artifact *a;
|
||||
const struct artifact *a;
|
||||
struct arti_info *arex;
|
||||
|
||||
if (otyp && *name)
|
||||
@@ -287,7 +287,7 @@ artifact_exists(
|
||||
boolean mod, /* True: exists, False: being un-created */
|
||||
unsigned flgs) /* ONAME_xyz flags; not relevant if !mod */
|
||||
{
|
||||
register const struct artifact *a;
|
||||
const struct artifact *a;
|
||||
|
||||
if (otmp && *name)
|
||||
for (a = artilist + 1; a->otyp; a++)
|
||||
@@ -487,7 +487,7 @@ shade_glare(struct obj *obj)
|
||||
boolean
|
||||
restrict_name(struct obj *otmp, const char *name)
|
||||
{
|
||||
register const struct artifact *a;
|
||||
const struct artifact *a;
|
||||
const char *aname, *odesc, *other;
|
||||
boolean sametype[NUM_OBJECTS];
|
||||
int i, lo, hi, otyp = otmp->otyp, ocls = objects[otyp].oc_class;
|
||||
@@ -629,10 +629,10 @@ void
|
||||
set_artifact_intrinsic(struct obj *otmp, boolean on, long wp_mask)
|
||||
{
|
||||
long *mask = 0;
|
||||
register const struct artifact *art, *oart = get_artifact(otmp);
|
||||
register struct obj *obj;
|
||||
register uchar dtyp;
|
||||
register long spfx;
|
||||
const struct artifact *art, *oart = get_artifact(otmp);
|
||||
struct obj *obj;
|
||||
uchar dtyp;
|
||||
long spfx;
|
||||
|
||||
if (oart == &artilist[ART_NONARTIFACT])
|
||||
return;
|
||||
@@ -809,7 +809,7 @@ static boolean touch_blasted; /* for retouch_object() */
|
||||
int
|
||||
touch_artifact(struct obj *obj, struct monst *mon)
|
||||
{
|
||||
register const struct artifact *oart = get_artifact(obj);
|
||||
const struct artifact *oart = get_artifact(obj);
|
||||
boolean badclass, badalign, self_willed, yours;
|
||||
|
||||
touch_blasted = FALSE;
|
||||
@@ -880,7 +880,7 @@ touch_artifact(struct obj *obj, struct monst *mon)
|
||||
boolean
|
||||
arti_immune(struct obj *obj, int dtyp)
|
||||
{
|
||||
register const struct artifact *weap = get_artifact(obj);
|
||||
const struct artifact *weap = get_artifact(obj);
|
||||
|
||||
if (weap == &artilist[ART_NONARTIFACT])
|
||||
return FALSE;
|
||||
@@ -992,7 +992,7 @@ spec_abon(struct obj *otmp, struct monst *mon)
|
||||
int
|
||||
spec_dbon(struct obj *otmp, struct monst *mon, int tmp)
|
||||
{
|
||||
register const struct artifact *weap = get_artifact(otmp);
|
||||
const struct artifact *weap = get_artifact(otmp);
|
||||
|
||||
if ((weap == &artilist[ART_NONARTIFACT])
|
||||
|| (weap->attk.adtyp == AD_PHYS /* check for `NO_ATTK' */
|
||||
@@ -1665,7 +1665,7 @@ doinvoke(void)
|
||||
static int
|
||||
arti_invoke(struct obj *obj)
|
||||
{
|
||||
register const struct artifact *oart = get_artifact(obj);
|
||||
const struct artifact *oart = get_artifact(obj);
|
||||
if (!obj) {
|
||||
impossible("arti_invoke without obj");
|
||||
return ECMD_OK;
|
||||
|
||||
+6
-6
@@ -406,8 +406,8 @@ change_luck(schar n)
|
||||
int
|
||||
stone_luck(boolean parameter) /* So I can't think up of a good name. So sue me. --KAA */
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register long bonchance = 0;
|
||||
struct obj *otmp;
|
||||
long bonchance = 0;
|
||||
|
||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj)
|
||||
if (confers_luck(otmp)) {
|
||||
@@ -706,7 +706,7 @@ init_attr_role_redist(int np, boolean addition)
|
||||
void
|
||||
init_attr(int np)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < A_MAX; i++) {
|
||||
ABASE(i) = AMAX(i) = gu.urole.attrbase[i];
|
||||
@@ -723,7 +723,7 @@ init_attr(int np)
|
||||
void
|
||||
redist_attr(void)
|
||||
{
|
||||
register int i, tmp;
|
||||
int i, tmp;
|
||||
|
||||
for (i = 0; i < A_MAX; i++) {
|
||||
if (i == A_INT || i == A_WIS)
|
||||
@@ -751,7 +751,7 @@ vary_init_attr(void)
|
||||
|
||||
for (i = 0; i < A_MAX; i++)
|
||||
if (!rn2(20)) {
|
||||
register int xd = rn2(7) - 2; /* biased variation */
|
||||
int xd = rn2(7) - 2; /* biased variation */
|
||||
|
||||
(void) adjattrib(i, xd, TRUE);
|
||||
if (ABASE(i) < AMAX(i))
|
||||
@@ -987,7 +987,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
void
|
||||
adjabil(int oldlevel, int newlevel)
|
||||
{
|
||||
register const struct innate *abil, *rabil;
|
||||
const struct innate *abil, *rabil;
|
||||
long prevabil, mask = FROMEXPER;
|
||||
|
||||
abil = role_abil(Role_switch);
|
||||
|
||||
+2
-2
@@ -353,7 +353,7 @@ fixuporacle(struct monst *oracle)
|
||||
boolean
|
||||
can_make_bones(void)
|
||||
{
|
||||
register struct trap *ttmp;
|
||||
struct trap *ttmp;
|
||||
|
||||
if (!flags.bones)
|
||||
return FALSE;
|
||||
@@ -665,7 +665,7 @@ getbones(void)
|
||||
}
|
||||
trickery(errbuf);
|
||||
} else {
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
getlev(nhfp, 0, 0);
|
||||
|
||||
|
||||
+6
-6
@@ -50,8 +50,8 @@ char *
|
||||
do_statusline1(void)
|
||||
{
|
||||
static char newbot1[BUFSZ];
|
||||
register char *nb;
|
||||
register int i, j;
|
||||
char *nb;
|
||||
int i, j;
|
||||
|
||||
if (suppress_map_output())
|
||||
return strcpy(newbot1, "");
|
||||
@@ -107,7 +107,7 @@ do_statusline2(void)
|
||||
experience (HD if poly'd, else Exp level and maybe Exp points),
|
||||
time (in moves), varying number of status conditions */
|
||||
dloc[QBUFSZ], hlth[QBUFSZ], expr[QBUFSZ], tmmv[QBUFSZ], cond[QBUFSZ];
|
||||
register char *nb;
|
||||
char *nb;
|
||||
size_t dln, dx, hln, xln, tln, cln;
|
||||
int hp, hpmax, cap;
|
||||
long money;
|
||||
@@ -324,8 +324,8 @@ rank_to_xlev(int rank)
|
||||
const char *
|
||||
rank_of(int lev, short monnum, boolean female)
|
||||
{
|
||||
register const struct Role *role;
|
||||
register int i;
|
||||
const struct Role *role;
|
||||
int i;
|
||||
|
||||
/* Find the role */
|
||||
for (role = roles; role->name.m; role++)
|
||||
@@ -727,7 +727,7 @@ bot_via_windowport(void)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
const char *titl;
|
||||
register char *nb;
|
||||
char *nb;
|
||||
int i, idx, cap;
|
||||
long money;
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@ cmdq_clear(int q)
|
||||
char
|
||||
pgetchar(void) /* courtesy of aeb@cwi.nl */
|
||||
{
|
||||
register int ch = '\0';
|
||||
int ch = '\0';
|
||||
|
||||
if (iflags.debug_fuzzer)
|
||||
return randomkey();
|
||||
@@ -579,7 +579,7 @@ doc_extcmd_flagstr(
|
||||
int
|
||||
doextlist(void)
|
||||
{
|
||||
register const struct ext_func_tab *efp = (struct ext_func_tab *) 0;
|
||||
const struct ext_func_tab *efp = (struct ext_func_tab *) 0;
|
||||
char buf[BUFSZ], searchbuf[BUFSZ], descbuf[BUFSZ], promptbuf[QBUFSZ];
|
||||
const char *cmd_desc;
|
||||
winid menuwin;
|
||||
@@ -4552,7 +4552,7 @@ void
|
||||
parseautocomplete(char *autocomplete, boolean condition)
|
||||
{
|
||||
struct ext_func_tab *efp;
|
||||
register char *autoc;
|
||||
char *autoc;
|
||||
|
||||
/* break off first autocomplete from the rest; parse the rest */
|
||||
if ((autoc = strchr(autocomplete, ',')) != 0
|
||||
@@ -4932,7 +4932,7 @@ rhack(int key)
|
||||
/* handle most movement commands */
|
||||
gc.context.travel = gc.context.travel1 = 0;
|
||||
{
|
||||
register const struct ext_func_tab *tlist;
|
||||
const struct ext_func_tab *tlist;
|
||||
int res, (*func)(void);
|
||||
|
||||
do_cmdq_extcmd:
|
||||
@@ -5097,7 +5097,7 @@ rhack(int key)
|
||||
coordxy
|
||||
xytod(coordxy x, coordxy y)
|
||||
{
|
||||
register int dd;
|
||||
int dd;
|
||||
|
||||
for (dd = 0; dd < N_DIRS; dd++)
|
||||
if (x == xdir[dd] && y == ydir[dd])
|
||||
@@ -5549,7 +5549,7 @@ directionname(int dir)
|
||||
}
|
||||
|
||||
int
|
||||
isok(register coordxy x, register coordxy y)
|
||||
isok(coordxy x, coordxy y)
|
||||
{
|
||||
/* x corresponds to curx, so x==1 is the first column. Ach. %% */
|
||||
return x >= 1 && x <= COLNO - 1 && y >= 0 && y <= ROWNO - 1;
|
||||
@@ -6316,7 +6316,7 @@ get_count(
|
||||
static int
|
||||
parse(void)
|
||||
{
|
||||
register int foo;
|
||||
int foo;
|
||||
|
||||
iflags.in_parse = TRUE;
|
||||
gc.command_count = 0;
|
||||
@@ -6420,7 +6420,7 @@ end_of_input(void)
|
||||
static char
|
||||
readchar_core(coordxy *x, coordxy *y, int *mod)
|
||||
{
|
||||
register int sym;
|
||||
int sym;
|
||||
|
||||
if (iflags.debug_fuzzer) {
|
||||
sym = randomkey();
|
||||
@@ -6435,7 +6435,7 @@ readchar_core(coordxy *x, coordxy *y, int *mod)
|
||||
|
||||
#ifdef NR_OF_EOFS
|
||||
if (sym == EOF) {
|
||||
register int cnt = NR_OF_EOFS;
|
||||
int cnt = NR_OF_EOFS;
|
||||
/*
|
||||
* Some SYSV systems seem to return EOFs for various reasons
|
||||
* (?like when one hits break or for interrupted systemcalls?),
|
||||
|
||||
+3
-3
@@ -748,7 +748,7 @@ nokiller(void)
|
||||
void
|
||||
close_drawbridge(coordxy x, coordxy y)
|
||||
{
|
||||
register struct rm *lev1, *lev2;
|
||||
struct rm *lev1, *lev2;
|
||||
struct trap *t;
|
||||
coordxy x2, y2;
|
||||
|
||||
@@ -813,7 +813,7 @@ close_drawbridge(coordxy x, coordxy y)
|
||||
void
|
||||
open_drawbridge(coordxy x, coordxy y)
|
||||
{
|
||||
register struct rm *lev1, *lev2;
|
||||
struct rm *lev1, *lev2;
|
||||
struct trap *t;
|
||||
coordxy x2, y2;
|
||||
|
||||
@@ -861,7 +861,7 @@ open_drawbridge(coordxy x, coordxy y)
|
||||
void
|
||||
destroy_drawbridge(coordxy x, coordxy y)
|
||||
{
|
||||
register struct rm *lev1, *lev2;
|
||||
struct rm *lev1, *lev2;
|
||||
struct trap *t;
|
||||
struct obj *otmp;
|
||||
coordxy x2, y2;
|
||||
|
||||
+24
-24
@@ -185,7 +185,7 @@ trapped_door_at(int ttyp, coordxy x, coordxy y)
|
||||
struct obj *
|
||||
o_in(struct obj *obj, char oclass)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
struct obj *temp;
|
||||
|
||||
if (obj->oclass == oclass)
|
||||
@@ -213,7 +213,7 @@ o_in(struct obj *obj, char oclass)
|
||||
struct obj *
|
||||
o_material(struct obj *obj, unsigned material)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
struct obj *temp;
|
||||
|
||||
if (objects[obj->otyp].oc_material == material)
|
||||
@@ -247,8 +247,8 @@ static boolean
|
||||
check_map_spot(coordxy x, coordxy y, char oclass, unsigned material)
|
||||
{
|
||||
int glyph;
|
||||
register struct obj *otmp;
|
||||
register struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
glyph = glyph_at(x, y);
|
||||
if (glyph_is_object(glyph)) {
|
||||
@@ -300,7 +300,7 @@ check_map_spot(coordxy x, coordxy y, char oclass, unsigned material)
|
||||
static boolean
|
||||
clear_stale_map(char oclass, unsigned material)
|
||||
{
|
||||
register coordxy zx, zy;
|
||||
coordxy zx, zy;
|
||||
boolean change_made = FALSE;
|
||||
|
||||
for (zx = 1; zx < COLNO; zx++)
|
||||
@@ -317,8 +317,8 @@ clear_stale_map(char oclass, unsigned material)
|
||||
int
|
||||
gold_detect(struct obj *sobj)
|
||||
{
|
||||
register struct obj *obj;
|
||||
register struct monst *mtmp;
|
||||
struct obj *obj;
|
||||
struct monst *mtmp;
|
||||
struct obj gold, *temp = 0;
|
||||
boolean stale, ugold = FALSE, steedgold = FALSE;
|
||||
int ter_typ = TER_DETECT | TER_OBJ;
|
||||
@@ -461,9 +461,9 @@ gold_detect(struct obj *sobj)
|
||||
int
|
||||
food_detect(struct obj *sobj)
|
||||
{
|
||||
register struct obj *obj;
|
||||
register struct monst *mtmp;
|
||||
register int ct = 0, ctu = 0;
|
||||
struct obj *obj;
|
||||
struct monst *mtmp;
|
||||
int ct = 0, ctu = 0;
|
||||
boolean confused = (Confusion || (sobj && sobj->cursed)), stale;
|
||||
char oclass = confused ? POTION_CLASS : FOOD_CLASS;
|
||||
const char *what = confused ? something : "food";
|
||||
@@ -586,15 +586,15 @@ int
|
||||
object_detect(struct obj *detector, /* object doing the detecting */
|
||||
int class) /* an object class, 0 for all */
|
||||
{
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
char stuff[BUFSZ];
|
||||
int is_cursed = (detector && detector->cursed);
|
||||
int do_dknown = (detector && (detector->oclass == POTION_CLASS
|
||||
|| detector->oclass == SPBOOK_CLASS)
|
||||
&& detector->blessed);
|
||||
int ct = 0, ctu = 0;
|
||||
register struct obj *obj, *otmp = (struct obj *) 0;
|
||||
register struct monst *mtmp;
|
||||
struct obj *obj, *otmp = (struct obj *) 0;
|
||||
struct monst *mtmp;
|
||||
int sym, boulder = 0, ter_typ = TER_DETECT | TER_OBJ;
|
||||
|
||||
if (class < 0 || class >= MAXOCLASSES) {
|
||||
@@ -781,7 +781,7 @@ int
|
||||
monster_detect(struct obj *otmp, /* detecting object (if any) */
|
||||
int mclass) /* monster class, 0 for all */
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
int mcnt = 0;
|
||||
|
||||
/* Note: This used to just check fmon for a non-zero value
|
||||
@@ -976,7 +976,7 @@ int
|
||||
trap_detect(
|
||||
struct obj *sobj) /* Null if crystal ball, scroll if gold detection */
|
||||
{
|
||||
register struct trap *ttmp;
|
||||
struct trap *ttmp;
|
||||
struct monst *mon;
|
||||
int door, tr;
|
||||
int cursed_src = sobj && sobj->cursed;
|
||||
@@ -1381,7 +1381,7 @@ show_map_spot(coordxy x, coordxy y, boolean cnf)
|
||||
void
|
||||
do_mapping(void)
|
||||
{
|
||||
register int zx, zy;
|
||||
int zx, zy;
|
||||
boolean unconstrained;
|
||||
|
||||
unconstrained = unconstrain_map();
|
||||
@@ -1407,7 +1407,7 @@ do_mapping(void)
|
||||
void
|
||||
do_vicinity_map(struct obj *sobj) /* scroll--actually fake spellbook--object */
|
||||
{
|
||||
register int zx, zy;
|
||||
int zx, zy;
|
||||
struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
long save_EDetect_mons;
|
||||
@@ -1627,8 +1627,8 @@ findone(coordxy zx, coordxy zy, genericptr_t whatfound)
|
||||
static void
|
||||
openone(coordxy zx, coordxy zy, genericptr_t num)
|
||||
{
|
||||
register struct trap *ttmp;
|
||||
register struct obj *otmp;
|
||||
struct trap *ttmp;
|
||||
struct obj *otmp;
|
||||
int *num_p = (int *) num;
|
||||
|
||||
if (OBJ_AT(zx, zy)) {
|
||||
@@ -1886,8 +1886,8 @@ int
|
||||
dosearch0(int aflag) /* intrinsic autosearch vs explicit searching */
|
||||
{
|
||||
coordxy x, y;
|
||||
register struct trap *trap;
|
||||
register struct monst *mtmp;
|
||||
struct trap *trap;
|
||||
struct monst *mtmp;
|
||||
|
||||
if (u.uswallow) {
|
||||
if (!aflag)
|
||||
@@ -1992,9 +1992,9 @@ warnreveal(void)
|
||||
void
|
||||
premap_detect(void)
|
||||
{
|
||||
register coordxy x, y;
|
||||
register struct trap *ttmp;
|
||||
register struct obj *obj;
|
||||
coordxy x, y;
|
||||
struct trap *ttmp;
|
||||
struct obj *obj;
|
||||
|
||||
/* Map the background and boulders */
|
||||
for (x = 1; x < COLNO; x++)
|
||||
|
||||
@@ -28,7 +28,7 @@ enum dig_types {
|
||||
static boolean
|
||||
rm_waslit(void)
|
||||
{
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
|
||||
if (levl[u.ux][u.uy].typ == ROOM && levl[u.ux][u.uy].waslit)
|
||||
return TRUE;
|
||||
@@ -46,14 +46,14 @@ rm_waslit(void)
|
||||
static void
|
||||
mkcavepos(coordxy x, coordxy y, int dist, boolean waslit, boolean rockit)
|
||||
{
|
||||
register struct rm *lev;
|
||||
struct rm *lev;
|
||||
|
||||
if (!isok(x, y))
|
||||
return;
|
||||
lev = &levl[x][y];
|
||||
|
||||
if (rockit) {
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
if (IS_ROCK(lev->typ))
|
||||
return;
|
||||
@@ -89,8 +89,8 @@ mkcavearea(boolean rockit)
|
||||
int dist;
|
||||
coordxy xmin = u.ux, xmax = u.ux;
|
||||
coordxy ymin = u.uy, ymax = u.uy;
|
||||
register coordxy i;
|
||||
register boolean waslit = rm_waslit();
|
||||
coordxy i;
|
||||
boolean waslit = rm_waslit();
|
||||
|
||||
if (rockit) {
|
||||
Soundeffect(se_crashing_rock, 100);
|
||||
@@ -438,7 +438,7 @@ dig(void)
|
||||
pay_for_damage(dmgtxt, FALSE);
|
||||
|
||||
if (Is_earthlevel(&u.uz) && !rn2(3)) {
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
switch (rn2(2)) {
|
||||
case 0:
|
||||
@@ -799,7 +799,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
boolean
|
||||
dighole(boolean pit_only, boolean by_magic, coord *cc)
|
||||
{
|
||||
register struct trap *ttmp;
|
||||
struct trap *ttmp;
|
||||
struct rm *lev;
|
||||
struct obj *boulder_here;
|
||||
schar typ, old_typ;
|
||||
@@ -1071,7 +1071,7 @@ int
|
||||
use_pick_axe2(struct obj *obj)
|
||||
{
|
||||
coordxy rx, ry;
|
||||
register struct rm *lev;
|
||||
struct rm *lev;
|
||||
struct trap *trap, *trap_with_u;
|
||||
int dig_target;
|
||||
boolean ispick = is_pick(obj);
|
||||
@@ -1306,7 +1306,7 @@ watch_dig(struct monst *mtmp, coordxy x, coordxy y, boolean zap)
|
||||
boolean
|
||||
mdig_tunnel(struct monst *mtmp)
|
||||
{
|
||||
register struct rm *here;
|
||||
struct rm *here;
|
||||
boolean sawit, seeit, trapped;
|
||||
int pile = rnd(12);
|
||||
|
||||
|
||||
+28
-28
@@ -275,9 +275,9 @@ magic_map_background(coordxy x, coordxy y, int show)
|
||||
* the hero can physically see the location. Update the screen if directed.
|
||||
*/
|
||||
void
|
||||
map_background(register coordxy x, register coordxy y, register int show)
|
||||
map_background(coordxy x, coordxy y, int show)
|
||||
{
|
||||
register int glyph = back_to_glyph(x, y);
|
||||
int glyph = back_to_glyph(x, y);
|
||||
|
||||
if (gl.level.flags.hero_memory)
|
||||
levl[x][y].glyph = glyph;
|
||||
@@ -292,10 +292,10 @@ map_background(register coordxy x, register coordxy y, register int show)
|
||||
* hero can physically see the location.
|
||||
*/
|
||||
void
|
||||
map_trap(register struct trap *trap, register int show)
|
||||
map_trap(struct trap *trap, int show)
|
||||
{
|
||||
register coordxy x = trap->tx, y = trap->ty;
|
||||
register int glyph = trap_to_glyph(trap);
|
||||
coordxy x = trap->tx, y = trap->ty;
|
||||
int glyph = trap_to_glyph(trap);
|
||||
|
||||
if (gl.level.flags.hero_memory)
|
||||
levl[x][y].glyph = glyph;
|
||||
@@ -309,7 +309,7 @@ map_trap(register struct trap *trap, register int show)
|
||||
* Map the engraving and print it out if directed.
|
||||
*/
|
||||
void
|
||||
map_engraving(struct engr *ep, register int show)
|
||||
map_engraving(struct engr *ep, int show)
|
||||
{
|
||||
coordxy x = ep->engr_x, y = ep->engr_y;
|
||||
int glyph = engraving_to_glyph(ep);
|
||||
@@ -329,10 +329,10 @@ map_engraving(struct engr *ep, register int show)
|
||||
* the claim here that the hero can see obj's <ox,oy>.]
|
||||
*/
|
||||
void
|
||||
map_object(register struct obj *obj, int show)
|
||||
map_object(struct obj *obj, int show)
|
||||
{
|
||||
register coordxy x = obj->ox, y = obj->oy;
|
||||
register int glyph = obj_to_glyph(obj, newsym_rn2);
|
||||
coordxy x = obj->ox, y = obj->oy;
|
||||
int glyph = obj_to_glyph(obj, newsym_rn2);
|
||||
|
||||
/* if this object is already displayed as a generic object, it might
|
||||
become a specific one now */
|
||||
@@ -374,7 +374,7 @@ map_object(register struct obj *obj, int show)
|
||||
* by newsym() if necessary.
|
||||
*/
|
||||
void
|
||||
map_invisible(register coordxy x, register coordxy y)
|
||||
map_invisible(coordxy x, coordxy y)
|
||||
{
|
||||
if (x != u.ux || y != u.uy) { /* don't display I at hero's location */
|
||||
if (gl.level.flags.hero_memory)
|
||||
@@ -405,9 +405,9 @@ unmap_invisible(coordxy x, coordxy y)
|
||||
* invisible monster notation, we might have to call newsym().
|
||||
*/
|
||||
void
|
||||
unmap_object(register coordxy x, register coordxy y)
|
||||
unmap_object(coordxy x, coordxy y)
|
||||
{
|
||||
register struct trap *trap;
|
||||
struct trap *trap;
|
||||
struct engr *ep;
|
||||
|
||||
if (!gl.level.flags.hero_memory)
|
||||
@@ -443,8 +443,8 @@ unmap_object(register coordxy x, register coordxy y)
|
||||
*/
|
||||
#define _map_location(x, y, show) \
|
||||
{ \
|
||||
register struct obj *obj; \
|
||||
register struct trap *trap; \
|
||||
struct obj *obj; \
|
||||
struct trap *trap; \
|
||||
struct engr *ep; \
|
||||
\
|
||||
if ((obj = vobj_at(x, y)) && !covers_objects(x, y)) \
|
||||
@@ -715,7 +715,7 @@ feel_location(coordxy x, coordxy y)
|
||||
{
|
||||
struct rm *lev;
|
||||
struct obj *boulder;
|
||||
register struct monst *mon;
|
||||
struct monst *mon;
|
||||
|
||||
/* replicate safeguards used by newsym(); might not be required here */
|
||||
if (suppress_map_output())
|
||||
@@ -884,7 +884,7 @@ newsym(coordxy x, coordxy y)
|
||||
struct monst *mon;
|
||||
int see_it;
|
||||
boolean worm_tail;
|
||||
register struct rm *lev = &(levl[x][y]);
|
||||
struct rm *lev = &(levl[x][y]);
|
||||
|
||||
/* don't try to produce map output when level is in a state of flux */
|
||||
if (suppress_map_output())
|
||||
@@ -1058,7 +1058,7 @@ newsym(coordxy x, coordxy y)
|
||||
void
|
||||
shieldeff(coordxy x, coordxy y)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
if (!flags.sparkle)
|
||||
return;
|
||||
@@ -1164,7 +1164,7 @@ tmp_at(coordxy x, coordxy y)
|
||||
|
||||
case DISP_END:
|
||||
if (tglyph->style == DISP_BEAM || tglyph->style == DISP_ALL) {
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/* Erase (reset) from source to end */
|
||||
for (i = 0; i < tglyph->sidx; i++)
|
||||
@@ -1433,7 +1433,7 @@ under_ground(int mode)
|
||||
void
|
||||
see_monsters(void)
|
||||
{
|
||||
register struct monst *mon;
|
||||
struct monst *mon;
|
||||
int new_warn_obj_cnt = 0;
|
||||
|
||||
if (gd.defer_see_monsters)
|
||||
@@ -1502,7 +1502,7 @@ set_mimic_blocking(void)
|
||||
void
|
||||
see_objects(void)
|
||||
{
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
|
||||
for (obj = fobj; obj; obj = obj->nobj)
|
||||
if (vobj_at(obj->ox, obj->oy) == obj)
|
||||
@@ -1646,7 +1646,7 @@ void
|
||||
docrt_flags(int refresh_flags)
|
||||
{
|
||||
coordxy x, y;
|
||||
register struct rm *lev;
|
||||
struct rm *lev;
|
||||
boolean maponly = (refresh_flags & docrtMapOnly) != 0,
|
||||
redrawonly = (refresh_flags & docrtRefresh) != 0,
|
||||
nocls = (refresh_flags & docrtNocls) != 0;
|
||||
@@ -1995,7 +1995,7 @@ static gbuf_entry nul_gbuf = {
|
||||
void
|
||||
clear_glyph_buffer(void)
|
||||
{
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
gbuf_entry *gptr = &gg.gbuf[0][0];
|
||||
glyph_info *giptr =
|
||||
#ifndef UNBUFFERED_GLYPHINFO
|
||||
@@ -2032,9 +2032,9 @@ clear_glyph_buffer(void)
|
||||
void
|
||||
row_refresh(coordxy start, coordxy stop, coordxy y)
|
||||
{
|
||||
register coordxy x;
|
||||
coordxy x;
|
||||
int glyph;
|
||||
register boolean force;
|
||||
boolean force;
|
||||
gbuf_entry *gptr = &gg.gbuf[0][0];
|
||||
glyph_info bkglyphinfo = nul_glyphinfo;
|
||||
glyph_info *giptr =
|
||||
@@ -2096,7 +2096,7 @@ flush_screen(int cursor_on_u)
|
||||
*/
|
||||
static int flushing = 0;
|
||||
static int delay_flushing = 0;
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
glyph_info bkglyphinfo = nul_glyphinfo;
|
||||
int bkglyph;
|
||||
|
||||
@@ -2123,7 +2123,7 @@ flush_screen(int cursor_on_u)
|
||||
timebot();
|
||||
|
||||
for (y = 0; y < ROWNO; y++) {
|
||||
register gbuf_entry *gptr = &gg.gbuf[y][x = gg.gbuf_start[y]];
|
||||
gbuf_entry *gptr = &gg.gbuf[y][x = gg.gbuf_start[y]];
|
||||
|
||||
for (; x <= gg.gbuf_stop[y]; gptr++, x++) {
|
||||
get_bkglyph_and_framecolor(x, y, &bkglyph, &bkglyphinfo.framecolor);
|
||||
@@ -2620,7 +2620,7 @@ void
|
||||
reset_glyphmap(enum glyphmap_change_triggers trigger)
|
||||
{
|
||||
int glyph;
|
||||
register int offset;
|
||||
int offset;
|
||||
int color = NO_COLOR;
|
||||
|
||||
/* condense multiple tests in macro version down to single */
|
||||
@@ -3386,7 +3386,7 @@ t_warn(struct rm *lev)
|
||||
static int
|
||||
wall_angle(struct rm *lev)
|
||||
{
|
||||
register unsigned int seenv = lev->seenv & 0xff;
|
||||
unsigned int seenv = lev->seenv & 0xff;
|
||||
const int *row;
|
||||
int col, idx;
|
||||
|
||||
|
||||
@@ -1368,7 +1368,7 @@ save_currentstate(void)
|
||||
|
||||
/*
|
||||
static boolean
|
||||
badspot(register coordxy x, register coordxy y)
|
||||
badspot(coordxy x, coordxy y)
|
||||
{
|
||||
return (boolean) ((levl[x][y].typ != ROOM
|
||||
&& levl[x][y].typ != AIR
|
||||
@@ -1693,7 +1693,7 @@ goto_level(
|
||||
|
||||
if (portal && !In_endgame(&u.uz)) {
|
||||
/* find the portal on the new level */
|
||||
register struct trap *ttrap;
|
||||
struct trap *ttrap;
|
||||
|
||||
for (ttrap = gf.ftrap; ttrap; ttrap = ttrap->ntrap)
|
||||
if (ttrap->ttyp == MAGIC_PORTAL)
|
||||
|
||||
+2
-2
@@ -2186,7 +2186,7 @@ some_mon_nam(struct monst *mtmp)
|
||||
char *
|
||||
Monnam(struct monst *mtmp)
|
||||
{
|
||||
register char *bp = mon_nam(mtmp);
|
||||
char *bp = mon_nam(mtmp);
|
||||
|
||||
*bp = highc(*bp);
|
||||
return bp;
|
||||
@@ -2195,7 +2195,7 @@ Monnam(struct monst *mtmp)
|
||||
char *
|
||||
noit_Monnam(struct monst *mtmp)
|
||||
{
|
||||
register char *bp = noit_mon_nam(mtmp);
|
||||
char *bp = noit_mon_nam(mtmp);
|
||||
|
||||
*bp = highc(*bp);
|
||||
return bp;
|
||||
|
||||
+7
-7
@@ -1247,7 +1247,7 @@ Ring_on(struct obj *obj)
|
||||
}
|
||||
|
||||
static void
|
||||
Ring_off_or_gone(register struct obj *obj, boolean gone)
|
||||
Ring_off_or_gone(struct obj *obj, boolean gone)
|
||||
{
|
||||
long mask = (obj->owornmask & W_RING);
|
||||
boolean observable;
|
||||
@@ -2411,7 +2411,7 @@ find_ac(void)
|
||||
void
|
||||
glibr(void)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
int xfl = 0;
|
||||
boolean leftfall, rightfall, wastwoweap = FALSE;
|
||||
const char *otherwep = 0, *thiswep, *which, *hand;
|
||||
@@ -2513,7 +2513,7 @@ glibr(void)
|
||||
struct obj *
|
||||
some_armor(struct monst *victim)
|
||||
{
|
||||
register struct obj *otmph, *otmp;
|
||||
struct obj *otmph, *otmp;
|
||||
|
||||
otmph = (victim == &gy.youmonst) ? uarmc : which_armor(victim, W_ARMC);
|
||||
if (!otmph)
|
||||
@@ -2577,7 +2577,7 @@ unchanger(void)
|
||||
|
||||
static
|
||||
int
|
||||
select_off(register struct obj *otmp)
|
||||
select_off(struct obj *otmp)
|
||||
{
|
||||
struct obj *why;
|
||||
char buf[BUFSZ];
|
||||
@@ -2781,8 +2781,8 @@ do_takeoff(void)
|
||||
static int
|
||||
take_off(void)
|
||||
{
|
||||
register int i;
|
||||
register struct obj *otmp;
|
||||
int i;
|
||||
struct obj *otmp;
|
||||
struct takeoff_info *doff = &gc.context.takeoff;
|
||||
|
||||
if (doff->what) {
|
||||
@@ -3113,7 +3113,7 @@ destroy_arm(struct obj *atmp)
|
||||
}
|
||||
|
||||
void
|
||||
adj_abon(register struct obj *otmp, register schar delta)
|
||||
adj_abon(struct obj *otmp, schar delta)
|
||||
{
|
||||
if (uarmg && uarmg == otmp && otmp->otyp == GAUNTLETS_OF_DEXTERITY) {
|
||||
if (delta) {
|
||||
|
||||
@@ -189,8 +189,8 @@ make_familiar(struct obj *otmp, coordxy x, coordxy y, boolean quietly)
|
||||
struct monst *
|
||||
makedog(void)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
register struct obj *otmp;
|
||||
struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
const char *petname;
|
||||
int pettype;
|
||||
|
||||
@@ -255,7 +255,7 @@ static struct monst *failed_arrivals = 0;
|
||||
void
|
||||
losedogs(void)
|
||||
{
|
||||
register struct monst *mtmp, **mprev;
|
||||
struct monst *mtmp, **mprev;
|
||||
int dismissKops = 0, xyloc;
|
||||
|
||||
failed_arrivals = 0;
|
||||
@@ -731,7 +731,7 @@ void
|
||||
keepdogs(
|
||||
boolean pets_only) /* true for ascension or final escape */
|
||||
{
|
||||
register struct monst *mtmp, *mtmp2;
|
||||
struct monst *mtmp, *mtmp2;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp2) {
|
||||
mtmp2 = mtmp->nmon;
|
||||
|
||||
+8
-8
@@ -217,7 +217,7 @@ dog_eat(struct monst *mtmp,
|
||||
coordxy y, /* might be different from current */
|
||||
boolean devour)
|
||||
{
|
||||
register struct edog *edog = EDOG(mtmp);
|
||||
struct edog *edog = EDOG(mtmp);
|
||||
int nutrit, res;
|
||||
long oprice;
|
||||
char objnambuf[BUFSZ], *obj_name;
|
||||
@@ -461,13 +461,13 @@ dog_invent(struct monst *mtmp, struct edog *edog, int udist)
|
||||
returns -1/0/1 (dog's desire to approach player) or -2 (abort move) */
|
||||
static int
|
||||
dog_goal(
|
||||
register struct monst *mtmp,
|
||||
struct monst *mtmp,
|
||||
struct edog *edog,
|
||||
int after, int udist, int whappr)
|
||||
{
|
||||
register coordxy omx, omy;
|
||||
coordxy omx, omy;
|
||||
boolean in_masters_sight, dog_has_minvent;
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
xint16 otyp;
|
||||
int appr;
|
||||
|
||||
@@ -589,7 +589,7 @@ dog_goal(
|
||||
|
||||
#define FARAWAY (COLNO + 2) /* position outside screen */
|
||||
if (u_at(gg.gx, gg.gy) && !in_masters_sight) {
|
||||
register coord *cp;
|
||||
coord *cp;
|
||||
|
||||
cp = gettrack(omx, omy);
|
||||
if (cp) {
|
||||
@@ -628,7 +628,7 @@ dog_goal(
|
||||
|
||||
static struct monst *
|
||||
find_targ(
|
||||
register struct monst *mtmp,
|
||||
struct monst *mtmp,
|
||||
int dx, int dy,
|
||||
int maxdist)
|
||||
{
|
||||
@@ -1079,7 +1079,7 @@ dog_move(
|
||||
|
||||
if ((info[i] & ALLOW_M) && MON_AT(nx, ny)) {
|
||||
int mstatus;
|
||||
register struct monst *mtmp2 = m_at(nx, ny);
|
||||
struct monst *mtmp2 = m_at(nx, ny);
|
||||
/* weight the audacity of the pet to attack a differently-leveled
|
||||
* foe based on its fraction of max HP:
|
||||
* 100%: up to level + 2
|
||||
@@ -1137,7 +1137,7 @@ dog_move(
|
||||
if ((info[i] & ALLOW_MDISP) && MON_AT(nx, ny)
|
||||
&& better_with_displacing && !undesirable_disp(mtmp, nx, ny)) {
|
||||
int mstatus;
|
||||
register struct monst *mtmp2 = m_at(nx, ny);
|
||||
struct monst *mtmp2 = m_at(nx, ny);
|
||||
|
||||
mstatus = mdisplacem(mtmp, mtmp2, FALSE); /* displace monster */
|
||||
if (mstatus & M_ATTK_DEF_DIED)
|
||||
|
||||
+7
-7
@@ -291,7 +291,7 @@ kick_monster(struct monst *mon, coordxy x, coordxy y)
|
||||
* The gold object is *not* attached to the fobj chain!
|
||||
*/
|
||||
boolean
|
||||
ghitm(register struct monst *mtmp, register struct obj *gold)
|
||||
ghitm(struct monst *mtmp, struct obj *gold)
|
||||
{
|
||||
boolean msg_given = FALSE;
|
||||
|
||||
@@ -1002,7 +1002,7 @@ kick_nondoor(coordxy x, coordxy y, int avrg_attrib)
|
||||
}
|
||||
}
|
||||
if (IS_THRONE(gm.maploc->typ)) {
|
||||
register int i;
|
||||
int i;
|
||||
if (Levitation) {
|
||||
kick_dumb(x, y);
|
||||
return ECMD_TIME;
|
||||
@@ -1247,7 +1247,7 @@ dokick(void)
|
||||
coordxy x, y;
|
||||
int avrg_attrib;
|
||||
int glyph, oldglyph = -1;
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
boolean no_kick = FALSE;
|
||||
|
||||
if (nolimbs(gy.youmonst.data) || slithy(gy.youmonst.data)) {
|
||||
@@ -1499,8 +1499,8 @@ impact_drop(
|
||||
xint16 dlev) /* if !0 send to dlev near player */
|
||||
{
|
||||
schar toloc;
|
||||
register struct obj *obj, *obj2;
|
||||
register struct monst *shkp;
|
||||
struct obj *obj, *obj2;
|
||||
struct monst *shkp;
|
||||
long oct, dct, price, debit, robbed;
|
||||
boolean angry, costly, isrock;
|
||||
coord cc;
|
||||
@@ -1753,7 +1753,7 @@ ship_object(struct obj *otmp, coordxy x, coordxy y, boolean shop_floor_obj)
|
||||
void
|
||||
obj_delivery(boolean near_hero)
|
||||
{
|
||||
register struct obj *otmp, *otmp2;
|
||||
struct obj *otmp, *otmp2;
|
||||
int nx = 0, ny = 0;
|
||||
int where;
|
||||
boolean nobreak, noscatter;
|
||||
@@ -1890,7 +1890,7 @@ deliver_obj_to_mon(struct monst *mtmp, int cnt, unsigned long deliverflags)
|
||||
}
|
||||
|
||||
static void
|
||||
otransit_msg(register struct obj *otmp, boolean nodrop, boolean chainthere, long num)
|
||||
otransit_msg(struct obj *otmp, boolean nodrop, boolean chainthere, long num)
|
||||
{
|
||||
char *optr = 0, obuf[BUFSZ], xbuf[BUFSZ];
|
||||
|
||||
|
||||
+6
-6
@@ -345,7 +345,7 @@ throw_ok(struct obj *obj)
|
||||
int
|
||||
dothrow(void)
|
||||
{
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
int shotlimit;
|
||||
|
||||
/*
|
||||
@@ -1460,7 +1460,7 @@ throwit(struct obj *obj,
|
||||
* wielded weapon returns */
|
||||
struct obj *oldslot) /* for thrown-and-return used with !fixinv */
|
||||
{
|
||||
register struct monst *mon;
|
||||
struct monst *mon;
|
||||
int range, urange;
|
||||
boolean crossbowing, clear_thrownobj = FALSE,
|
||||
impaired = (Confusion || Stunned || Blind
|
||||
@@ -1969,8 +1969,8 @@ thitmonst(
|
||||
struct monst *mon,
|
||||
struct obj *obj) /* gt.thrownobj or gk.kickedobj or uwep */
|
||||
{
|
||||
register int tmp; /* Base chance to hit */
|
||||
register int disttmp; /* distance modifier */
|
||||
int tmp; /* Base chance to hit */
|
||||
int disttmp; /* distance modifier */
|
||||
int otyp = obj->otyp, hmode;
|
||||
boolean guaranteed_hit = engulfing_u(mon);
|
||||
int dieroll;
|
||||
@@ -2262,7 +2262,7 @@ thitmonst(
|
||||
#undef special_obj_hits_leader
|
||||
|
||||
static int
|
||||
gem_accept(register struct monst *mon, register struct obj *obj)
|
||||
gem_accept(struct monst *mon, struct obj *obj)
|
||||
{
|
||||
static NEARDATA const char
|
||||
nogood[] = " is not interested in your junk.",
|
||||
@@ -2605,7 +2605,7 @@ static int
|
||||
throw_gold(struct obj *obj)
|
||||
{
|
||||
int range, odx, ody;
|
||||
register struct monst *mon;
|
||||
struct monst *mon;
|
||||
|
||||
if (!u.dx && !u.dy && !u.dz) {
|
||||
You("cannot throw gold at yourself.");
|
||||
|
||||
+2
-2
@@ -1201,7 +1201,7 @@ void
|
||||
init_dungeons(void)
|
||||
{
|
||||
lua_State *L;
|
||||
register int i, cl = 0;
|
||||
int i, cl = 0;
|
||||
struct proto_dungeon pd;
|
||||
int tidx;
|
||||
nhl_sandbox_info sbi = {NHL_SB_SAFE, 1*1024*1024, 0, 1*1024*1024};
|
||||
@@ -1349,7 +1349,7 @@ deepest_lev_reached(boolean noquest)
|
||||
* calculation. _However_ the Quest is a difficult dungeon, so we
|
||||
* include it in the factor of difficulty calculations.
|
||||
*/
|
||||
register int i;
|
||||
int i;
|
||||
d_level tmp;
|
||||
xint16 ret = 0;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ static int getobj_else = 0;
|
||||
* polymorphed character. Not used for monster checks.
|
||||
*/
|
||||
boolean
|
||||
is_edible(register struct obj *obj)
|
||||
is_edible(struct obj *obj)
|
||||
{
|
||||
/* protect invocation tools but not Rider corpses (handled elsewhere)*/
|
||||
/* if (obj->oclass != FOOD_CLASS && obj_resists(obj, 0, 0)) */
|
||||
@@ -772,7 +772,7 @@ maybe_cannibal(int pm, boolean allowmsg)
|
||||
}
|
||||
|
||||
static void
|
||||
cprefx(register int pm)
|
||||
cprefx(int pm)
|
||||
{
|
||||
(void) maybe_cannibal(pm, TRUE);
|
||||
if (flesh_petrifies(&mons[pm])) {
|
||||
@@ -979,7 +979,7 @@ temp_givit(int type, struct permonst *ptr)
|
||||
* and what type of intrinsic it is trying to give you.
|
||||
*/
|
||||
static void
|
||||
givit(int type, register struct permonst *ptr)
|
||||
givit(int type, struct permonst *ptr)
|
||||
{
|
||||
debugpline1("Attempting to give intrinsic %d", type);
|
||||
|
||||
@@ -1642,7 +1642,7 @@ static void
|
||||
start_tin(struct obj *otmp)
|
||||
{
|
||||
const char *mesg = 0;
|
||||
register int tmp;
|
||||
int tmp;
|
||||
|
||||
if (metallivorous(gy.youmonst.data)) {
|
||||
mesg = "You bite right into the metal tin...";
|
||||
@@ -3465,7 +3465,7 @@ floorfood(
|
||||
const char *verb,
|
||||
int corpsecheck) /* 0, no check, 1, corpses, 2, tinnable corpses */
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
char qbuf[QBUFSZ];
|
||||
char c;
|
||||
struct permonst *uptr = gy.youmonst.data;
|
||||
|
||||
@@ -1438,8 +1438,8 @@ savelife(int how)
|
||||
static void
|
||||
get_valuables(struct obj *list) /* inventory or container contents */
|
||||
{
|
||||
register struct obj *obj;
|
||||
register int i;
|
||||
struct obj *obj;
|
||||
int i;
|
||||
|
||||
/* find amulets and gems, ignoring all artifacts */
|
||||
for (obj = list; obj; obj = obj->nobj)
|
||||
@@ -1475,7 +1475,7 @@ sort_valuables(
|
||||
struct valuable_data list[],
|
||||
int size) /* max value is less than 20 */
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
struct valuable_data ltmp;
|
||||
|
||||
/* move greater quantities to the front of the list */
|
||||
@@ -2094,8 +2094,8 @@ really_done(int how)
|
||||
if (how == ESCAPED || how == ASCENDED) {
|
||||
struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
register struct val_list *val;
|
||||
register int i;
|
||||
struct val_list *val;
|
||||
int i;
|
||||
|
||||
for (val = gv.valuables; val->list; val++)
|
||||
for (i = 0; i < val->size; i++) {
|
||||
@@ -2263,7 +2263,7 @@ container_contents(
|
||||
boolean all_containers,
|
||||
boolean reportempty)
|
||||
{
|
||||
register struct obj *box, *obj;
|
||||
struct obj *box, *obj;
|
||||
char buf[BUFSZ];
|
||||
boolean cat, dumping = iflags.in_dumplog;
|
||||
|
||||
|
||||
+1
-1
@@ -266,7 +266,7 @@ u_wipe_engr(int cnt)
|
||||
void
|
||||
wipe_engr_at(coordxy x, coordxy y, xint16 cnt, boolean magical)
|
||||
{
|
||||
register struct engr *ep = engr_at(x, y);
|
||||
struct engr *ep = engr_at(x, y);
|
||||
|
||||
/* Headstones and some specially marked engravings are indelible */
|
||||
if (ep && ep->engr_type != HEADSTONE && !ep->nowipeout) {
|
||||
|
||||
+3
-3
@@ -82,9 +82,9 @@ newpw(void)
|
||||
|
||||
/* return # of exp points for mtmp after nk killed */
|
||||
int
|
||||
experience(register struct monst *mtmp, register int nk)
|
||||
experience(struct monst *mtmp, int nk)
|
||||
{
|
||||
register struct permonst *ptr = mtmp->data;
|
||||
struct permonst *ptr = mtmp->data;
|
||||
int i, tmp, tmp2;
|
||||
|
||||
tmp = 1 + mtmp->m_lev * mtmp->m_lev;
|
||||
@@ -166,7 +166,7 @@ experience(register struct monst *mtmp, register int nk)
|
||||
}
|
||||
|
||||
void
|
||||
more_experienced(register int exper, register int rexp)
|
||||
more_experienced(int exper, int rexp)
|
||||
{
|
||||
long oldexp = u.uexp,
|
||||
oldrexp = u.urexp,
|
||||
|
||||
+2
-2
@@ -724,8 +724,8 @@ scatter(coordxy sx, coordxy sy, /* location of objects to scatter */
|
||||
unsigned int scflags,
|
||||
struct obj *obj) /* only scatter this obj */
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register int tmp;
|
||||
struct obj *otmp;
|
||||
int tmp;
|
||||
int farthest = 0;
|
||||
uchar typ;
|
||||
long qtmp;
|
||||
|
||||
+5
-5
@@ -21,7 +21,7 @@ static
|
||||
void
|
||||
roguejoin(coordxy x1, coordxy y1, coordxy x2, coordxy y2, int horiz)
|
||||
{
|
||||
register coordxy x, y, middle;
|
||||
coordxy x, y, middle;
|
||||
|
||||
if (horiz) {
|
||||
middle = x1 + rn2(x2 - x1 + 1);
|
||||
@@ -46,7 +46,7 @@ static
|
||||
void
|
||||
roguecorr(coordxy x, coordxy y, int dir)
|
||||
{
|
||||
register coordxy fromx, fromy, tox, toy;
|
||||
coordxy fromx, fromy, tox, toy;
|
||||
|
||||
if (dir == XL_DOWN) {
|
||||
gr.r[x][y].doortable &= ~XL_DOWN;
|
||||
@@ -141,7 +141,7 @@ static
|
||||
void
|
||||
miniwalk(coordxy x, coordxy y)
|
||||
{
|
||||
register int q, dir;
|
||||
int q, dir;
|
||||
int dirs[4];
|
||||
|
||||
while (1) {
|
||||
@@ -195,7 +195,7 @@ miniwalk(coordxy x, coordxy y)
|
||||
void
|
||||
makeroguerooms(void)
|
||||
{
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
/* Rogue levels are structured 3 by 3, with each section containing
|
||||
* a room or an intersection. The minimum width is 2 each way.
|
||||
* One difference between these and "real" Rogue levels: real Rogue
|
||||
@@ -290,7 +290,7 @@ corr(coordxy x, coordxy y)
|
||||
void
|
||||
makerogueghost(void)
|
||||
{
|
||||
register struct monst *ghost;
|
||||
struct monst *ghost;
|
||||
struct obj *ghostobj;
|
||||
struct mkroom *croom;
|
||||
coordxy x, y;
|
||||
|
||||
+8
-8
@@ -37,7 +37,7 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
static void
|
||||
dowatersnakes(void)
|
||||
{
|
||||
register int num = rn1(5, 2);
|
||||
int num = rn1(5, 2);
|
||||
struct monst *mtmp;
|
||||
|
||||
if (!(gm.mvitals[PM_WATER_MOCCASIN].mvflags & G_GONE)) {
|
||||
@@ -93,7 +93,7 @@ dowaterdemon(void)
|
||||
static void
|
||||
dowaternymph(void)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
if (!(gm.mvitals[PM_WATER_NYMPH].mvflags & G_GONE)
|
||||
&& (mtmp = makemon(&mons[PM_WATER_NYMPH], u.ux, u.uy,
|
||||
@@ -133,8 +133,8 @@ dogushforth(int drinking)
|
||||
static void
|
||||
gush(coordxy x, coordxy y, genericptr_t poolcnt)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
register struct trap *ttmp;
|
||||
struct monst *mtmp;
|
||||
struct trap *ttmp;
|
||||
|
||||
if (((x + y) % 2) || u_at(x, y)
|
||||
|| (rn2(1 + distmin(u.ux, u.uy, x, y))) || (levl[x][y].typ != ROOM)
|
||||
@@ -243,8 +243,8 @@ void
|
||||
drinkfountain(void)
|
||||
{
|
||||
/* What happens when you drink from a fountain? */
|
||||
register boolean mgkftn = (levl[u.ux][u.uy].blessedftn == 1);
|
||||
register int fate = rnd(30);
|
||||
boolean mgkftn = (levl[u.ux][u.uy].blessedftn == 1);
|
||||
int fate = rnd(30);
|
||||
|
||||
if (Levitation) {
|
||||
floating_above("fountain");
|
||||
@@ -315,7 +315,7 @@ drinkfountain(void)
|
||||
dowaterdemon();
|
||||
break;
|
||||
case 24: { /* Maybe curse some items */
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
int buc_changed = 0;
|
||||
|
||||
pline("This water's no good!");
|
||||
@@ -363,7 +363,7 @@ drinkfountain(void)
|
||||
break;
|
||||
case 29: /* Scare */
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
pline("This %s gives you bad breath!",
|
||||
hliquid("water"));
|
||||
|
||||
+21
-21
@@ -93,7 +93,7 @@ obj_to_any(struct obj *obj)
|
||||
boolean
|
||||
revive_nasty(coordxy x, coordxy y, const char *msg)
|
||||
{
|
||||
register struct obj *otmp, *otmp2;
|
||||
struct obj *otmp, *otmp2;
|
||||
struct monst *mtmp;
|
||||
coord cc;
|
||||
boolean revived = FALSE;
|
||||
@@ -153,7 +153,7 @@ could_move_onto_boulder(coordxy sx, coordxy sy)
|
||||
static int
|
||||
moverock(void)
|
||||
{
|
||||
register coordxy rx, ry, sx, sy;
|
||||
coordxy rx, ry, sx, sy;
|
||||
struct obj *otmp;
|
||||
struct trap *ttmp;
|
||||
struct monst *mtmp, *shkp;
|
||||
@@ -838,7 +838,7 @@ dosinkfall(void)
|
||||
|
||||
/* intended to be called only on ROCKs or TREEs */
|
||||
boolean
|
||||
may_dig(register coordxy x, register coordxy y)
|
||||
may_dig(coordxy x, coordxy y)
|
||||
{
|
||||
struct rm *lev = &levl[x][y];
|
||||
|
||||
@@ -847,14 +847,14 @@ may_dig(register coordxy x, register coordxy y)
|
||||
}
|
||||
|
||||
boolean
|
||||
may_passwall(register coordxy x, register coordxy y)
|
||||
may_passwall(coordxy x, coordxy y)
|
||||
{
|
||||
return (boolean) !(IS_STWALL(levl[x][y].typ)
|
||||
&& (levl[x][y].wall_info & W_NONPASSWALL));
|
||||
}
|
||||
|
||||
boolean
|
||||
bad_rock(struct permonst *mdat, register coordxy x, register coordxy y)
|
||||
bad_rock(struct permonst *mdat, coordxy x, coordxy y)
|
||||
{
|
||||
return (boolean) ((Sokoban && sobj_at(BOULDER, x, y))
|
||||
|| (IS_ROCK(levl[x][y].typ)
|
||||
@@ -2296,7 +2296,7 @@ static boolean
|
||||
impaired_movement(coordxy *x, coordxy *y)
|
||||
{
|
||||
if (u_maybe_impaired()) {
|
||||
register int tries = 0;
|
||||
int tries = 0;
|
||||
|
||||
do {
|
||||
if (tries++ > 50) {
|
||||
@@ -2500,8 +2500,8 @@ domove(void)
|
||||
static void
|
||||
domove_core(void)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
register struct rm *tmpr;
|
||||
struct monst *mtmp;
|
||||
struct rm *tmpr;
|
||||
coordxy x, y;
|
||||
struct trap *trap = NULL;
|
||||
int glyph;
|
||||
@@ -3182,7 +3182,7 @@ spoteffects(boolean pick)
|
||||
static struct monst *
|
||||
monstinroom(struct permonst *mdat, int roomno)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (DEADMONSTER(mtmp))
|
||||
@@ -3212,12 +3212,12 @@ furniture_present(int furniture, int roomno)
|
||||
}
|
||||
|
||||
char *
|
||||
in_rooms(register coordxy x, register coordxy y, register int typewanted)
|
||||
in_rooms(coordxy x, coordxy y, int typewanted)
|
||||
{
|
||||
static char buf[5];
|
||||
char rno, *ptr = &buf[4];
|
||||
int typefound, min_x, min_y, max_x, max_y_offset, step;
|
||||
register struct rm *lev;
|
||||
struct rm *lev;
|
||||
|
||||
#define goodtype(rno) \
|
||||
(!typewanted \
|
||||
@@ -3280,7 +3280,7 @@ in_rooms(register coordxy x, register coordxy y, register int typewanted)
|
||||
boolean
|
||||
in_town(coordxy x, coordxy y)
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
struct mkroom *sroom;
|
||||
boolean has_subrooms = FALSE;
|
||||
|
||||
if (!gl.level.flags.has_town)
|
||||
@@ -3302,7 +3302,7 @@ in_town(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
static void
|
||||
move_update(register boolean newlev)
|
||||
move_update(boolean newlev)
|
||||
{
|
||||
char c, *ptr1, *ptr2, *ptr3, *ptr4;
|
||||
|
||||
@@ -3541,7 +3541,7 @@ pickup_checks(void)
|
||||
}
|
||||
}
|
||||
if (!OBJ_AT(u.ux, u.uy)) {
|
||||
register struct rm *lev = &levl[u.ux][u.uy];
|
||||
struct rm *lev = &levl[u.ux][u.uy];
|
||||
|
||||
if (IS_THRONE(lev->typ))
|
||||
pline("It must weigh%s a ton!", lev->looted ? " almost" : "");
|
||||
@@ -3613,7 +3613,7 @@ dopickup(void)
|
||||
void
|
||||
lookaround(void)
|
||||
{
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
coordxy i, x0 = 0, y0 = 0, m0 = 1, i0 = 9;
|
||||
int corrct = 0, noturn = 0;
|
||||
struct monst *mtmp;
|
||||
@@ -3820,8 +3820,8 @@ crawl_destination(coordxy x, coordxy y)
|
||||
int
|
||||
monster_nearby(void)
|
||||
{
|
||||
register coordxy x, y;
|
||||
register struct monst *mtmp;
|
||||
coordxy x, y;
|
||||
struct monst *mtmp;
|
||||
|
||||
/* Also see the similar check in dochugw() in monmove.c */
|
||||
for (x = u.ux - 1; x <= u.ux + 1; x++)
|
||||
@@ -4061,8 +4061,8 @@ weight_cap(void)
|
||||
int
|
||||
inv_weight(void)
|
||||
{
|
||||
register struct obj *otmp = gi.invent;
|
||||
register int wt = 0;
|
||||
struct obj *otmp = gi.invent;
|
||||
int wt = 0;
|
||||
|
||||
while (otmp) {
|
||||
if (otmp->oclass == COIN_CLASS)
|
||||
@@ -4122,8 +4122,8 @@ check_capacity(const char *str)
|
||||
int
|
||||
inv_cnt(boolean incl_gold)
|
||||
{
|
||||
register struct obj *otmp = gi.invent;
|
||||
register int ct = 0;
|
||||
struct obj *otmp = gi.invent;
|
||||
int ct = 0;
|
||||
|
||||
while (otmp) {
|
||||
if (incl_gold || otmp->invlet != GOLD_SYM)
|
||||
|
||||
+21
-21
@@ -115,7 +115,7 @@ lowc(char c)
|
||||
char *
|
||||
lcase(char *s)
|
||||
{
|
||||
register char *p;
|
||||
char *p;
|
||||
|
||||
for (p = s; *p; p++)
|
||||
if ('A' <= *p && *p <= 'Z')
|
||||
@@ -127,7 +127,7 @@ lcase(char *s)
|
||||
char *
|
||||
ucase(char *s)
|
||||
{
|
||||
register char *p;
|
||||
char *p;
|
||||
|
||||
for (p = s; *p; p++)
|
||||
if ('a' <= *p && *p <= 'z')
|
||||
@@ -167,7 +167,7 @@ upwords(char *s)
|
||||
char *
|
||||
mungspaces(char *bp)
|
||||
{
|
||||
register char c, *p, *p2;
|
||||
char c, *p, *p2;
|
||||
boolean was_space = TRUE;
|
||||
|
||||
for (p = p2 = bp; (c = *p) != '\0'; p++) {
|
||||
@@ -217,7 +217,7 @@ strip_newline(char *str)
|
||||
|
||||
/* return the end of a string (pointing at '\0') */
|
||||
char *
|
||||
eos(register char *s)
|
||||
eos(char *s)
|
||||
{
|
||||
while (*s)
|
||||
s++; /* s += strlen(s); */
|
||||
@@ -422,9 +422,9 @@ ing_suffix(const char *s)
|
||||
char *
|
||||
xcrypt(const char *str, char *buf)
|
||||
{
|
||||
register const char *p;
|
||||
register char *q;
|
||||
register int bitmask;
|
||||
const char *p;
|
||||
char *q;
|
||||
int bitmask;
|
||||
|
||||
for (bitmask = 1, p = str, q = buf; *p; q++) {
|
||||
*q = *p++;
|
||||
@@ -455,8 +455,8 @@ tabexpand(
|
||||
* will be truncated */
|
||||
{
|
||||
char buf[BUFSZ + 10];
|
||||
register char *bp, *s = sbuf;
|
||||
register int idx;
|
||||
char *bp, *s = sbuf;
|
||||
int idx;
|
||||
|
||||
if (!*s)
|
||||
return sbuf;
|
||||
@@ -493,7 +493,7 @@ visctrl(char c)
|
||||
{
|
||||
static char visctrl_bufs[VISCTRL_NBUF][5];
|
||||
static int nbuf = 0;
|
||||
register int i = 0;
|
||||
int i = 0;
|
||||
char *ccc = visctrl_bufs[nbuf];
|
||||
nbuf = (nbuf + 1) % VISCTRL_NBUF;
|
||||
|
||||
@@ -645,7 +645,7 @@ findword(
|
||||
const char *
|
||||
ordin(int n) /* note: should be non-negative */
|
||||
{
|
||||
register int dd = n % 10;
|
||||
int dd = n % 10;
|
||||
|
||||
return (dd == 0 || dd > 3 || (n % 100) / 10 == 1) ? "th"
|
||||
: (dd == 1) ? "st" : (dd == 2) ? "nd" : "rd";
|
||||
@@ -828,10 +828,10 @@ pmatchz(const char *patrn, const char *strng)
|
||||
/* case insensitive counted string comparison */
|
||||
/*{ aka strncasecmp }*/
|
||||
int
|
||||
strncmpi(register const char *s1, register const char *s2,
|
||||
register int n) /*(should probably be size_t, which is unsigned)*/
|
||||
strncmpi(const char *s1, const char *s2,
|
||||
int n) /*(should probably be size_t, which is unsigned)*/
|
||||
{
|
||||
register char t1, t2;
|
||||
char t1, t2;
|
||||
|
||||
while (n--) {
|
||||
if (!*s2)
|
||||
@@ -852,8 +852,8 @@ strncmpi(register const char *s1, register const char *s2,
|
||||
char *
|
||||
strstri(const char *str, const char *sub)
|
||||
{
|
||||
register const char *s1, *s2;
|
||||
register int i, k;
|
||||
const char *s1, *s2;
|
||||
int i, k;
|
||||
#define TABSIZ 0x20 /* 0x40 would be case-sensitive */
|
||||
char tstr[TABSIZ], tsub[TABSIZ]; /* nibble count tables */
|
||||
#if 0
|
||||
@@ -898,7 +898,7 @@ boolean
|
||||
fuzzymatch(const char *s1, const char *s2, const char *ignore_chars,
|
||||
boolean caseblind)
|
||||
{
|
||||
register char c1, c2;
|
||||
char c1, c2;
|
||||
|
||||
do {
|
||||
while ((c1 = *s1++) != '\0' && strchr(ignore_chars, c1) != 0)
|
||||
@@ -1183,8 +1183,8 @@ time_from_yyyymmddhhmmss(char *buf)
|
||||
int
|
||||
phase_of_the_moon(void) /* 0-7, with 0: new, 4: full */
|
||||
{
|
||||
register struct tm *lt = getlt();
|
||||
register int epact, diy, goldn;
|
||||
struct tm *lt = getlt();
|
||||
int epact, diy, goldn;
|
||||
|
||||
diy = lt->tm_yday;
|
||||
goldn = (lt->tm_year % 19) + 1;
|
||||
@@ -1198,7 +1198,7 @@ phase_of_the_moon(void) /* 0-7, with 0: new, 4: full */
|
||||
boolean
|
||||
friday_13th(void)
|
||||
{
|
||||
register struct tm *lt = getlt();
|
||||
struct tm *lt = getlt();
|
||||
|
||||
/* tm_wday (day of week; 0==Sunday) == 5 => Friday */
|
||||
return (boolean) (lt->tm_wday == 5 && lt->tm_mday == 13);
|
||||
@@ -1207,7 +1207,7 @@ friday_13th(void)
|
||||
int
|
||||
night(void)
|
||||
{
|
||||
register int hour = getlt()->tm_hour;
|
||||
int hour = getlt()->tm_hour;
|
||||
|
||||
return (hour < 6 || hour > 21);
|
||||
}
|
||||
|
||||
+3
-3
@@ -260,7 +260,7 @@ static boolean
|
||||
cause_known(
|
||||
int propindx) /* index of a property which can be conveyed by worn item */
|
||||
{
|
||||
register struct obj *o;
|
||||
struct obj *o;
|
||||
long mask = W_ARMOR | W_AMUL | W_RING | W_TOOL;
|
||||
|
||||
/* simpler than from_what()/what_gives(); we don't attempt to
|
||||
@@ -2720,7 +2720,7 @@ dovanquished(void)
|
||||
void
|
||||
list_vanquished(char defquery, boolean ask)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int pfx, nkilled;
|
||||
unsigned ntypes, ni;
|
||||
long total_killed = 0L;
|
||||
@@ -2918,7 +2918,7 @@ num_gone(int mvflags, int *mindx)
|
||||
void
|
||||
list_genocided(char defquery, boolean ask)
|
||||
{
|
||||
register int i, mndx;
|
||||
int i, mndx;
|
||||
int ngenocided, nextinct, ngone, mvflags, mindx[NUMMONS];
|
||||
char c;
|
||||
winid klwin;
|
||||
|
||||
+17
-17
@@ -703,8 +703,8 @@ void
|
||||
assigninvlet(struct obj *otmp)
|
||||
{
|
||||
boolean inuse[invlet_basic];
|
||||
register int i;
|
||||
register struct obj *obj;
|
||||
int i;
|
||||
struct obj *obj;
|
||||
|
||||
/* there should be at most one of these in inventory... */
|
||||
if (otmp->oclass == COIN_CLASS) {
|
||||
@@ -822,7 +822,7 @@ merge_choice(struct obj *objlist, struct obj *obj)
|
||||
int
|
||||
merged(struct obj **potmp, struct obj **pobj)
|
||||
{
|
||||
register struct obj *otmp = *potmp, *obj = *pobj;
|
||||
struct obj *otmp = *potmp, *obj = *pobj;
|
||||
boolean discovered = FALSE;
|
||||
|
||||
if (mergable(otmp, obj)) {
|
||||
@@ -1435,7 +1435,7 @@ delobj_core(
|
||||
struct obj *
|
||||
sobj_at(int otyp, coordxy x, coordxy y)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = gl.level.objects[x][y]; otmp; otmp = otmp->nexthere)
|
||||
if (otmp->otyp == otyp)
|
||||
@@ -1448,7 +1448,7 @@ sobj_at(int otyp, coordxy x, coordxy y)
|
||||
struct obj *
|
||||
nxtobj(struct obj *obj, int type, boolean by_nexthere)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
otmp = obj; /* start with the object after this one */
|
||||
do {
|
||||
@@ -1464,7 +1464,7 @@ nxtobj(struct obj *obj, int type, boolean by_nexthere)
|
||||
struct obj *
|
||||
carrying(int type)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
/* this could be replaced by 'return m_carrying(&gy.youmonst, type);' */
|
||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj)
|
||||
@@ -1533,7 +1533,7 @@ u_carried_gloves(void)
|
||||
struct obj *
|
||||
u_have_novel(void)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj)
|
||||
if (otmp->otyp == SPE_NOVEL)
|
||||
@@ -1559,7 +1559,7 @@ o_on(unsigned int id, struct obj *objchn)
|
||||
boolean
|
||||
obj_here(struct obj *obj, coordxy x, coordxy y)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = gl.level.objects[x][y]; otmp; otmp = otmp->nexthere)
|
||||
if (obj == otmp)
|
||||
@@ -1570,7 +1570,7 @@ obj_here(struct obj *obj, coordxy x, coordxy y)
|
||||
struct obj *
|
||||
g_at(coordxy x, coordxy y)
|
||||
{
|
||||
register struct obj *obj = gl.level.objects[x][y];
|
||||
struct obj *obj = gl.level.objects[x][y];
|
||||
|
||||
while (obj) {
|
||||
if (obj->oclass == COIN_CLASS)
|
||||
@@ -1584,8 +1584,8 @@ g_at(coordxy x, coordxy y)
|
||||
static void
|
||||
compactify(char *buf)
|
||||
{
|
||||
register int i1 = 1, i2 = 1;
|
||||
register char ilet, ilet1, ilet2;
|
||||
int i1 = 1, i2 = 1;
|
||||
char ilet, ilet1, ilet2;
|
||||
|
||||
ilet2 = buf[0];
|
||||
ilet1 = buf[1];
|
||||
@@ -1712,12 +1712,12 @@ getobj(
|
||||
int (*obj_ok)(OBJ_P), /* callback to classify an object's suitability */
|
||||
unsigned int ctrlflags) /* some control to fine-tune the behavior */
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register char ilet = 0;
|
||||
struct obj *otmp;
|
||||
char ilet = 0;
|
||||
char buf[BUFSZ], qbuf[QBUFSZ];
|
||||
char lets[BUFSZ], altlets[BUFSZ];
|
||||
register int suggested = 0;
|
||||
register char *bp = buf, *ap = altlets;
|
||||
int suggested = 0;
|
||||
char *bp = buf, *ap = altlets;
|
||||
boolean allowcnt = (ctrlflags & GETOBJ_ALLOWCNT),
|
||||
forceprompt = (ctrlflags & GETOBJ_PROMPT),
|
||||
allownone = FALSE;
|
||||
@@ -4803,8 +4803,8 @@ stackobj(struct obj *obj)
|
||||
/* returns TRUE if obj & otmp can be merged; used in invent.c and mkobj.c */
|
||||
boolean
|
||||
mergable(
|
||||
register struct obj *otmp, /* potential 'into' stack */
|
||||
register struct obj *obj) /* 'combine' stack */
|
||||
struct obj *otmp, /* potential 'into' stack */
|
||||
struct obj *obj) /* 'combine' stack */
|
||||
{
|
||||
size_t objnamelth = 0, otmpnamelth = 0;
|
||||
|
||||
|
||||
+6
-6
@@ -667,8 +667,8 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
int
|
||||
doforce(void)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register int c, picktyp;
|
||||
struct obj *otmp;
|
||||
int c, picktyp;
|
||||
char qbuf[QBUFSZ];
|
||||
|
||||
/*
|
||||
@@ -769,7 +769,7 @@ int
|
||||
doopen_indir(coordxy x, coordxy y)
|
||||
{
|
||||
coord cc;
|
||||
register struct rm *door;
|
||||
struct rm *door;
|
||||
boolean portcullis;
|
||||
const char *dirprompt;
|
||||
int res = ECMD_OK;
|
||||
@@ -942,8 +942,8 @@ obstructed(coordxy x, coordxy y, boolean quietly)
|
||||
int
|
||||
doclose(void)
|
||||
{
|
||||
register coordxy x, y;
|
||||
register struct rm *door;
|
||||
coordxy x, y;
|
||||
struct rm *door;
|
||||
boolean portcullis;
|
||||
int res = ECMD_OK;
|
||||
|
||||
@@ -1087,7 +1087,7 @@ boxlock(struct obj *obj, struct obj *otmp) /* obj *is* a box */
|
||||
boolean
|
||||
doorlock(struct obj *otmp, coordxy x, coordxy y)
|
||||
{
|
||||
register struct rm *door = &levl[x][y];
|
||||
struct rm *door = &levl[x][y];
|
||||
boolean res = TRUE;
|
||||
int loudness = 0;
|
||||
const char *msg = (const char *) 0;
|
||||
|
||||
+3
-3
@@ -285,10 +285,10 @@ static NEARDATA const char *mail_text[] = { "Gangway!", "Look out!",
|
||||
*/
|
||||
static boolean
|
||||
md_rush(struct monst *md,
|
||||
register int tx, register int ty) /* destination of mail daemon */
|
||||
int tx, int ty) /* destination of mail daemon */
|
||||
{
|
||||
struct monst *mon; /* displaced monster */
|
||||
register int dx, dy; /* direction counters */
|
||||
int dx, dy; /* direction counters */
|
||||
int fx = md->mx, fy = md->my; /* current location */
|
||||
int nfx = fx, nfy = fy, /* new location */
|
||||
d1, d2; /* shortest distances */
|
||||
@@ -684,7 +684,7 @@ void
|
||||
readmail(struct obj *otmp UNUSED)
|
||||
{
|
||||
#ifdef DEF_MAILREADER /* This implies that UNIX is defined */
|
||||
register const char *mr = 0;
|
||||
const char *mr = 0;
|
||||
#endif /* DEF_MAILREADER */
|
||||
#ifdef SIMPLE_MAIL
|
||||
read_simplemail(mailbox, FALSE);
|
||||
|
||||
+22
-22
@@ -77,7 +77,7 @@ static void
|
||||
m_initgrp(struct monst *mtmp, coordxy x, coordxy y, int n, mmflags_nht mmflags)
|
||||
{
|
||||
coord mm;
|
||||
register int cnt = rnd(n);
|
||||
int cnt = rnd(n);
|
||||
struct monst *mon;
|
||||
#if defined(__GNUC__) && (defined(HPUX) || defined(DGUX))
|
||||
/* There is an unresolved problem with several people finding that
|
||||
@@ -143,7 +143,7 @@ static
|
||||
void
|
||||
m_initthrow(struct monst *mtmp, int otyp, int oquan)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
otmp = mksobj(otyp, TRUE, FALSE);
|
||||
otmp->quan = (long) rn1(oquan, 3);
|
||||
@@ -154,10 +154,10 @@ m_initthrow(struct monst *mtmp, int otyp, int oquan)
|
||||
}
|
||||
|
||||
static void
|
||||
m_initweap(register struct monst *mtmp)
|
||||
m_initweap(struct monst *mtmp)
|
||||
{
|
||||
register struct permonst *ptr = mtmp->data;
|
||||
register int mm = monsndx(ptr);
|
||||
struct permonst *ptr = mtmp->data;
|
||||
int mm = monsndx(ptr);
|
||||
struct obj *otmp;
|
||||
int bias, w1, w2;
|
||||
|
||||
@@ -576,11 +576,11 @@ mkmonmoney(struct monst *mtmp, long amount)
|
||||
}
|
||||
|
||||
static void
|
||||
m_initinv(register struct monst *mtmp)
|
||||
m_initinv(struct monst *mtmp)
|
||||
{
|
||||
register int cnt;
|
||||
register struct obj *otmp;
|
||||
register struct permonst *ptr = mtmp->data;
|
||||
int cnt;
|
||||
struct obj *otmp;
|
||||
struct permonst *ptr = mtmp->data;
|
||||
|
||||
if (Is_rogue_level(&u.uz))
|
||||
return;
|
||||
@@ -591,7 +591,7 @@ m_initinv(register struct monst *mtmp)
|
||||
switch (ptr->mlet) {
|
||||
case S_HUMAN:
|
||||
if (is_mercenary(ptr)) {
|
||||
register int mac;
|
||||
int mac;
|
||||
|
||||
switch (monsndx(ptr)) {
|
||||
case PM_GUARD:
|
||||
@@ -1133,7 +1133,7 @@ makemon(
|
||||
coordxy x, coordxy y,
|
||||
mmflags_nht mmflags)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
struct monst fakemon;
|
||||
coord cc;
|
||||
int mndx, mcham, ct, mitem;
|
||||
@@ -1584,11 +1584,11 @@ uncommon(int mndx)
|
||||
* return an integer in the range of 0-5.
|
||||
*/
|
||||
static int
|
||||
align_shift(register struct permonst *ptr)
|
||||
align_shift(struct permonst *ptr)
|
||||
{
|
||||
static NEARDATA long oldmoves = 0L; /* != 1, starting value of moves */
|
||||
static NEARDATA s_level *lev;
|
||||
register int alshift;
|
||||
int alshift;
|
||||
|
||||
if (oldmoves != gm.moves) {
|
||||
lev = Is_special(&u.uz);
|
||||
@@ -1634,8 +1634,8 @@ rndmonst(void)
|
||||
struct permonst *
|
||||
rndmonst_adj(int minadj, int maxadj)
|
||||
{
|
||||
register struct permonst *ptr;
|
||||
register int mndx;
|
||||
struct permonst *ptr;
|
||||
int mndx;
|
||||
int weight, totalweight, selected_mndx, zlevel, minmlev, maxmlev;
|
||||
boolean elemlevel, upper;
|
||||
|
||||
@@ -1742,7 +1742,7 @@ struct permonst *
|
||||
mkclass_aligned(char class, int spc, /* special mons[].geno handling */
|
||||
aligntyp atyp)
|
||||
{
|
||||
register int first, last, num = 0;
|
||||
int first, last, num = 0;
|
||||
int k, nums[SPECIAL_PM + 1]; /* +1: insurance for final return value */
|
||||
int maxmlev, gehennom = Inhell != 0;
|
||||
unsigned mv_mask, gn_mask;
|
||||
@@ -1834,7 +1834,7 @@ mkclass_aligned(char class, int spc, /* special mons[].geno handling */
|
||||
int
|
||||
mkclass_poly(int class)
|
||||
{
|
||||
register int first, last, num = 0;
|
||||
int first, last, num = 0;
|
||||
unsigned gmask;
|
||||
|
||||
for (first = LOW_PM; first < SPECIAL_PM; first++)
|
||||
@@ -1865,7 +1865,7 @@ mkclass_poly(int class)
|
||||
|
||||
/* adjust strength of monsters based on u.uz and u.ulevel */
|
||||
int
|
||||
adj_lev(register struct permonst *ptr)
|
||||
adj_lev(struct permonst *ptr)
|
||||
{
|
||||
int tmp, tmp2;
|
||||
|
||||
@@ -2030,9 +2030,9 @@ grow_up(struct monst *mtmp, struct monst *victim)
|
||||
}
|
||||
|
||||
struct obj *
|
||||
mongets(register struct monst *mtmp, int otyp)
|
||||
mongets(struct monst *mtmp, int otyp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
if (!otyp)
|
||||
return (struct obj *) 0;
|
||||
@@ -2117,7 +2117,7 @@ golemhp(int type)
|
||||
* (Some "animal" types are co-aligned, but also hungry.)
|
||||
*/
|
||||
boolean
|
||||
peace_minded(register struct permonst *ptr)
|
||||
peace_minded(struct permonst *ptr)
|
||||
{
|
||||
aligntyp mal = ptr->maligntyp, ual = u.ualign.type;
|
||||
|
||||
@@ -2242,7 +2242,7 @@ static const NEARDATA char syms[] = {
|
||||
};
|
||||
|
||||
void
|
||||
set_mimic_sym(register struct monst *mtmp)
|
||||
set_mimic_sym(struct monst *mtmp)
|
||||
{
|
||||
int typ, roomno, rt;
|
||||
unsigned appear, ap_type;
|
||||
|
||||
+2
-2
@@ -174,8 +174,8 @@ choose_clerical_spell(int spellnum)
|
||||
*/
|
||||
int
|
||||
castmu(
|
||||
register struct monst *mtmp, /* caster */
|
||||
register struct attack *mattk, /* caster's current attack */
|
||||
struct monst *mtmp, /* caster */
|
||||
struct attack *mattk, /* caster's current attack */
|
||||
boolean thinks_it_foundyou, /* might be mistaken if displaced */
|
||||
boolean foundyou) /* knows hero's precise location */
|
||||
{
|
||||
|
||||
+1
-1
@@ -258,7 +258,7 @@ md_ignored_features(void)
|
||||
static void
|
||||
make_version(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* integer version number
|
||||
|
||||
+4
-4
@@ -104,9 +104,9 @@ missmm(
|
||||
*/
|
||||
/* have monsters fight each other */
|
||||
int
|
||||
fightm(register struct monst *mtmp)
|
||||
fightm(struct monst *mtmp)
|
||||
{
|
||||
register struct monst *mon, *nmon;
|
||||
struct monst *mon, *nmon;
|
||||
int result, has_u_swallowed;
|
||||
/* perhaps the monster will resist Conflict */
|
||||
if (resist_conflict(mtmp))
|
||||
@@ -289,8 +289,8 @@ mdisplacem(
|
||||
*/
|
||||
int
|
||||
mattackm(
|
||||
register struct monst *magr,
|
||||
register struct monst *mdef)
|
||||
struct monst *magr,
|
||||
struct monst *mdef)
|
||||
{
|
||||
int i, /* loop counter */
|
||||
tmp, /* armor class difference */
|
||||
|
||||
+2
-2
@@ -433,7 +433,7 @@ calc_mattacku_vars(
|
||||
* take care of it...
|
||||
*/
|
||||
int
|
||||
mattacku(register struct monst *mtmp)
|
||||
mattacku(struct monst *mtmp)
|
||||
{
|
||||
struct attack *mattk, alt_attk;
|
||||
int i, j = 0, tmp, sum[NATTK];
|
||||
@@ -1063,7 +1063,7 @@ magic_negation(struct monst *mon)
|
||||
* returns MM_ flags
|
||||
*/
|
||||
static int
|
||||
hitmu(register struct monst *mtmp, register struct attack *mattk)
|
||||
hitmu(struct monst *mtmp, struct attack *mattk)
|
||||
{
|
||||
struct permonst *mdat = mtmp->data;
|
||||
struct permonst *olduasmon = gy.youmonst.data;
|
||||
|
||||
+2
-2
@@ -196,7 +196,7 @@ msummon(struct monst *mon)
|
||||
void
|
||||
summon_minion(aligntyp alignment, boolean talk)
|
||||
{
|
||||
register struct monst *mon;
|
||||
struct monst *mon;
|
||||
int mnum;
|
||||
|
||||
switch ((int) alignment) {
|
||||
@@ -259,7 +259,7 @@ summon_minion(aligntyp alignment, boolean talk)
|
||||
|
||||
/* returns 1 if it won't attack. */
|
||||
int
|
||||
demon_talk(register struct monst *mtmp)
|
||||
demon_talk(struct monst *mtmp)
|
||||
{
|
||||
long cash, demand, offer;
|
||||
|
||||
|
||||
+26
-26
@@ -53,7 +53,7 @@ static boolean finddpos(coord *, coordxy, coordxy, coordxy, coordxy);
|
||||
static int QSORTCALLBACK
|
||||
mkroom_cmp(const genericptr vx, const genericptr vy)
|
||||
{
|
||||
register const struct mkroom *x, *y;
|
||||
const struct mkroom *x, *y;
|
||||
|
||||
x = (const struct mkroom *) vx;
|
||||
y = (const struct mkroom *) vy;
|
||||
@@ -91,7 +91,7 @@ door_into_nonjoined(coordxy x, coordxy y)
|
||||
static boolean
|
||||
finddpos(coord *cc, coordxy xl, coordxy yl, coordxy xh, coordxy yh)
|
||||
{
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
|
||||
x = rn1(xh - xl + 1, xl);
|
||||
y = rn1(yh - yl + 1, yl);
|
||||
@@ -141,7 +141,7 @@ sort_rooms(void)
|
||||
}
|
||||
|
||||
static void
|
||||
do_room_or_subroom(register struct mkroom *croom,
|
||||
do_room_or_subroom(struct mkroom *croom,
|
||||
coordxy lowx, coordxy lowy, coordxy hix, coordxy hiy,
|
||||
boolean lit, schar rtype, boolean special, boolean is_room)
|
||||
{
|
||||
@@ -217,7 +217,7 @@ void
|
||||
add_room(int lowx, int lowy, int hix, int hiy,
|
||||
boolean lit, schar rtype, boolean special)
|
||||
{
|
||||
register struct mkroom *croom;
|
||||
struct mkroom *croom;
|
||||
|
||||
croom = &gr.rooms[gn.nroom];
|
||||
do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, rtype, special,
|
||||
@@ -231,7 +231,7 @@ void
|
||||
add_subroom(struct mkroom *proom, int lowx, int lowy, int hix, int hiy,
|
||||
boolean lit, schar rtype, boolean special)
|
||||
{
|
||||
register struct mkroom *croom;
|
||||
struct mkroom *croom;
|
||||
|
||||
croom = &gs.subrooms[gn.nsubroom];
|
||||
do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, rtype, special,
|
||||
@@ -342,12 +342,12 @@ makerooms(void)
|
||||
}
|
||||
|
||||
static void
|
||||
join(register int a, register int b, boolean nxcor)
|
||||
join(int a, int b, boolean nxcor)
|
||||
{
|
||||
coord cc, tt, org, dest;
|
||||
register coordxy tx, ty, xx, yy;
|
||||
register struct mkroom *croom, *troom;
|
||||
register int dx, dy;
|
||||
coordxy tx, ty, xx, yy;
|
||||
struct mkroom *croom, *troom;
|
||||
int dx, dy;
|
||||
|
||||
croom = &gr.rooms[a];
|
||||
troom = &gr.rooms[b];
|
||||
@@ -478,10 +478,10 @@ alloc_doors(void)
|
||||
}
|
||||
|
||||
void
|
||||
add_door(coordxy x, coordxy y, register struct mkroom *aroom)
|
||||
add_door(coordxy x, coordxy y, struct mkroom *aroom)
|
||||
{
|
||||
register struct mkroom *broom;
|
||||
register int tmp;
|
||||
struct mkroom *broom;
|
||||
int tmp;
|
||||
int i;
|
||||
|
||||
alloc_doors();
|
||||
@@ -519,7 +519,7 @@ add_door(coordxy x, coordxy y, register struct mkroom *aroom)
|
||||
}
|
||||
|
||||
static void
|
||||
dosdoor(register coordxy x, register coordxy y, struct mkroom *aroom, int type)
|
||||
dosdoor(coordxy x, coordxy y, struct mkroom *aroom, int type)
|
||||
{
|
||||
boolean shdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
|
||||
|
||||
@@ -646,7 +646,7 @@ static NEARDATA const char *trap_engravings[TRAPNUM] = {
|
||||
static void
|
||||
makeniche(int trap_type)
|
||||
{
|
||||
register struct mkroom *aroom;
|
||||
struct mkroom *aroom;
|
||||
struct rm *rm;
|
||||
int dy, vct = 8;
|
||||
coordxy xx, yy;
|
||||
@@ -759,7 +759,7 @@ clear_level_structures(void)
|
||||
static struct rm zerorm = { GLYPH_UNEXPLORED,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
coordxy x, y;
|
||||
register struct rm *lev;
|
||||
struct rm *lev;
|
||||
|
||||
/* note: normally we'd start at x=1 because map column #0 isn't used
|
||||
(except for placing vault guard at <0,0> when removed from the map
|
||||
@@ -1079,11 +1079,11 @@ fill_ordinary_room(
|
||||
static void
|
||||
makelevel(void)
|
||||
{
|
||||
register struct mkroom *croom;
|
||||
struct mkroom *croom;
|
||||
branch *branchp;
|
||||
stairway *prevstairs;
|
||||
int room_threshold;
|
||||
register s_level *slev = Is_special(&u.uz);
|
||||
s_level *slev = Is_special(&u.uz);
|
||||
int i;
|
||||
|
||||
if (wiz1_level.dlevel == 0)
|
||||
@@ -1115,7 +1115,7 @@ makelevel(void)
|
||||
makemaz("");
|
||||
} else {
|
||||
/* otherwise, fall through - it's a "regular" level. */
|
||||
register int u_depth = depth(&u.uz);
|
||||
int u_depth = depth(&u.uz);
|
||||
|
||||
if (Is_rogue_level(&u.uz)) {
|
||||
makeroguerooms();
|
||||
@@ -1411,7 +1411,7 @@ topologize(struct mkroom *croom)
|
||||
#endif
|
||||
{
|
||||
coordxy x, y;
|
||||
register int roomno = (int) ((croom - gr.rooms) + ROOMOFFSET);
|
||||
int roomno = (int) ((croom - gr.rooms) + ROOMOFFSET);
|
||||
coordxy lowx = croom->lx, lowy = croom->ly;
|
||||
coordxy hix = croom->hx, hiy = croom->hy;
|
||||
#ifdef SPECIALIZATION
|
||||
@@ -1560,9 +1560,9 @@ place_branch(
|
||||
}
|
||||
|
||||
static boolean
|
||||
bydoor(register coordxy x, register coordxy y)
|
||||
bydoor(coordxy x, coordxy y)
|
||||
{
|
||||
register int typ;
|
||||
int typ;
|
||||
|
||||
if (isok(x + 1, y)) {
|
||||
typ = levl[x + 1][y].typ;
|
||||
@@ -1892,7 +1892,7 @@ mktrap(
|
||||
if (tm) {
|
||||
m = *tm;
|
||||
} else {
|
||||
register int tryct = 0;
|
||||
int tryct = 0;
|
||||
boolean avoid_boulder = (is_pit(kind) || is_hole(kind));
|
||||
|
||||
do {
|
||||
@@ -2155,8 +2155,8 @@ static void
|
||||
mkgrave(struct mkroom *croom)
|
||||
{
|
||||
coord m;
|
||||
register int tryct = 0;
|
||||
register struct obj *otmp;
|
||||
int tryct = 0;
|
||||
struct obj *otmp;
|
||||
boolean dobell = !rn2(10);
|
||||
|
||||
if (croom->rtype != OROOM)
|
||||
@@ -2213,7 +2213,7 @@ mkinvokearea(void)
|
||||
{
|
||||
int dist, wallct;
|
||||
coordxy xmin, xmax, ymin, ymax;
|
||||
register coordxy i;
|
||||
coordxy i;
|
||||
|
||||
/* slightly odd if levitating, but not wrong */
|
||||
pline_The("floor shakes violently under you!");
|
||||
@@ -2307,7 +2307,7 @@ mkinvpos(coordxy x, coordxy y, int dist)
|
||||
struct trap *ttmp;
|
||||
struct obj *otmp;
|
||||
boolean make_rocks;
|
||||
register struct rm *lev = &levl[x][y];
|
||||
struct rm *lev = &levl[x][y];
|
||||
struct monst *mon;
|
||||
/* maze levels have slightly different constraints from normal levels;
|
||||
these are also defined in mkmaze.c and may not be appropriate for
|
||||
|
||||
+11
-11
@@ -23,7 +23,7 @@ void mkmap(lev_init *);
|
||||
static void
|
||||
init_map(schar bg_typ)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
for (i = 1; i < COLNO; i++)
|
||||
for (j = 0; j < ROWNO; j++) {
|
||||
@@ -36,7 +36,7 @@ init_map(schar bg_typ)
|
||||
static void
|
||||
init_fill(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
long limit, count;
|
||||
|
||||
limit = (WIDTH * HEIGHT * 2) / 5;
|
||||
@@ -67,7 +67,7 @@ static const int dirs[16] = {
|
||||
static void
|
||||
pass_one(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
short count, dr;
|
||||
|
||||
for (i = 2; i <= WIDTH; i++)
|
||||
@@ -100,7 +100,7 @@ pass_one(schar bg_typ, schar fg_typ)
|
||||
static void
|
||||
pass_two(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
short count, dr;
|
||||
|
||||
for (i = 2; i <= WIDTH; i++)
|
||||
@@ -123,7 +123,7 @@ pass_two(schar bg_typ, schar fg_typ)
|
||||
static void
|
||||
pass_three(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
short count, dr;
|
||||
|
||||
for (i = 2; i <= WIDTH; i++)
|
||||
@@ -152,12 +152,12 @@ pass_three(schar bg_typ, schar fg_typ)
|
||||
void
|
||||
flood_fill_rm(
|
||||
int sx,
|
||||
register int sy,
|
||||
register int rmno,
|
||||
int sy,
|
||||
int rmno,
|
||||
boolean lit,
|
||||
boolean anyroom)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int nx;
|
||||
schar fg_typ = levl[sx][sy].typ;
|
||||
|
||||
@@ -179,7 +179,7 @@ flood_fill_rm(
|
||||
levl[i][sy].lit = lit;
|
||||
if (anyroom) {
|
||||
/* add walls to room as well */
|
||||
register int ii, jj;
|
||||
int ii, jj;
|
||||
for (ii = (i == sx ? i - 1 : i); ii <= i + 1; ii++)
|
||||
for (jj = sy - 1; jj <= sy + 1; jj++)
|
||||
if (isok(ii, jj) && (IS_WALL(levl[ii][jj].typ)
|
||||
@@ -258,9 +258,9 @@ join_map_cleanup(void)
|
||||
static void
|
||||
join_map(schar bg_typ, schar fg_typ)
|
||||
{
|
||||
register struct mkroom *croom, *croom2;
|
||||
struct mkroom *croom, *croom2;
|
||||
|
||||
register int i, j;
|
||||
int i, j;
|
||||
int sx, sy;
|
||||
coord sm, em;
|
||||
|
||||
|
||||
+7
-7
@@ -301,8 +301,8 @@ mkobj(int oclass, boolean artif)
|
||||
static void
|
||||
mkbox_cnts(struct obj *box)
|
||||
{
|
||||
register int n;
|
||||
register struct obj *otmp;
|
||||
int n;
|
||||
struct obj *otmp;
|
||||
|
||||
box->cobj = (struct obj *) 0;
|
||||
|
||||
@@ -345,7 +345,7 @@ mkbox_cnts(struct obj *box)
|
||||
(void) stop_timer(SHRINK_GLOB, obj_to_any(otmp));
|
||||
}
|
||||
} else {
|
||||
register int tprob;
|
||||
int tprob;
|
||||
const struct icp *iprobs = boxiprobs;
|
||||
|
||||
for (tprob = rnd(100); (tprob -= iprobs->iprob) > 0; iprobs++)
|
||||
@@ -391,8 +391,8 @@ rndmonnum(void)
|
||||
int
|
||||
rndmonnum_adj(int minadj, int maxadj)
|
||||
{
|
||||
register struct permonst *ptr;
|
||||
register int i;
|
||||
struct permonst *ptr;
|
||||
int i;
|
||||
unsigned short excludeflags;
|
||||
|
||||
/* Plan A: get a level-appropriate common monster */
|
||||
@@ -705,7 +705,7 @@ unknwn_contnr_contents(struct obj *obj)
|
||||
void
|
||||
bill_dummy_object(struct obj *otmp)
|
||||
{
|
||||
register struct obj *dummy;
|
||||
struct obj *dummy;
|
||||
long cost = 0L;
|
||||
|
||||
if (otmp->unpaid) {
|
||||
@@ -2223,7 +2223,7 @@ is_rottable(struct obj *otmp)
|
||||
void
|
||||
place_object(struct obj *otmp, coordxy x, coordxy y)
|
||||
{
|
||||
register struct obj *otmp2;
|
||||
struct obj *otmp2;
|
||||
|
||||
if (!isok(x, y)) { /* validate location */
|
||||
void (*func)(const char *, ...) PRINTF_F_PTR(1, 2);
|
||||
|
||||
+15
-15
@@ -36,7 +36,7 @@ extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||
static boolean
|
||||
isbig(struct mkroom* sroom)
|
||||
{
|
||||
register int area = (sroom->hx - sroom->lx + 1)
|
||||
int area = (sroom->hx - sroom->lx + 1)
|
||||
* (sroom->hy - sroom->ly + 1);
|
||||
|
||||
return (boolean) (area > 20);
|
||||
@@ -89,7 +89,7 @@ do_mkroom(int roomtype)
|
||||
static void
|
||||
mkshop(void)
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
struct mkroom *sroom;
|
||||
int i = -1;
|
||||
char *ep = (char *) 0; /* (init == lint suppression) */
|
||||
|
||||
@@ -182,7 +182,7 @@ mkshop(void)
|
||||
}
|
||||
|
||||
if (i < 0) { /* shoptype not yet determined */
|
||||
register int j;
|
||||
int j;
|
||||
|
||||
/* pick a shop type at random */
|
||||
for (j = rnd(100), i = 0; (j -= shtypes[i].prob) > 0; i++)
|
||||
@@ -214,8 +214,8 @@ mkshop(void)
|
||||
static struct mkroom *
|
||||
pick_room(boolean strict)
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
register int i = gn.nroom;
|
||||
struct mkroom *sroom;
|
||||
int i = gn.nroom;
|
||||
|
||||
for (sroom = &gr.rooms[rn2(gn.nroom)]; i--; sroom++) {
|
||||
if (sroom == &gr.rooms[gn.nroom])
|
||||
@@ -238,7 +238,7 @@ pick_room(boolean strict)
|
||||
static void
|
||||
mkzoo(int type)
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
struct mkroom *sroom;
|
||||
|
||||
if ((sroom = pick_room(FALSE)) != 0) {
|
||||
sroom->rtype = type;
|
||||
@@ -271,7 +271,7 @@ void
|
||||
fill_zoo(struct mkroom* sroom)
|
||||
{
|
||||
struct monst *mon;
|
||||
register int sx, sy, i;
|
||||
int sx, sy, i;
|
||||
int sh, goldlim = 0, type = sroom->rtype;
|
||||
coordxy tx = 0, ty = 0;
|
||||
int rmno = (int) ((sroom - gr.rooms) + ROOMOFFSET);
|
||||
@@ -468,7 +468,7 @@ mkundead(
|
||||
static struct permonst *
|
||||
morguemon(void)
|
||||
{
|
||||
register int i = rn2(100), hd = rn2(level_difficulty());
|
||||
int i = rn2(100), hd = rn2(level_difficulty());
|
||||
|
||||
if (hd > 10 && i < 10) {
|
||||
if (Inhell || In_endgame(&u.uz)) {
|
||||
@@ -520,8 +520,8 @@ antholemon(void)
|
||||
static void
|
||||
mkswamp(void) /* Michiel Huisjes & Fred de Wilde */
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
register int i, eelct = 0;
|
||||
struct mkroom *sroom;
|
||||
int i, eelct = 0;
|
||||
coordxy sx, sy;
|
||||
int rmno;
|
||||
|
||||
@@ -588,9 +588,9 @@ shrine_pos(int roomno)
|
||||
static void
|
||||
mktemple(void)
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
struct mkroom *sroom;
|
||||
coord *shrine_spot;
|
||||
register struct rm *lev;
|
||||
struct rm *lev;
|
||||
|
||||
if (!(sroom = pick_room(TRUE)))
|
||||
return;
|
||||
@@ -613,8 +613,8 @@ mktemple(void)
|
||||
boolean
|
||||
nexttodoor(int sx, int sy)
|
||||
{
|
||||
register int dx, dy;
|
||||
register struct rm *lev;
|
||||
int dx, dy;
|
||||
struct rm *lev;
|
||||
|
||||
for (dx = -1; dx <= 1; dx++)
|
||||
for (dy = -1; dy <= 1; dy++) {
|
||||
@@ -755,7 +755,7 @@ somexyspace(struct mkroom* croom, coord *c)
|
||||
struct mkroom *
|
||||
search_special(schar type)
|
||||
{
|
||||
register struct mkroom *croom;
|
||||
struct mkroom *croom;
|
||||
|
||||
for (croom = &gr.rooms[0]; croom->hx >= 0; croom++)
|
||||
if ((type == ANY_TYPE && croom->rtype != OROOM)
|
||||
|
||||
@@ -518,7 +518,7 @@ pm_to_cham(int mndx)
|
||||
static struct obj *
|
||||
make_corpse(struct monst *mtmp, unsigned int corpseflags)
|
||||
{
|
||||
register struct permonst *mdat = mtmp->data;
|
||||
struct permonst *mdat = mtmp->data;
|
||||
int num;
|
||||
struct obj *obj = (struct obj *) 0;
|
||||
struct obj *otmp = (struct obj *) 0;
|
||||
@@ -1594,9 +1594,9 @@ mon_givit(struct monst *mtmp, struct permonst *ptr)
|
||||
}
|
||||
|
||||
void
|
||||
mpickgold(register struct monst* mtmp)
|
||||
mpickgold(struct monst* mtmp)
|
||||
{
|
||||
register struct obj *gold;
|
||||
struct obj *gold;
|
||||
int mat_idx;
|
||||
|
||||
if ((gold = g_at(mtmp->mx, mtmp->my)) != 0) {
|
||||
@@ -1617,7 +1617,7 @@ mpickgold(register struct monst* mtmp)
|
||||
boolean
|
||||
mpickstuff(struct monst *mtmp)
|
||||
{
|
||||
register struct obj *otmp, *otmp2, *otmp3;
|
||||
struct obj *otmp, *otmp2, *otmp3;
|
||||
int carryamt = 0;
|
||||
|
||||
/* prevent shopkeepers from leaving the door of their shop */
|
||||
@@ -1915,7 +1915,7 @@ mfndpos(
|
||||
long flag)
|
||||
{
|
||||
struct permonst *mdat = mon->data;
|
||||
register struct trap *ttmp;
|
||||
struct trap *ttmp;
|
||||
coordxy x, y, nx, ny;
|
||||
int cnt = 0;
|
||||
uchar ntyp;
|
||||
@@ -2936,7 +2936,7 @@ corpse_chance(
|
||||
|
||||
/* drop (perhaps) a cadaver and remove monster */
|
||||
void
|
||||
mondied(register struct monst* mdef)
|
||||
mondied(struct monst* mdef)
|
||||
{
|
||||
mondead(mdef);
|
||||
if (!DEADMONSTER(mdef))
|
||||
@@ -3697,7 +3697,7 @@ maybe_mnexto(struct monst *mtmp)
|
||||
*/
|
||||
int
|
||||
mnearto(
|
||||
register struct monst *mtmp,
|
||||
struct monst *mtmp,
|
||||
coordxy x,
|
||||
coordxy y,
|
||||
boolean move_other, /* make sure mtmp gets to x, y! so move m_at(x, y) */
|
||||
@@ -3775,7 +3775,7 @@ m_respond(struct monst* mtmp)
|
||||
aggravate();
|
||||
}
|
||||
if (mtmp->data == &mons[PM_MEDUSA]) {
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NATTK; i++)
|
||||
if (mtmp->data->mattk[i].aatyp == AT_GAZE) {
|
||||
@@ -4047,7 +4047,7 @@ wake_nearto(coordxy x, coordxy y, int distance)
|
||||
|
||||
/* NOTE: we must check for mimicry before calling this routine */
|
||||
void
|
||||
seemimic(register struct monst* mtmp)
|
||||
seemimic(struct monst* mtmp)
|
||||
{
|
||||
boolean is_blocker_appear = (is_lightblocker_mappear(mtmp));
|
||||
|
||||
@@ -5072,7 +5072,7 @@ newcham(
|
||||
*/
|
||||
/* former giants can't continue carrying boulders */
|
||||
if (mtmp->minvent && !throws_rocks(mdat)) {
|
||||
register struct obj *otmp, *otmp2;
|
||||
struct obj *otmp, *otmp2;
|
||||
|
||||
/* DEADMONSTER(): it is possible for flooreffects() to kill mtmp;
|
||||
the rest of its inventory would be dropped making otmp2 stale */
|
||||
@@ -5240,7 +5240,7 @@ kill_genocided_monsters(void)
|
||||
}
|
||||
|
||||
void
|
||||
golemeffects(register struct monst* mon, int damtype, int dam)
|
||||
golemeffects(struct monst* mon, int damtype, int dam)
|
||||
{
|
||||
int heal = 0, slow = 0;
|
||||
|
||||
|
||||
+12
-12
@@ -404,8 +404,8 @@ mstrength(struct permonst *ptr)
|
||||
static boolean
|
||||
mstrength_ranged_attk(struct permonst *ptr)
|
||||
{
|
||||
register int i, j;
|
||||
register int atk_mask = (1 << AT_BREA) | (1 << AT_SPIT) | (1 << AT_GAZE);
|
||||
int i, j;
|
||||
int atk_mask = (1 << AT_BREA) | (1 << AT_SPIT) | (1 << AT_GAZE);
|
||||
|
||||
for (i = 0; i < NATTK; i++) {
|
||||
if ((j = ptr->mattk[i].aatyp) >= AT_WEAP
|
||||
@@ -555,7 +555,7 @@ breakarm(struct permonst *ptr)
|
||||
|
||||
/* creature sticks other creatures it hits */
|
||||
boolean
|
||||
sticks(register struct permonst *ptr)
|
||||
sticks(struct permonst *ptr)
|
||||
{
|
||||
return (boolean) (dmgtype(ptr, AD_STCK)
|
||||
|| (dmgtype(ptr, AD_WRAP) && !attacktype(ptr, AT_ENGL))
|
||||
@@ -618,7 +618,7 @@ dmgtype(struct permonst *ptr, int dtyp)
|
||||
/* returns the maximum damage a defender can do to the attacker via
|
||||
a passive defense */
|
||||
int
|
||||
max_passive_dmg(register struct monst *mdef, register struct monst *magr)
|
||||
max_passive_dmg(struct monst *mdef, struct monst *magr)
|
||||
{
|
||||
int i, dmg, multi2 = 0;
|
||||
uchar adtyp;
|
||||
@@ -808,9 +808,9 @@ name_to_monplus(
|
||||
* This also permits plurals created by adding suffixes such as 's'
|
||||
* or 'es'. Other plurals must still be handled explicitly.
|
||||
*/
|
||||
register int i;
|
||||
register int mntmp = NON_PM;
|
||||
register char *s, *str, *term;
|
||||
int i;
|
||||
int mntmp = NON_PM;
|
||||
char *s, *str, *term;
|
||||
char buf[BUFSZ];
|
||||
int len, mgend, matchgend = -1;
|
||||
size_t slen;
|
||||
@@ -918,7 +918,7 @@ name_to_monplus(
|
||||
/* end of list */
|
||||
{ 0, NON_PM, NEUTRAL }
|
||||
};
|
||||
register const struct alt_spl *namep;
|
||||
const struct alt_spl *namep;
|
||||
|
||||
for (namep = names; namep->name; namep++) {
|
||||
len = (int) strlen(namep->name);
|
||||
@@ -1076,7 +1076,7 @@ name_to_monclass(const char *in_str, int * mndx_p)
|
||||
|
||||
/* returns 3 values (0=male, 1=female, 2=none) */
|
||||
int
|
||||
gender(register struct monst *mtmp)
|
||||
gender(struct monst *mtmp)
|
||||
{
|
||||
if (is_neuter(mtmp->data))
|
||||
return 2;
|
||||
@@ -1088,7 +1088,7 @@ gender(register struct monst *mtmp)
|
||||
yield "they". This is the one we want to use when printing messages. */
|
||||
int
|
||||
pronoun_gender(
|
||||
register struct monst *mtmp,
|
||||
struct monst *mtmp,
|
||||
unsigned pg_flags) /* flags&1: 'no it' unless neuter,
|
||||
* flags&2: random if hallucinating */
|
||||
{
|
||||
@@ -1201,7 +1201,7 @@ static const short grownups[][2] = {
|
||||
int
|
||||
little_to_big(int montype)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; grownups[i][0] >= LOW_PM; i++)
|
||||
if (montype == grownups[i][0]) {
|
||||
@@ -1214,7 +1214,7 @@ little_to_big(int montype)
|
||||
int
|
||||
big_to_little(int montype)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; grownups[i][0] >= LOW_PM; i++)
|
||||
if (montype == grownups[i][1]) {
|
||||
|
||||
+16
-16
@@ -158,7 +158,7 @@ m_break_boulder(struct monst *mtmp, coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
static void
|
||||
watch_on_duty(register struct monst* mtmp)
|
||||
watch_on_duty(struct monst* mtmp)
|
||||
{
|
||||
coordxy x, y;
|
||||
|
||||
@@ -187,7 +187,7 @@ watch_on_duty(register struct monst* mtmp)
|
||||
/* move a monster; if a threat to busy hero, stop doing whatever it is */
|
||||
int
|
||||
dochugw(
|
||||
register struct monst *mtmp,
|
||||
struct monst *mtmp,
|
||||
boolean chug) /* True: monster is moving;
|
||||
* False: monster was just created or has teleported
|
||||
* so perform stop-what-you're-doing-if-close-enough-
|
||||
@@ -299,7 +299,7 @@ mon_regen(struct monst *mon, boolean digest_meal)
|
||||
* jolted awake.
|
||||
*/
|
||||
static int
|
||||
disturb(register struct monst *mtmp)
|
||||
disturb(struct monst *mtmp)
|
||||
{
|
||||
/*
|
||||
* + Ettins are hard to surprise.
|
||||
@@ -528,7 +528,7 @@ m_arrival(struct monst* mon)
|
||||
|
||||
/* a mind flayer unleashes a mind blast */
|
||||
static void
|
||||
mind_blast(register struct monst* mtmp)
|
||||
mind_blast(struct monst* mtmp)
|
||||
{
|
||||
struct monst *m2, *nmon = (struct monst *) 0;
|
||||
|
||||
@@ -597,10 +597,10 @@ mind_blast(register struct monst* mtmp)
|
||||
* code. --KAA
|
||||
*/
|
||||
int
|
||||
dochug(register struct monst* mtmp)
|
||||
dochug(struct monst* mtmp)
|
||||
{
|
||||
register struct permonst *mdat;
|
||||
register int status = MMOVE_NOTHING;
|
||||
struct permonst *mdat;
|
||||
int status = MMOVE_NOTHING;
|
||||
int inrange, nearby, scared, res;
|
||||
struct obj *otmp;
|
||||
boolean panicattk = FALSE;
|
||||
@@ -964,7 +964,7 @@ mon_would_consume_item(struct monst *mtmp, struct obj *otmp)
|
||||
}
|
||||
|
||||
boolean
|
||||
itsstuck(register struct monst* mtmp)
|
||||
itsstuck(struct monst* mtmp)
|
||||
{
|
||||
if (sticks(gy.youmonst.data) && mtmp == u.ustuck && !u.uswallow) {
|
||||
pline("%s cannot escape from you!", Monnam(mtmp));
|
||||
@@ -992,7 +992,7 @@ should_displace(
|
||||
int shortest_with_displacing = -1;
|
||||
int shortest_without_displacing = -1;
|
||||
int count_without_displacing = 0;
|
||||
register int i, nx, ny;
|
||||
int i, nx, ny;
|
||||
int ndist;
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
@@ -1194,9 +1194,9 @@ m_search_items(
|
||||
int *mmoved,
|
||||
int *appr)
|
||||
{
|
||||
register int minr = SQSRCHRADIUS; /* not too far away */
|
||||
register struct obj *otmp;
|
||||
register coordxy xx, yy;
|
||||
int minr = SQSRCHRADIUS; /* not too far away */
|
||||
struct obj *otmp;
|
||||
coordxy xx, yy;
|
||||
coordxy hmx, hmy, lmx, lmy;
|
||||
struct trap *ttmp;
|
||||
coordxy omx = mtmp->mx, omy = mtmp->my;
|
||||
@@ -1565,7 +1565,7 @@ postmov(
|
||||
* 3: did not move, and can't do anything else either.
|
||||
*/
|
||||
int
|
||||
m_move(register struct monst *mtmp, int after)
|
||||
m_move(struct monst *mtmp, int after)
|
||||
{
|
||||
int appr;
|
||||
coordxy ggx, ggy, nix, niy;
|
||||
@@ -1727,7 +1727,7 @@ m_move(register struct monst *mtmp, int after)
|
||||
appr = -1;
|
||||
|
||||
if (!should_see && can_track(ptr)) {
|
||||
register coord *cp;
|
||||
coord *cp;
|
||||
|
||||
cp = gettrack(omx, omy);
|
||||
if (cp) {
|
||||
@@ -2035,7 +2035,7 @@ accessible(coordxy x, coordxy y)
|
||||
|
||||
/* decide where the monster thinks you are standing */
|
||||
void
|
||||
set_apparxy(register struct monst *mtmp)
|
||||
set_apparxy(struct monst *mtmp)
|
||||
{
|
||||
boolean notseen, notthere, gotu;
|
||||
int displ;
|
||||
@@ -2079,7 +2079,7 @@ set_apparxy(register struct monst *mtmp)
|
||||
gotu = notseen ? !rn2(3) : notthere ? !rn2(4) : FALSE;
|
||||
|
||||
if (!gotu) {
|
||||
register int try_cnt = 0;
|
||||
int try_cnt = 0;
|
||||
|
||||
do {
|
||||
if (++try_cnt > 200) {
|
||||
|
||||
+6
-6
@@ -43,9 +43,9 @@ static const char *const developers[] = {
|
||||
static const char *
|
||||
dev_name(void)
|
||||
{
|
||||
register int i, m = 0, n = SIZE(developers);
|
||||
register struct monst *mtmp;
|
||||
register boolean match;
|
||||
int i, m = 0, n = SIZE(developers);
|
||||
struct monst *mtmp;
|
||||
boolean match;
|
||||
|
||||
do {
|
||||
match = FALSE;
|
||||
@@ -69,7 +69,7 @@ dev_name(void)
|
||||
}
|
||||
|
||||
static void
|
||||
get_mplname(register struct monst* mtmp, char *nam)
|
||||
get_mplname(struct monst* mtmp, char *nam)
|
||||
{
|
||||
boolean fmlkind = is_female(mtmp->data);
|
||||
const char *devnam;
|
||||
@@ -322,7 +322,7 @@ mk_mplayer(struct permonst *ptr, coordxy x, coordxy y, boolean special)
|
||||
* fill up the overflow.
|
||||
*/
|
||||
void
|
||||
create_mplayers(register int num, boolean special)
|
||||
create_mplayers(int num, boolean special)
|
||||
{
|
||||
int pm, x, y;
|
||||
struct monst fakemon;
|
||||
@@ -351,7 +351,7 @@ create_mplayers(register int num, boolean special)
|
||||
}
|
||||
|
||||
void
|
||||
mplayer_talk(register struct monst* mtmp)
|
||||
mplayer_talk(struct monst* mtmp)
|
||||
{
|
||||
static const char
|
||||
*same_class_msg[3] = {
|
||||
|
||||
+8
-8
@@ -158,7 +158,7 @@ thitu(
|
||||
*/
|
||||
static boolean
|
||||
drop_throw(
|
||||
register struct obj *obj,
|
||||
struct obj *obj,
|
||||
boolean ohit,
|
||||
coordxy x,
|
||||
coordxy y)
|
||||
@@ -779,7 +779,7 @@ int
|
||||
thrwmm(struct monst* mtmp, struct monst* mtarg)
|
||||
{
|
||||
struct obj *otmp, *mwep;
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
boolean ispole;
|
||||
|
||||
/* Polearms won't be applied by monsters against other monsters */
|
||||
@@ -1128,10 +1128,10 @@ linedup_callback(
|
||||
|
||||
boolean
|
||||
linedup(
|
||||
register coordxy ax,
|
||||
register coordxy ay,
|
||||
register coordxy bx,
|
||||
register coordxy by,
|
||||
coordxy ax,
|
||||
coordxy ay,
|
||||
coordxy bx,
|
||||
coordxy by,
|
||||
int boulderhandling) /* 0=block, 1=ignore, 2=conditionally block */
|
||||
{
|
||||
int dx, dy, boulderspots;
|
||||
@@ -1195,7 +1195,7 @@ m_lined_up(struct monst* mtarg, struct monst* mtmp)
|
||||
|
||||
/* is mtmp in position to use ranged attack on hero? */
|
||||
boolean
|
||||
lined_up(register struct monst* mtmp)
|
||||
lined_up(struct monst* mtmp)
|
||||
{
|
||||
return m_lined_up(&gy.youmonst, mtmp) ? TRUE : FALSE;
|
||||
}
|
||||
@@ -1204,7 +1204,7 @@ lined_up(register struct monst* mtmp)
|
||||
struct obj *
|
||||
m_carrying(struct monst *mtmp, int type)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = (mtmp == &gy.youmonst) ? gi.invent : mtmp->minvent; otmp;
|
||||
otmp = otmp->nobj)
|
||||
|
||||
+3
-3
@@ -1349,7 +1349,7 @@ mon_has_friends(struct monst *mtmp)
|
||||
boolean
|
||||
find_offensive(struct monst *mtmp)
|
||||
{
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
boolean reflection_skip = m_seenres(mtmp, M_SEEN_REFL) != 0
|
||||
|| monnear(mtmp, mtmp->mux, mtmp->muy);
|
||||
struct obj *helmet = which_armor(mtmp, W_ARMH);
|
||||
@@ -1998,7 +1998,7 @@ rnd_offensive_item(struct monst *mtmp)
|
||||
boolean
|
||||
find_misc(struct monst *mtmp)
|
||||
{
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
struct permonst *mdat = mtmp->data;
|
||||
coordxy x = mtmp->mx, y = mtmp->my;
|
||||
struct trap *t;
|
||||
@@ -2299,7 +2299,7 @@ use_misc(struct monst *mtmp)
|
||||
mquaffmsg(mtmp, otmp);
|
||||
if (otmp->cursed) {
|
||||
if (Can_rise_up(mtmp->mx, mtmp->my, &u.uz)) {
|
||||
register int tolev = depth(&u.uz) - 1;
|
||||
int tolev = depth(&u.uz) - 1;
|
||||
d_level tolevel;
|
||||
|
||||
get_level(&tolevel, tolev);
|
||||
|
||||
+7
-7
@@ -65,8 +65,8 @@ awaken_scare(struct monst *mtmp, boolean scary)
|
||||
static void
|
||||
awaken_monsters(int distance)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
register int distm;
|
||||
struct monst *mtmp;
|
||||
int distm;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (DEADMONSTER(mtmp))
|
||||
@@ -83,7 +83,7 @@ awaken_monsters(int distance)
|
||||
static void
|
||||
put_monsters_to_sleep(int distance)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (DEADMONSTER(mtmp))
|
||||
@@ -103,7 +103,7 @@ put_monsters_to_sleep(int distance)
|
||||
static void
|
||||
charm_snakes(int distance)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
int could_see_mon, was_peaceful;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
@@ -137,7 +137,7 @@ charm_snakes(int distance)
|
||||
static void
|
||||
calm_nymphs(int distance)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (DEADMONSTER(mtmp))
|
||||
@@ -160,7 +160,7 @@ calm_nymphs(int distance)
|
||||
void
|
||||
awaken_soldiers(struct monst* bugler /* monster that played instrument */)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
int distance, distm;
|
||||
|
||||
/* distance of affected non-soldier monsters to bugler */
|
||||
@@ -222,7 +222,7 @@ static void
|
||||
do_earthquake(int force)
|
||||
{
|
||||
static const char into_a_chasm[] = " into a chasm";
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
struct trap *chasm, *trap_at_u = t_at(u.ux, u.uy);
|
||||
|
||||
+1
-1
@@ -1337,7 +1337,7 @@ nhl_debug_flags(lua_State *L)
|
||||
if (val != -1) {
|
||||
iflags.debug_mongen = !(boolean) val; /* value in lua is negated */
|
||||
if (iflags.debug_mongen) {
|
||||
register struct monst *mtmp, *mtmp2;
|
||||
struct monst *mtmp, *mtmp2;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp2) {
|
||||
mtmp2 = mtmp->nmon;
|
||||
|
||||
+3
-3
@@ -469,8 +469,8 @@ void
|
||||
undiscover_object(int oindx)
|
||||
{
|
||||
if (!objects[oindx].oc_name_known) {
|
||||
register int dindx, acls = objects[oindx].oc_class;
|
||||
register boolean found = FALSE;
|
||||
int dindx, acls = objects[oindx].oc_class;
|
||||
boolean found = FALSE;
|
||||
|
||||
/* find the object; shift those behind it forward one slot */
|
||||
for (dindx = gb.bases[acls];
|
||||
@@ -1027,7 +1027,7 @@ doclassdisco(void)
|
||||
void
|
||||
rename_disco(void)
|
||||
{
|
||||
register int i, dis;
|
||||
int i, dis;
|
||||
int ct = 0, mn = 0, sl;
|
||||
char *s, oclass, prev_class;
|
||||
winid tmpwin;
|
||||
|
||||
+13
-13
@@ -121,7 +121,7 @@ static const struct Jitem Japanese_items[] = {
|
||||
static char *
|
||||
strprepend(char *s, const char *pref)
|
||||
{
|
||||
register int i = (int) strlen(pref);
|
||||
int i = (int) strlen(pref);
|
||||
|
||||
if (i > PREFIX) {
|
||||
impossible("PREFIX too short (for %d).", i);
|
||||
@@ -553,10 +553,10 @@ xname(struct obj *obj)
|
||||
|
||||
static char *
|
||||
xname_flags(
|
||||
register struct obj *obj,
|
||||
struct obj *obj,
|
||||
unsigned cxn_flags) /* bitmask of CXN_xxx values */
|
||||
{
|
||||
register char *buf;
|
||||
char *buf;
|
||||
char *obufp, *buf_end, *buf_eos;
|
||||
size_t bufspaceleft;
|
||||
int typ = obj->otyp;
|
||||
@@ -1194,7 +1194,7 @@ doname_base(
|
||||
* end (Strcat is used on the end) */
|
||||
const char *aname = 0;
|
||||
int omndx = obj->corpsenm;
|
||||
register char *bp;
|
||||
char *bp;
|
||||
char *bp_eos, *bp_end;
|
||||
size_t bpspaceleft;
|
||||
|
||||
@@ -2130,7 +2130,7 @@ the(const char* str)
|
||||
insert_the = TRUE;
|
||||
} else {
|
||||
/* Probably a proper name, might not need an article */
|
||||
register char *tmp, *named, *called;
|
||||
char *tmp, *named, *called;
|
||||
int l;
|
||||
|
||||
/* some objects have capitalized adjectives in their names */
|
||||
@@ -2213,7 +2213,7 @@ yobjnam(struct obj *obj, const char *verb)
|
||||
char *
|
||||
Yobjnam2(struct obj *obj, const char *verb)
|
||||
{
|
||||
register char *s = yobjnam(obj, verb);
|
||||
char *s = yobjnam(obj, verb);
|
||||
|
||||
*s = highc(*s);
|
||||
return s;
|
||||
@@ -2727,7 +2727,7 @@ singplur_compound(char *str)
|
||||
char *
|
||||
makeplural(const char* oldstr)
|
||||
{
|
||||
register char *spot;
|
||||
char *spot;
|
||||
char lo_c, *str = nextobuf();
|
||||
const char *excess = (char *) 0;
|
||||
int len, i;
|
||||
@@ -2928,7 +2928,7 @@ makeplural(const char* oldstr)
|
||||
char *
|
||||
makesingular(const char* oldstr)
|
||||
{
|
||||
register char *p, *bp;
|
||||
char *p, *bp;
|
||||
const char *excess = 0;
|
||||
char *str = nextobuf();
|
||||
|
||||
@@ -3350,7 +3350,7 @@ rnd_otyp_by_namedesc(
|
||||
{
|
||||
int i, n = 0;
|
||||
short validobjs[NUM_OBJECTS];
|
||||
register const char *zn, *of;
|
||||
const char *zn, *of;
|
||||
boolean check_of;
|
||||
int lo, hi, minglob, maxglob, prob, maxprob = 0;
|
||||
|
||||
@@ -3849,7 +3849,7 @@ readobjnam_preparse(struct _readobjnam_data *d)
|
||||
int more_l = 0, res = 1;
|
||||
|
||||
for (;;) {
|
||||
register int l;
|
||||
int l;
|
||||
|
||||
if (!d->bp || !*d->bp)
|
||||
break;
|
||||
@@ -4445,7 +4445,7 @@ readobjnam_postparse1(struct _readobjnam_data *d)
|
||||
&& strncmpi(d->bp, "food ration", 11)
|
||||
&& strncmpi(d->bp, "meat ring", 9))
|
||||
for (i = 0; i < (int) (sizeof wrpsym); i++) {
|
||||
register int j = Strlen(wrp[i]);
|
||||
int j = Strlen(wrp[i]);
|
||||
|
||||
/* check for "<class> [ of ] something" */
|
||||
if (!strncmpi(d->bp, wrp[i], j)) {
|
||||
@@ -4550,7 +4550,7 @@ readobjnam_postparse2(struct _readobjnam_data *d)
|
||||
; /* avoid false hit on "* glass" */
|
||||
} else if (!BSTRCMPI(d->bp, d->p - 6, " glass")
|
||||
|| !strcmpi(d->bp, "glass")) {
|
||||
register char *s = d->bp;
|
||||
char *s = d->bp;
|
||||
|
||||
/* treat "broken glass" as a non-existent item; since "broken" is
|
||||
also a chest/box prefix it might have been stripped off above */
|
||||
@@ -4597,7 +4597,7 @@ readobjnam_postparse3(struct _readobjnam_data *d)
|
||||
/* check real names of gems first */
|
||||
if (!d->oclass && d->actualn) {
|
||||
for (i = gb.bases[GEM_CLASS]; i <= LAST_REAL_GEM; i++) {
|
||||
register const char *zn;
|
||||
const char *zn;
|
||||
|
||||
if ((zn = OBJ_NAME(objects[i])) != 0 && !strcmpi(d->actualn, zn)) {
|
||||
d->typ = i;
|
||||
|
||||
+5
-5
@@ -461,7 +461,7 @@ ask_do_tutorial(void)
|
||||
*/
|
||||
boolean
|
||||
parseoptions(
|
||||
register char *opts,
|
||||
char *opts,
|
||||
boolean tinitial,
|
||||
boolean tfrom_file)
|
||||
{
|
||||
@@ -1449,7 +1449,7 @@ optfn_disclose(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
DISCLOSE_NO_WITHOUT_PROMPT,
|
||||
DISCLOSE_SPECIAL_WITHOUT_PROMPT,
|
||||
'\0' };
|
||||
register char c, *dop;
|
||||
char c, *dop;
|
||||
|
||||
c = lowc(*op);
|
||||
if (c == 'k')
|
||||
@@ -8248,8 +8248,8 @@ collect_menu_keys(
|
||||
int
|
||||
fruitadd(char *str, struct fruit *replace_fruit)
|
||||
{
|
||||
register int i;
|
||||
register struct fruit *f;
|
||||
int i;
|
||||
struct fruit *f;
|
||||
int highest_fruit_id = 0, globpfx;
|
||||
char buf[PL_FSIZ], altname[PL_FSIZ];
|
||||
boolean user_specified = (str == gp.pl_fruit);
|
||||
@@ -9490,7 +9490,7 @@ option_help(void)
|
||||
{
|
||||
char buf[BUFSZ], buf2[BUFSZ];
|
||||
const char *optname;
|
||||
register int i;
|
||||
int i;
|
||||
winid datawin;
|
||||
|
||||
datawin = create_nhwindow(NHW_TEXT);
|
||||
|
||||
+1
-1
@@ -2205,7 +2205,7 @@ doquickwhatis(void)
|
||||
int
|
||||
doidtrap(void)
|
||||
{
|
||||
register struct trap *trap;
|
||||
struct trap *trap;
|
||||
int tt, glyph;
|
||||
coordxy x, y;
|
||||
|
||||
|
||||
+5
-5
@@ -101,8 +101,8 @@ int
|
||||
collect_obj_classes(char ilets[], struct obj *otmp, boolean here,
|
||||
boolean (*filter)(OBJ_P), int *itemcount)
|
||||
{
|
||||
register int iletct = 0;
|
||||
register char c;
|
||||
int iletct = 0;
|
||||
char c;
|
||||
|
||||
*itemcount = 0;
|
||||
ilets[iletct] = '\0'; /* terminate ilets so that strchr() will work */
|
||||
@@ -411,8 +411,8 @@ describe_decor(void)
|
||||
static void
|
||||
check_here(boolean picked_some)
|
||||
{
|
||||
register struct obj *obj;
|
||||
register int ct = 0;
|
||||
struct obj *obj;
|
||||
int ct = 0;
|
||||
unsigned lhflags = picked_some ? LOOKHERE_PICKED_SOME : LOOKHERE_NOFLAGS;
|
||||
|
||||
if (flags.mention_decor) {
|
||||
@@ -2157,7 +2157,7 @@ static int
|
||||
doloot_core(void)
|
||||
{
|
||||
struct obj *cobj, *nobj;
|
||||
register int c = -1;
|
||||
int c = -1;
|
||||
int timepassed = 0;
|
||||
coord cc;
|
||||
boolean underfoot = TRUE;
|
||||
|
||||
+2
-2
@@ -1136,7 +1136,7 @@ dropp(struct obj *obj)
|
||||
static void
|
||||
break_armor(void)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
struct permonst *uptr = gy.youmonst.data;
|
||||
|
||||
if (breakarm(uptr)) {
|
||||
@@ -1614,7 +1614,7 @@ dosummon(void)
|
||||
int
|
||||
dogaze(void)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
int looked = 0;
|
||||
char qbuf[QBUFSZ];
|
||||
int i;
|
||||
|
||||
+5
-5
@@ -283,7 +283,7 @@ in_trouble(void)
|
||||
static struct obj *
|
||||
worst_cursed_item(void)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
/* if strained or worse, check for loadstone first */
|
||||
if (near_capacity() >= HVY_ENCUMBER) {
|
||||
@@ -1265,7 +1265,7 @@ pleased(aligntyp g_align)
|
||||
disp.botl = TRUE;
|
||||
break;
|
||||
case 4: {
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
int any = 0;
|
||||
|
||||
if (Blind)
|
||||
@@ -1368,8 +1368,8 @@ pleased(aligntyp g_align)
|
||||
static boolean
|
||||
water_prayer(boolean bless_water)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register long changed = 0;
|
||||
struct obj *otmp;
|
||||
long changed = 0;
|
||||
boolean other = FALSE, bc_known = !(Blind || Hallucination);
|
||||
|
||||
for (otmp = gl.level.objects[u.ux][u.uy]; otmp; otmp = otmp->nexthere) {
|
||||
@@ -2581,7 +2581,7 @@ altar_wrath(coordxy x, coordxy y)
|
||||
static boolean
|
||||
blocked_boulder(int dx, int dy)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
int nx, ny;
|
||||
long count = 0L;
|
||||
|
||||
|
||||
+9
-9
@@ -42,8 +42,8 @@ move_special(struct monst *mtmp, boolean in_his_shop, schar appr,
|
||||
boolean uondoor, boolean avoid,
|
||||
coordxy omx, coordxy omy, coordxy ggx, coordxy ggy)
|
||||
{
|
||||
register coordxy nx, ny, nix, niy;
|
||||
register schar i;
|
||||
coordxy nx, ny, nix, niy;
|
||||
schar i;
|
||||
schar chcnt, cnt;
|
||||
coord poss[9];
|
||||
long info[9];
|
||||
@@ -140,7 +140,7 @@ move_special(struct monst *mtmp, boolean in_his_shop, schar appr,
|
||||
char
|
||||
temple_occupied(char *array)
|
||||
{
|
||||
register char *ptr;
|
||||
char *ptr;
|
||||
|
||||
for (ptr = array; *ptr; ptr++)
|
||||
if (gr.rooms[*ptr - ROOMOFFSET].rtype == TEMPLE)
|
||||
@@ -396,7 +396,7 @@ has_shrine(struct monst *pri)
|
||||
struct monst *
|
||||
findpriest(char roomno)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (DEADMONSTER(mtmp))
|
||||
@@ -687,8 +687,8 @@ struct monst *
|
||||
mk_roamer(struct permonst *ptr, aligntyp alignment, coordxy x, coordxy y,
|
||||
boolean peaceful)
|
||||
{
|
||||
register struct monst *roamer;
|
||||
register boolean coaligned = (u.ualign.type == alignment);
|
||||
struct monst *roamer;
|
||||
boolean coaligned = (u.ualign.type == alignment);
|
||||
|
||||
#if 0 /* this was due to permonst's pxlth field which is now gone */
|
||||
if (ptr != &mons[PM_ALIGNED_CLERIC] && ptr != &mons[PM_ANGEL])
|
||||
@@ -735,8 +735,8 @@ in_your_sanctuary(
|
||||
struct monst *mon, /* if non-null, <mx,my> overrides <x,y> */
|
||||
coordxy x, coordxy y)
|
||||
{
|
||||
register char roomno;
|
||||
register struct monst *priest;
|
||||
char roomno;
|
||||
struct monst *priest;
|
||||
|
||||
if (mon) {
|
||||
if (is_minion(mon->data) || is_rider(mon->data))
|
||||
@@ -839,7 +839,7 @@ ghod_hitsu(struct monst *priest)
|
||||
void
|
||||
angry_priest(void)
|
||||
{
|
||||
register struct monst *priest;
|
||||
struct monst *priest;
|
||||
struct rm *lev;
|
||||
|
||||
if ((priest = findpriest(temple_occupied(u.urooms))) != 0) {
|
||||
|
||||
+1
-1
@@ -235,7 +235,7 @@ qtext_pronoun(
|
||||
static void
|
||||
convert_arg(char c)
|
||||
{
|
||||
register const char *str;
|
||||
const char *str;
|
||||
|
||||
switch (c) {
|
||||
case 'p':
|
||||
|
||||
+12
-12
@@ -327,7 +327,7 @@ int
|
||||
doread(void)
|
||||
{
|
||||
static const char find_any_braille[] = "feel any Braille writing.";
|
||||
register struct obj *scroll;
|
||||
struct obj *scroll;
|
||||
boolean confused, nodisappear;
|
||||
int otyp;
|
||||
|
||||
@@ -644,7 +644,7 @@ doread(void)
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
stripspe(register struct obj* obj)
|
||||
stripspe(struct obj* obj)
|
||||
{
|
||||
if (obj->blessed || obj->spe <= 0) {
|
||||
pline1(nothing_happens);
|
||||
@@ -659,13 +659,13 @@ stripspe(register struct obj* obj)
|
||||
}
|
||||
|
||||
static void
|
||||
p_glow1(register struct obj* otmp)
|
||||
p_glow1(struct obj* otmp)
|
||||
{
|
||||
pline("%s briefly.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"));
|
||||
}
|
||||
|
||||
static void
|
||||
p_glow2(register struct obj* otmp, register const char* color)
|
||||
p_glow2(struct obj* otmp, const char* color)
|
||||
{
|
||||
pline("%s%s%s for a moment.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"),
|
||||
Blind ? "" : " ", Blind ? "" : hcolor(color));
|
||||
@@ -715,7 +715,7 @@ charge_ok(struct obj* obj)
|
||||
void
|
||||
recharge(struct obj* obj, int curse_bless)
|
||||
{
|
||||
register int n;
|
||||
int n;
|
||||
boolean is_cursed, is_blessed;
|
||||
|
||||
is_cursed = curse_bless < 0;
|
||||
@@ -1096,7 +1096,7 @@ static void
|
||||
seffect_enchant_armor(struct obj **sobjp)
|
||||
{
|
||||
struct obj *sobj = *sobjp;
|
||||
register schar s;
|
||||
schar s;
|
||||
boolean special_armor;
|
||||
boolean same_color;
|
||||
struct obj *otmp = some_armor(&gy.youmonst);
|
||||
@@ -1352,8 +1352,8 @@ seffect_scare_monster(struct obj **sobjp)
|
||||
int otyp = sobj->otyp;
|
||||
boolean scursed = sobj->cursed;
|
||||
boolean confused = (Confusion != 0);
|
||||
register int ct = 0;
|
||||
register struct monst *mtmp;
|
||||
int ct = 0;
|
||||
struct monst *mtmp;
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (DEADMONSTER(mtmp))
|
||||
@@ -1388,7 +1388,7 @@ seffect_remove_curse(struct obj **sobjp)
|
||||
boolean sblessed = sobj->blessed;
|
||||
boolean scursed = sobj->cursed;
|
||||
boolean confused = (Confusion != 0);
|
||||
register struct obj *obj, *nxto;
|
||||
struct obj *obj, *nxto;
|
||||
long wornmask;
|
||||
|
||||
You_feel(!Hallucination
|
||||
@@ -2225,8 +2225,8 @@ drop_boulder_on_player(
|
||||
boolean
|
||||
drop_boulder_on_monster(coordxy x, coordxy y, boolean confused, boolean byu)
|
||||
{
|
||||
register struct obj *otmp2;
|
||||
register struct monst *mtmp;
|
||||
struct obj *otmp2;
|
||||
struct monst *mtmp;
|
||||
|
||||
/* Make the object(s) */
|
||||
otmp2 = mksobj(confused ? ROCK : BOULDER, FALSE, FALSE);
|
||||
@@ -2577,7 +2577,7 @@ do_class_genocide(void)
|
||||
else if (immunecnt || class == S_invisible)
|
||||
You("aren't permitted to genocide such monsters.");
|
||||
else if (wizard && buf[0] == '*') {
|
||||
register struct monst *mtmp, *mtmp2;
|
||||
struct monst *mtmp, *mtmp2;
|
||||
|
||||
gonecnt = 0;
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp2) {
|
||||
|
||||
+6
-6
@@ -58,9 +58,9 @@ free_rect(void)
|
||||
int
|
||||
get_rect_ind(NhRect* r)
|
||||
{
|
||||
register NhRect *rectp;
|
||||
register int lx, ly, hx, hy;
|
||||
register int i;
|
||||
NhRect *rectp;
|
||||
int lx, ly, hx, hy;
|
||||
int i;
|
||||
|
||||
lx = r->lx;
|
||||
ly = r->ly;
|
||||
@@ -80,9 +80,9 @@ get_rect_ind(NhRect* r)
|
||||
NhRect *
|
||||
get_rect(NhRect* r)
|
||||
{
|
||||
register NhRect *rectp;
|
||||
register int lx, ly, hx, hy;
|
||||
register int i;
|
||||
NhRect *rectp;
|
||||
int lx, ly, hx, hy;
|
||||
int i;
|
||||
|
||||
lx = r->lx;
|
||||
ly = r->ly;
|
||||
|
||||
+9
-9
@@ -189,7 +189,7 @@ add_mon_to_reg(NhRegion *reg, struct monst *mon)
|
||||
void
|
||||
remove_mon_from_reg(NhRegion *reg, struct monst *mon)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < reg->n_monst; i++)
|
||||
if (reg->monsters[i] == mon->m_id) {
|
||||
@@ -339,7 +339,7 @@ add_region(NhRegion *reg)
|
||||
void
|
||||
remove_region(NhRegion *reg)
|
||||
{
|
||||
register int i, x, y;
|
||||
int i, x, y;
|
||||
|
||||
for (i = 0; i < gn.n_regions; i++)
|
||||
if (gr.regions[i] == reg)
|
||||
@@ -384,7 +384,7 @@ remove_region(NhRegion *reg)
|
||||
void
|
||||
clear_regions(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < gn.n_regions; i++)
|
||||
free_region(gr.regions[i]);
|
||||
@@ -403,7 +403,7 @@ clear_regions(void)
|
||||
void
|
||||
run_regions(void)
|
||||
{
|
||||
register int i, j, k;
|
||||
int i, j, k;
|
||||
int f_indx;
|
||||
|
||||
/* reset some messaging variables */
|
||||
@@ -563,7 +563,7 @@ m_in_out_region(struct monst *mon, coordxy x, coordxy y)
|
||||
void
|
||||
update_player_regions(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < gn.n_regions; i++)
|
||||
if (!gr.regions[i]->attach_2_u
|
||||
@@ -579,7 +579,7 @@ update_player_regions(void)
|
||||
void
|
||||
update_monster_region(struct monst *mon)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < gn.n_regions; i++) {
|
||||
if (inside_region(gr.regions[i], mon->mx, mon->my)) {
|
||||
@@ -604,7 +604,7 @@ void
|
||||
replace_mon_regions(monold, monnew)
|
||||
struct monst *monold, *monnew;
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < gn.n_regions; i++)
|
||||
if (mon_in_region(gr.regions[i], monold)) {
|
||||
@@ -619,7 +619,7 @@ struct monst *monold, *monnew;
|
||||
void
|
||||
remove_mon_from_regions(struct monst *mon)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < gn.n_regions; i++)
|
||||
if (mon_in_region(gr.regions[i], mon))
|
||||
@@ -635,7 +635,7 @@ remove_mon_from_regions(struct monst *mon)
|
||||
NhRegion *
|
||||
visible_region_at(coordxy x, coordxy y)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < gn.n_regions; i++) {
|
||||
if (!gr.regions[i]->visible || gr.regions[i]->ttl == -2L)
|
||||
|
||||
+14
-14
@@ -71,8 +71,8 @@ extern int amii_numcolors;
|
||||
static void
|
||||
find_lev_obj(void)
|
||||
{
|
||||
register struct obj *fobjtmp = (struct obj *) 0;
|
||||
register struct obj *otmp;
|
||||
struct obj *fobjtmp = (struct obj *) 0;
|
||||
struct obj *otmp;
|
||||
int x, y;
|
||||
|
||||
for (x = 0; x < COLNO; x++)
|
||||
@@ -113,7 +113,7 @@ find_lev_obj(void)
|
||||
void
|
||||
inven_inuse(boolean quietly)
|
||||
{
|
||||
register struct obj *otmp, *otmp2;
|
||||
struct obj *otmp, *otmp2;
|
||||
|
||||
for (otmp = gi.invent; otmp; otmp = otmp2) {
|
||||
otmp2 = otmp->nobj;
|
||||
@@ -237,8 +237,8 @@ restobj(NHFILE *nhfp, struct obj *otmp)
|
||||
static struct obj *
|
||||
restobjchn(NHFILE *nhfp, boolean frozen)
|
||||
{
|
||||
register struct obj *otmp, *otmp2 = 0;
|
||||
register struct obj *first = (struct obj *) 0;
|
||||
struct obj *otmp, *otmp2 = 0;
|
||||
struct obj *first = (struct obj *) 0;
|
||||
int buflen = 0;
|
||||
boolean ghostly = (nhfp->ftype == NHF_BONESFILE);
|
||||
|
||||
@@ -376,8 +376,8 @@ restmon(NHFILE *nhfp, struct monst *mtmp)
|
||||
static struct monst *
|
||||
restmonchn(NHFILE *nhfp)
|
||||
{
|
||||
register struct monst *mtmp, *mtmp2 = 0;
|
||||
register struct monst *first = (struct monst *) 0;
|
||||
struct monst *mtmp, *mtmp2 = 0;
|
||||
struct monst *first = (struct monst *) 0;
|
||||
int offset, buflen = 0;
|
||||
boolean ghostly = (nhfp->ftype == NHF_BONESFILE);
|
||||
|
||||
@@ -454,7 +454,7 @@ restmonchn(NHFILE *nhfp)
|
||||
static struct fruit *
|
||||
loadfruitchn(NHFILE *nhfp)
|
||||
{
|
||||
register struct fruit *flist, *fnext;
|
||||
struct fruit *flist, *fnext;
|
||||
|
||||
flist = 0;
|
||||
for (;;) {
|
||||
@@ -472,9 +472,9 @@ loadfruitchn(NHFILE *nhfp)
|
||||
}
|
||||
|
||||
static void
|
||||
freefruitchn(register struct fruit *flist)
|
||||
freefruitchn(struct fruit *flist)
|
||||
{
|
||||
register struct fruit *fnext;
|
||||
struct fruit *fnext;
|
||||
|
||||
while (flist) {
|
||||
fnext = flist->nextf;
|
||||
@@ -484,9 +484,9 @@ freefruitchn(register struct fruit *flist)
|
||||
}
|
||||
|
||||
static void
|
||||
ghostfruit(register struct obj *otmp)
|
||||
ghostfruit(struct obj *otmp)
|
||||
{
|
||||
register struct fruit *oldf;
|
||||
struct fruit *oldf;
|
||||
|
||||
for (oldf = go.oldfruit; oldf; oldf = oldf->nextf)
|
||||
if (oldf->fid == otmp->spe)
|
||||
@@ -994,8 +994,8 @@ trickery(char *reason)
|
||||
void
|
||||
getlev(NHFILE *nhfp, int pid, xint8 lev)
|
||||
{
|
||||
register struct trap *trap;
|
||||
register struct monst *mtmp;
|
||||
struct trap *trap;
|
||||
struct monst *mtmp;
|
||||
long elapsed;
|
||||
branch *br;
|
||||
int hpid = 0;
|
||||
|
||||
@@ -73,7 +73,7 @@ static const char *const rip_txt[] = {
|
||||
static void
|
||||
center(int line, char *text)
|
||||
{
|
||||
register char *ip, *op;
|
||||
char *ip, *op;
|
||||
ip = text;
|
||||
op = &gr.rip[line][STONE_LINE_CENT - ((strlen(text) + 1) >> 1)];
|
||||
while (*ip)
|
||||
@@ -83,10 +83,10 @@ center(int line, char *text)
|
||||
void
|
||||
genl_outrip(winid tmpwin, int how, time_t when)
|
||||
{
|
||||
register char **dp;
|
||||
register char *dpx;
|
||||
char **dp;
|
||||
char *dpx;
|
||||
char buf[BUFSZ];
|
||||
register int x;
|
||||
int x;
|
||||
int line, year;
|
||||
long cash;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ RND(int x)
|
||||
used in cases where the answer doesn't affect gameplay and we don't
|
||||
want to give users easy control over the main RNG sequence. */
|
||||
int
|
||||
rn2_on_display_rng(register int x)
|
||||
rn2_on_display_rng(int x)
|
||||
{
|
||||
return (isaac64_next_uint64(&rnglist[DISP].rng_state) % x);
|
||||
}
|
||||
@@ -80,7 +80,7 @@ rn2_on_display_rng(register int x)
|
||||
#define RND(x) ((int) ((Rand() >> 3) % (x)))
|
||||
#endif
|
||||
int
|
||||
rn2_on_display_rng(register int x)
|
||||
rn2_on_display_rng(int x)
|
||||
{
|
||||
static unsigned seed = 1;
|
||||
seed *= 2739110765;
|
||||
@@ -90,7 +90,7 @@ rn2_on_display_rng(register int x)
|
||||
|
||||
/* 0 <= rn2(x) < x */
|
||||
int
|
||||
rn2(register int x)
|
||||
rn2(int x)
|
||||
{
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
if (x <= 0) {
|
||||
@@ -107,9 +107,9 @@ rn2(register int x)
|
||||
/* 0 <= rnl(x) < x; sometimes subtracting Luck;
|
||||
good luck approaches 0, bad luck approaches (x-1) */
|
||||
int
|
||||
rnl(register int x)
|
||||
rnl(int x)
|
||||
{
|
||||
register int i, adjustment;
|
||||
int i, adjustment;
|
||||
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
if (x <= 0) {
|
||||
@@ -150,7 +150,7 @@ rnl(register int x)
|
||||
|
||||
/* 1 <= rnd(x) <= x */
|
||||
int
|
||||
rnd(register int x)
|
||||
rnd(int x)
|
||||
{
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
if (x <= 0) {
|
||||
@@ -163,16 +163,16 @@ rnd(register int x)
|
||||
}
|
||||
|
||||
int
|
||||
rnd_on_display_rng(register int x)
|
||||
rnd_on_display_rng(int x)
|
||||
{
|
||||
return rn2_on_display_rng(x) + 1;
|
||||
}
|
||||
|
||||
/* d(N,X) == NdX == dX+dX+...+dX N times; n <= d(n,x) <= (n*x) */
|
||||
int
|
||||
d(register int n, register int x)
|
||||
d(int n, int x)
|
||||
{
|
||||
register int tmp = n;
|
||||
int tmp = n;
|
||||
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
if (x < 0 || n < 0 || (x == 0 && n != 0)) {
|
||||
@@ -187,9 +187,9 @@ d(register int n, register int x)
|
||||
|
||||
/* 1 <= rne(x) <= max(u.ulevel/3,5) */
|
||||
int
|
||||
rne(register int x)
|
||||
rne(int x)
|
||||
{
|
||||
register int tmp, utmp;
|
||||
int tmp, utmp;
|
||||
|
||||
utmp = (u.ulevel < 15) ? 5 : u.ulevel / 3;
|
||||
tmp = 1;
|
||||
@@ -211,8 +211,8 @@ rne(register int x)
|
||||
int
|
||||
rnz(int i)
|
||||
{
|
||||
register long x = (long) i;
|
||||
register long tmp = 1000L;
|
||||
long x = (long) i;
|
||||
long tmp = 1000L;
|
||||
|
||||
tmp += rn2(1000);
|
||||
tmp *= rne(4);
|
||||
|
||||
+1
-1
@@ -574,7 +574,7 @@ outrumor(
|
||||
static void
|
||||
init_oracles(dlb *fp)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
char line[BUFSZ];
|
||||
int cnt = 0;
|
||||
|
||||
|
||||
+7
-7
@@ -685,7 +685,7 @@ savecemetery(NHFILE *nhfp, struct cemetery **cemeteryaddr)
|
||||
static void
|
||||
savedamage(NHFILE *nhfp)
|
||||
{
|
||||
register struct damage *damageptr, *tmp_dam;
|
||||
struct damage *damageptr, *tmp_dam;
|
||||
unsigned int xl = 0;
|
||||
|
||||
damageptr = gl.level.damagelist;
|
||||
@@ -821,7 +821,7 @@ saveobj(NHFILE *nhfp, struct obj *otmp)
|
||||
static void
|
||||
saveobjchn(NHFILE *nhfp, struct obj **obj_p)
|
||||
{
|
||||
register struct obj *otmp = *obj_p;
|
||||
struct obj *otmp = *obj_p;
|
||||
struct obj *otmp2;
|
||||
boolean is_invent = (otmp && otmp == gi.invent);
|
||||
int minusone = -1;
|
||||
@@ -945,9 +945,9 @@ savemon(NHFILE *nhfp, struct monst *mtmp)
|
||||
}
|
||||
|
||||
static void
|
||||
savemonchn(NHFILE *nhfp, register struct monst *mtmp)
|
||||
savemonchn(NHFILE *nhfp, struct monst *mtmp)
|
||||
{
|
||||
register struct monst *mtmp2;
|
||||
struct monst *mtmp2;
|
||||
int minusone = -1;
|
||||
|
||||
while (mtmp) {
|
||||
@@ -982,10 +982,10 @@ savemonchn(NHFILE *nhfp, register struct monst *mtmp)
|
||||
|
||||
/* save traps; gf.ftrap is the only trap chain so the 2nd arg is superfluous */
|
||||
static void
|
||||
savetrapchn(NHFILE *nhfp, register struct trap *trap)
|
||||
savetrapchn(NHFILE *nhfp, struct trap *trap)
|
||||
{
|
||||
static struct trap zerotrap;
|
||||
register struct trap *trap2;
|
||||
struct trap *trap2;
|
||||
|
||||
while (trap) {
|
||||
boolean use_relative = (gp.program_state.restoring != REST_GSTATE
|
||||
@@ -1018,7 +1018,7 @@ void
|
||||
savefruitchn(NHFILE *nhfp)
|
||||
{
|
||||
static struct fruit zerofruit;
|
||||
register struct fruit *f2, *f1;
|
||||
struct fruit *f2, *f1;
|
||||
|
||||
f1 = gf.ffruit;
|
||||
while (f1) {
|
||||
|
||||
@@ -163,7 +163,7 @@ money2u(struct monst* mon, long amount)
|
||||
}
|
||||
|
||||
static struct monst *
|
||||
next_shkp(register struct monst *shkp, boolean withbill)
|
||||
next_shkp(struct monst *shkp, boolean withbill)
|
||||
{
|
||||
for (; shkp; shkp = shkp->nmon) {
|
||||
if (DEADMONSTER(shkp))
|
||||
@@ -337,10 +337,10 @@ clear_no_charge(struct monst *shkp, struct obj *list)
|
||||
|
||||
/* either you paid or left the shop or the shopkeeper died */
|
||||
void
|
||||
setpaid(register struct monst *shkp)
|
||||
setpaid(struct monst *shkp)
|
||||
{
|
||||
register struct obj *obj;
|
||||
register struct monst *mtmp;
|
||||
struct obj *obj;
|
||||
struct monst *mtmp;
|
||||
|
||||
clear_unpaid(shkp, gi.invent);
|
||||
clear_unpaid(shkp, fobj);
|
||||
@@ -835,7 +835,7 @@ pick_pick(struct obj* obj)
|
||||
boolean
|
||||
same_price(struct obj* obj1, struct obj* obj2)
|
||||
{
|
||||
register struct monst *shkp1, *shkp2;
|
||||
struct monst *shkp1, *shkp2;
|
||||
struct bill_x *bp1 = 0, *bp2 = 0;
|
||||
boolean are_mergable = FALSE;
|
||||
|
||||
@@ -1043,9 +1043,9 @@ is_unpaid(struct obj* obj)
|
||||
|
||||
/* Delete the contents of the given object. */
|
||||
void
|
||||
delete_contents(register struct obj* obj)
|
||||
delete_contents(struct obj* obj)
|
||||
{
|
||||
register struct obj *curr;
|
||||
struct obj *curr;
|
||||
|
||||
while ((curr = obj->cobj) != 0) {
|
||||
obj_extract_self(curr);
|
||||
@@ -1055,11 +1055,11 @@ delete_contents(register struct obj* obj)
|
||||
|
||||
/* called with two args on merge */
|
||||
void
|
||||
obfree(register struct obj* obj, register struct obj* merge)
|
||||
obfree(struct obj* obj, struct obj* merge)
|
||||
{
|
||||
register struct bill_x *bp;
|
||||
register struct bill_x *bpm;
|
||||
register struct monst *shkp;
|
||||
struct bill_x *bp;
|
||||
struct bill_x *bpm;
|
||||
struct monst *shkp;
|
||||
|
||||
if (obj->otyp == LEASH && obj->leashmon)
|
||||
o_unleash(obj);
|
||||
@@ -1151,7 +1151,7 @@ obfree(register struct obj* obj, register struct obj* merge)
|
||||
}
|
||||
|
||||
static long
|
||||
check_credit(long tmp, register struct monst* shkp)
|
||||
check_credit(long tmp, struct monst* shkp)
|
||||
{
|
||||
long credit = ESHK(shkp)->credit;
|
||||
|
||||
@@ -1170,7 +1170,7 @@ check_credit(long tmp, register struct monst* shkp)
|
||||
}
|
||||
|
||||
static void
|
||||
pay(long tmp, register struct monst* shkp)
|
||||
pay(long tmp, struct monst* shkp)
|
||||
{
|
||||
long robbed = ESHK(shkp)->robbed;
|
||||
long balance = ((tmp <= 0L) ? tmp : check_credit(tmp, shkp));
|
||||
@@ -1206,7 +1206,7 @@ home_shk(struct monst *shkp, boolean killkops)
|
||||
static boolean
|
||||
angry_shk_exists(void)
|
||||
{
|
||||
register struct monst *shkp;
|
||||
struct monst *shkp;
|
||||
|
||||
for (shkp = next_shkp(fmon, FALSE); shkp;
|
||||
shkp = next_shkp(shkp->nmon, FALSE))
|
||||
@@ -1221,12 +1221,12 @@ pacify_shk(struct monst *shkp, boolean clear_surcharge)
|
||||
{
|
||||
NOTANGRY(shkp) = TRUE; /* make peaceful */
|
||||
if (clear_surcharge && ESHK(shkp)->surcharge) {
|
||||
register struct bill_x *bp = ESHK(shkp)->bill_p;
|
||||
register int ct = ESHK(shkp)->billct;
|
||||
struct bill_x *bp = ESHK(shkp)->bill_p;
|
||||
int ct = ESHK(shkp)->billct;
|
||||
|
||||
ESHK(shkp)->surcharge = FALSE;
|
||||
while (ct-- > 0) {
|
||||
register long reduction = (bp->price + 3L) / 4L;
|
||||
long reduction = (bp->price + 3L) / 4L;
|
||||
bp->price -= reduction; /* undo 33% increase */
|
||||
bp++;
|
||||
}
|
||||
@@ -1239,9 +1239,9 @@ rile_shk(struct monst *shkp)
|
||||
{
|
||||
NOTANGRY(shkp) = FALSE; /* make angry */
|
||||
if (!ESHK(shkp)->surcharge) {
|
||||
register long surcharge;
|
||||
register struct bill_x *bp = ESHK(shkp)->bill_p;
|
||||
register int ct = ESHK(shkp)->billct;
|
||||
long surcharge;
|
||||
struct bill_x *bp = ESHK(shkp)->bill_p;
|
||||
int ct = ESHK(shkp)->billct;
|
||||
|
||||
ESHK(shkp)->surcharge = TRUE;
|
||||
while (ct-- > 0) {
|
||||
@@ -1371,9 +1371,9 @@ static const char
|
||||
static long
|
||||
cheapest_item(struct monst *shkp)
|
||||
{
|
||||
register int ct = ESHK(shkp)->billct;
|
||||
register struct bill_x *bp = ESHK(shkp)->bill_p;
|
||||
register long gmin = (bp->price * bp->bquan);
|
||||
int ct = ESHK(shkp)->billct;
|
||||
struct bill_x *bp = ESHK(shkp)->bill_p;
|
||||
long gmin = (bp->price * bp->bquan);
|
||||
|
||||
while (ct--) {
|
||||
if (bp->price * bp->bquan < gmin)
|
||||
@@ -1401,7 +1401,7 @@ menu_pick_pay_items(struct monst *shkp)
|
||||
|
||||
for (n = 0; n < eshkp->billct; n++) {
|
||||
struct obj *otmp;
|
||||
register struct bill_x *bp = &(eshkp->bill_p[n]);
|
||||
struct bill_x *bp = &(eshkp->bill_p[n]);
|
||||
|
||||
bp->queuedpay = FALSE;
|
||||
|
||||
@@ -1437,8 +1437,8 @@ menu_pick_pay_items(struct monst *shkp)
|
||||
int
|
||||
dopay(void)
|
||||
{
|
||||
register struct eshk *eshkp;
|
||||
register struct monst *shkp;
|
||||
struct eshk *eshkp;
|
||||
struct monst *shkp;
|
||||
struct monst *nxtm, *resident;
|
||||
long ltmp;
|
||||
long umoney;
|
||||
@@ -1690,7 +1690,7 @@ dopay(void)
|
||||
}
|
||||
/* now check items on bill */
|
||||
if (eshkp->billct) {
|
||||
register boolean itemize;
|
||||
boolean itemize;
|
||||
boolean queuedpay = FALSE, via_menu;
|
||||
int iprompt;
|
||||
|
||||
@@ -1742,7 +1742,7 @@ dopay(void)
|
||||
tmp = 0;
|
||||
while (tmp < eshkp->billct) {
|
||||
struct obj *otmp;
|
||||
register struct bill_x *bp = &(eshkp->bill_p[tmp]);
|
||||
struct bill_x *bp = &(eshkp->bill_p[tmp]);
|
||||
|
||||
if (queuedpay && !bp->queuedpay) {
|
||||
tmp++;
|
||||
@@ -1821,14 +1821,14 @@ dopay(void)
|
||||
*/
|
||||
static int
|
||||
dopayobj(
|
||||
register struct monst* shkp,
|
||||
register struct bill_x* bp,
|
||||
struct monst* shkp,
|
||||
struct bill_x* bp,
|
||||
struct obj** obj_p,
|
||||
int which /* 0 => used-up item, 1 => other (unpaid or lost) */,
|
||||
boolean itemize)
|
||||
|
||||
{
|
||||
register struct obj *obj = *obj_p;
|
||||
struct obj *obj = *obj_p;
|
||||
long ltmp, quan, save_quan;
|
||||
long umoney = money_cnt(gi.invent);
|
||||
int buy;
|
||||
@@ -2209,10 +2209,10 @@ finish_paybill(void)
|
||||
|
||||
/* find obj on one of the lists */
|
||||
static struct obj *
|
||||
bp_to_obj(register struct bill_x *bp)
|
||||
bp_to_obj(struct bill_x *bp)
|
||||
{
|
||||
register struct obj *obj;
|
||||
register unsigned int id = bp->bo_id;
|
||||
struct obj *obj;
|
||||
unsigned int id = bp->bo_id;
|
||||
|
||||
if (bp->useup)
|
||||
obj = o_on(id, gb.billobjs);
|
||||
@@ -2328,8 +2328,8 @@ oid_price_adjustment(struct obj* obj, unsigned int oid)
|
||||
/* calculate the value that the shk will charge for [one of] an object */
|
||||
static long
|
||||
get_cost(
|
||||
register struct obj* obj,
|
||||
register struct monst* shkp) /* if angry, impose a surcharge */
|
||||
struct obj* obj,
|
||||
struct monst* shkp) /* if angry, impose a surcharge */
|
||||
{
|
||||
long tmp = getprice(obj, FALSE),
|
||||
/* used to perform a single calculation even when multiple
|
||||
@@ -2445,7 +2445,7 @@ contained_cost(
|
||||
boolean usell,
|
||||
boolean unpaid_only)
|
||||
{
|
||||
register struct obj *otmp, *top;
|
||||
struct obj *otmp, *top;
|
||||
coordxy x, y;
|
||||
boolean on_floor, freespot;
|
||||
|
||||
@@ -2493,8 +2493,8 @@ contained_gold(
|
||||
struct obj *obj,
|
||||
boolean even_if_unknown) /* T: all gold; F: limit to known contents */
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register long value = 0L;
|
||||
struct obj *otmp;
|
||||
long value = 0L;
|
||||
|
||||
/* accumulate contained gold */
|
||||
for (otmp = obj->cobj; otmp; otmp = otmp->nobj)
|
||||
@@ -2508,11 +2508,11 @@ contained_gold(
|
||||
|
||||
static void
|
||||
dropped_container(
|
||||
register struct obj *obj,
|
||||
register struct monst *shkp,
|
||||
register boolean sale)
|
||||
struct obj *obj,
|
||||
struct monst *shkp,
|
||||
boolean sale)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
/* the "top" container is treated in the calling fn */
|
||||
for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
|
||||
@@ -2528,9 +2528,9 @@ dropped_container(
|
||||
}
|
||||
|
||||
void
|
||||
picked_container(register struct obj* obj)
|
||||
picked_container(struct obj* obj)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
/* the "top" container is treated in the calling fn */
|
||||
for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
|
||||
@@ -2591,7 +2591,7 @@ special_stock(
|
||||
|
||||
/* calculate how much the shk will pay when buying [all of] an object */
|
||||
static long
|
||||
set_cost(register struct obj* obj, register struct monst* shkp)
|
||||
set_cost(struct obj* obj, struct monst* shkp)
|
||||
{
|
||||
long tmp, unit_price = getprice(obj, TRUE), multiplier = 1L, divisor = 1L;
|
||||
|
||||
@@ -2816,12 +2816,12 @@ add_to_billobjs(struct obj* obj)
|
||||
/* recursive billing of objects within containers. */
|
||||
static void
|
||||
bill_box_content(
|
||||
register struct obj *obj,
|
||||
register boolean ininv,
|
||||
register boolean dummy,
|
||||
register struct monst *shkp)
|
||||
struct obj *obj,
|
||||
boolean ininv,
|
||||
boolean dummy,
|
||||
struct monst *shkp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
if (SchroedingersBox(obj))
|
||||
return;
|
||||
@@ -3086,12 +3086,12 @@ splitbill(struct obj *obj, struct obj *otmp)
|
||||
}
|
||||
|
||||
static void
|
||||
sub_one_frombill(register struct obj* obj, register struct monst* shkp)
|
||||
sub_one_frombill(struct obj* obj, struct monst* shkp)
|
||||
{
|
||||
register struct bill_x *bp;
|
||||
struct bill_x *bp;
|
||||
|
||||
if ((bp = onbill(obj, shkp, FALSE)) != 0) {
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
obj->unpaid = 0;
|
||||
if (bp->bquan > obj->quan) {
|
||||
@@ -3126,9 +3126,9 @@ sub_one_frombill(register struct obj* obj, register struct monst* shkp)
|
||||
|
||||
/* recursive check of unpaid objects within nested containers. */
|
||||
void
|
||||
subfrombill(register struct obj* obj, register struct monst* shkp)
|
||||
subfrombill(struct obj* obj, struct monst* shkp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
sub_one_frombill(obj, shkp);
|
||||
|
||||
@@ -3361,8 +3361,8 @@ sellobj(
|
||||
struct obj *obj,
|
||||
coordxy x, coordxy y)
|
||||
{
|
||||
register struct monst *shkp;
|
||||
register struct eshk *eshkp;
|
||||
struct monst *shkp;
|
||||
struct eshk *eshkp;
|
||||
long ltmp = 0L, cltmp = 0L, gltmp = 0L, offer, shkmoney;
|
||||
boolean saleitem, cgold = FALSE, container = Has_contents(obj);
|
||||
boolean isgold = (obj->oclass == COIN_CLASS);
|
||||
@@ -3745,9 +3745,9 @@ corpsenm_price_adj(struct obj *obj)
|
||||
}
|
||||
|
||||
static long
|
||||
getprice(register struct obj* obj, boolean shk_buying)
|
||||
getprice(struct obj* obj, boolean shk_buying)
|
||||
{
|
||||
register long tmp = (long) objects[obj->otyp].oc_cost;
|
||||
long tmp = (long) objects[obj->otyp].oc_cost;
|
||||
|
||||
if (obj->oartifact) {
|
||||
tmp = arti_cost(obj);
|
||||
@@ -3826,8 +3826,8 @@ shkcatch(
|
||||
|
||||
void
|
||||
add_damage(
|
||||
register coordxy x,
|
||||
register coordxy y,
|
||||
coordxy x,
|
||||
coordxy y,
|
||||
long cost)
|
||||
{
|
||||
struct damage *tmp_dam;
|
||||
@@ -4490,7 +4490,7 @@ shopdig(int fall)
|
||||
} else if (!um_dist(shkp->mx, shkp->my, 5)
|
||||
&& !helpless(shkp)
|
||||
&& (ESHK(shkp)->billct || ESHK(shkp)->debit)) {
|
||||
register struct obj *obj, *obj2;
|
||||
struct obj *obj, *obj2;
|
||||
|
||||
if (nolimbs(shkp->data)) {
|
||||
grabs = "knocks off";
|
||||
@@ -4566,7 +4566,7 @@ makekops(coord* mm)
|
||||
void
|
||||
pay_for_damage(const char *dmgstr, boolean cant_mollify)
|
||||
{
|
||||
register struct monst *shkp = (struct monst *) 0;
|
||||
struct monst *shkp = (struct monst *) 0;
|
||||
char shops_affected[5];
|
||||
boolean uinshp = (*u.ushops != '\0');
|
||||
char qbuf[80];
|
||||
@@ -4801,10 +4801,10 @@ costly_adjacent(
|
||||
/* called by dotalk(sounds.c) when #chatting; returns obj if location
|
||||
contains shop goods and shopkeeper is willing & able to speak */
|
||||
struct obj *
|
||||
shop_object(register coordxy x, register coordxy y)
|
||||
shop_object(coordxy x, coordxy y)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register struct monst *shkp;
|
||||
struct obj *otmp;
|
||||
struct monst *shkp;
|
||||
|
||||
shkp = shop_keeper(*in_rooms(x, y, SHOPBASE));
|
||||
if (!shkp || !inhishop(shkp))
|
||||
@@ -4883,10 +4883,10 @@ price_quote(struct obj *first_obj)
|
||||
}
|
||||
|
||||
static const char *
|
||||
shk_embellish(register struct obj* itm, long cost)
|
||||
shk_embellish(struct obj* itm, long cost)
|
||||
{
|
||||
if (!rn2(3)) {
|
||||
register int o, choice = rn2(5);
|
||||
int o, choice = rn2(5);
|
||||
|
||||
if (choice == 0)
|
||||
choice = (cost < 100L ? 1 : cost < 500L ? 2 : 3);
|
||||
@@ -4979,7 +4979,7 @@ shk_chat(struct monst* shkp)
|
||||
}
|
||||
}
|
||||
} else if (eshk->billct) {
|
||||
register long total = addupbill(shkp) + eshk->debit;
|
||||
long total = addupbill(shkp) + eshk->debit;
|
||||
|
||||
pline("%s %s that your bill comes to %ld %s.",
|
||||
Shknam(shkp),
|
||||
@@ -5206,10 +5206,10 @@ costly_gold(
|
||||
/* used in domove to block diagonal shop-exit */
|
||||
/* x,y should always be a door */
|
||||
boolean
|
||||
block_door(register coordxy x, register coordxy y)
|
||||
block_door(coordxy x, coordxy y)
|
||||
{
|
||||
register int roomno = *in_rooms(x, y, SHOPBASE);
|
||||
register struct monst *shkp;
|
||||
int roomno = *in_rooms(x, y, SHOPBASE);
|
||||
struct monst *shkp;
|
||||
|
||||
if (roomno < 0 || !IS_SHOP(roomno))
|
||||
return FALSE;
|
||||
@@ -5241,11 +5241,11 @@ block_door(register coordxy x, register coordxy y)
|
||||
/* used in domove to block diagonal shop-entry;
|
||||
u.ux, u.uy should always be a door */
|
||||
boolean
|
||||
block_entry(register coordxy x, register coordxy y)
|
||||
block_entry(coordxy x, coordxy y)
|
||||
{
|
||||
register coordxy sx, sy;
|
||||
register int roomno;
|
||||
register struct monst *shkp;
|
||||
coordxy sx, sy;
|
||||
int roomno;
|
||||
struct monst *shkp;
|
||||
|
||||
if (!(IS_DOOR(levl[u.ux][u.uy].typ)
|
||||
&& levl[u.ux][u.uy].doormask == D_BROKEN))
|
||||
|
||||
+5
-5
@@ -355,7 +355,7 @@ const struct shclass shtypes[] = {
|
||||
void
|
||||
init_shop_selection()
|
||||
{
|
||||
register int i, j, item_prob, shop_prob;
|
||||
int i, j, item_prob, shop_prob;
|
||||
|
||||
for (shop_prob = 0, i = 0; i < SIZE(shtypes); i++) {
|
||||
shop_prob += shtypes[i].prob;
|
||||
@@ -634,7 +634,7 @@ shkinit(const struct shclass* shp, struct mkroom* sroom)
|
||||
/* Said to happen sometimes, but I have never seen it. */
|
||||
/* Supposedly fixed by fdoor change in mklev.c */
|
||||
if (wizard) {
|
||||
register int j = sroom->doorct;
|
||||
int j = sroom->doorct;
|
||||
|
||||
impossible("Where is shopdoor?");
|
||||
pline("Room at (%d,%d),(%d,%d).", sroom->lx, sroom->ly, sroom->hx,
|
||||
@@ -706,7 +706,7 @@ stock_room_goodpos(struct mkroom* sroom, int rmno, int sh, int sx, int sy)
|
||||
|
||||
/* stock a newly-created room with objects */
|
||||
void
|
||||
stock_room(int shp_indx, register struct mkroom* sroom)
|
||||
stock_room(int shp_indx, struct mkroom* sroom)
|
||||
{
|
||||
/*
|
||||
* Someday soon we'll dispatch on the shdist field of shclass to do
|
||||
@@ -739,7 +739,7 @@ stock_room(int shp_indx, register struct mkroom* sroom)
|
||||
levl[sx][sy].doormask = D_LOCKED;
|
||||
|
||||
if (levl[sx][sy].doormask == D_LOCKED) {
|
||||
register int m = sx, n = sy;
|
||||
int m = sx, n = sy;
|
||||
|
||||
if (inside_shop(sx + 1, sy))
|
||||
m--;
|
||||
@@ -820,7 +820,7 @@ int
|
||||
get_shop_item(int type)
|
||||
{
|
||||
const struct shclass *shp = shtypes + type;
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
/* select an appropriate object type at random */
|
||||
for (j = rnd(100), i = 0; (j -= shp->iprobs[i].iprob) > 0; i++)
|
||||
|
||||
@@ -239,8 +239,8 @@ int
|
||||
dosit(void)
|
||||
{
|
||||
static const char sit_message[] = "sit on the %s.";
|
||||
register struct trap *trap = t_at(u.ux, u.uy);
|
||||
register int typ = levl[u.ux][u.uy].typ;
|
||||
struct trap *trap = t_at(u.ux, u.uy);
|
||||
int typ = levl[u.ux][u.uy].typ;
|
||||
|
||||
if (u.usteed) {
|
||||
You("are already sitting on %s.", mon_nam(u.usteed));
|
||||
@@ -272,7 +272,7 @@ dosit(void)
|
||||
if (OBJ_AT(u.ux, u.uy)
|
||||
/* ensure we're not standing on the precipice */
|
||||
&& !(uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
|
||||
obj = gl.level.objects[u.ux][u.uy];
|
||||
if (gy.youmonst.data->mlet == S_DRAGON && obj->oclass == COIN_CLASS) {
|
||||
|
||||
+12
-12
@@ -201,8 +201,8 @@ oracle_sound(struct monst *mtmp)
|
||||
void
|
||||
dosounds(void)
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
register int hallu, vx, vy;
|
||||
struct mkroom *sroom;
|
||||
int hallu, vx, vy;
|
||||
struct monst *mtmp;
|
||||
|
||||
if (Deaf || !flags.acoustics || u.uswallow || Underwater)
|
||||
@@ -346,7 +346,7 @@ static const char *const h_sounds[] = {
|
||||
};
|
||||
|
||||
const char *
|
||||
growl_sound(register struct monst* mtmp)
|
||||
growl_sound(struct monst* mtmp)
|
||||
{
|
||||
const char *ret;
|
||||
|
||||
@@ -397,9 +397,9 @@ growl_sound(register struct monst* mtmp)
|
||||
|
||||
/* the sounds of a seriously abused pet, including player attacking it */
|
||||
void
|
||||
growl(register struct monst* mtmp)
|
||||
growl(struct monst* mtmp)
|
||||
{
|
||||
register const char *growl_verb = 0;
|
||||
const char *growl_verb = 0;
|
||||
|
||||
if (helpless(mtmp) || mtmp->data->msound == MS_SILENT)
|
||||
return;
|
||||
@@ -422,9 +422,9 @@ growl(register struct monst* mtmp)
|
||||
|
||||
/* the sounds of mistreated pets */
|
||||
void
|
||||
yelp(register struct monst* mtmp)
|
||||
yelp(struct monst* mtmp)
|
||||
{
|
||||
register const char *yelp_verb = 0;
|
||||
const char *yelp_verb = 0;
|
||||
enum sound_effect_entries se = se_yelp;
|
||||
|
||||
if (helpless(mtmp) || !mtmp->data->msound)
|
||||
@@ -474,9 +474,9 @@ yelp(register struct monst* mtmp)
|
||||
|
||||
/* the sounds of distressed pets */
|
||||
void
|
||||
whimper(register struct monst* mtmp)
|
||||
whimper(struct monst* mtmp)
|
||||
{
|
||||
register const char *whimper_verb = 0;
|
||||
const char *whimper_verb = 0;
|
||||
enum sound_effect_entries se = se_canine_whine;
|
||||
if (helpless(mtmp) || !mtmp->data->msound)
|
||||
return;
|
||||
@@ -514,7 +514,7 @@ whimper(register struct monst* mtmp)
|
||||
|
||||
/* pet makes "I'm hungry" noises */
|
||||
void
|
||||
beg(register struct monst* mtmp)
|
||||
beg(struct monst* mtmp)
|
||||
{
|
||||
if (helpless(mtmp)
|
||||
|| !(carnivorous(mtmp->data) || herbivorous(mtmp->data)))
|
||||
@@ -675,10 +675,10 @@ mon_is_gecko(struct monst *mon)
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int /* check calls to this */
|
||||
domonnoise(register struct monst* mtmp)
|
||||
domonnoise(struct monst* mtmp)
|
||||
{
|
||||
char verbuf[BUFSZ];
|
||||
register const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */
|
||||
const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */
|
||||
*verbl_msg = 0, /* verbalize() */
|
||||
*verbl_msg_mcan = 0; /* verbalize() if cancelled */
|
||||
struct permonst *ptr = mtmp->data;
|
||||
|
||||
+14
-14
@@ -979,7 +979,7 @@ sel_set_wall_property(coordxy x, coordxy y, genericptr_t arg)
|
||||
static void
|
||||
set_wall_property(coordxy x1, coordxy y1, coordxy x2, coordxy y2, int prop)
|
||||
{
|
||||
register coordxy x, y;
|
||||
coordxy x, y;
|
||||
|
||||
x1 = max(x1, 1);
|
||||
x2 = min(x2, COLNO - 1);
|
||||
@@ -1216,7 +1216,7 @@ get_location(
|
||||
break;
|
||||
} while (++cpt < 100);
|
||||
if (cpt >= 100) {
|
||||
register int xx, yy;
|
||||
int xx, yy;
|
||||
|
||||
/* last try */
|
||||
for (xx = 0; xx < sx; xx++)
|
||||
@@ -1258,7 +1258,7 @@ set_ok_location_func(boolean (*func)(coordxy, coordxy))
|
||||
static boolean
|
||||
is_ok_location(coordxy x, coordxy y, getloc_flags_t humidity)
|
||||
{
|
||||
register int typ = levl[x][y].typ;
|
||||
int typ = levl[x][y].typ;
|
||||
|
||||
if (Is_waterlevel(&u.uz))
|
||||
return TRUE; /* accept any spot */
|
||||
@@ -1367,7 +1367,7 @@ get_free_room_loc(
|
||||
packed_coord pos)
|
||||
{
|
||||
coordxy try_x, try_y;
|
||||
register int trycnt = 0;
|
||||
int trycnt = 0;
|
||||
|
||||
get_location_coord(&try_x, &try_y, DRY, croom, pos);
|
||||
if (levl[try_x][try_y].typ != ROOM) {
|
||||
@@ -1388,8 +1388,8 @@ check_room(
|
||||
coordxy *lowy, coordxy *ddy,
|
||||
boolean vault)
|
||||
{
|
||||
register int x, y, hix = *lowx + *ddx, hiy = *lowy + *ddy;
|
||||
register struct rm *lev;
|
||||
int x, y, hix = *lowx + *ddx, hiy = *lowy + *ddy;
|
||||
struct rm *lev;
|
||||
int xlim, ylim, ymax;
|
||||
coordxy s_lowx, s_ddx, s_lowy, s_ddy;
|
||||
|
||||
@@ -2571,7 +2571,7 @@ dig_corridor(
|
||||
|
||||
/* do we have to change direction ? */
|
||||
if (dy && dix > diy) {
|
||||
register int ddx = (xx > tx) ? -1 : 1;
|
||||
int ddx = (xx > tx) ? -1 : 1;
|
||||
|
||||
crm = &levl[xx + ddx][yy];
|
||||
if (crm->typ == btyp || crm->typ == ftyp || crm->typ == SCORR) {
|
||||
@@ -2580,7 +2580,7 @@ dig_corridor(
|
||||
continue;
|
||||
}
|
||||
} else if (dx && diy > dix) {
|
||||
register int ddy = (yy > ty) ? -1 : 1;
|
||||
int ddy = (yy > ty) ? -1 : 1;
|
||||
|
||||
crm = &levl[xx][yy + ddy];
|
||||
if (crm->typ == btyp || crm->typ == ftyp || crm->typ == SCORR) {
|
||||
@@ -2788,10 +2788,10 @@ build_room(room *r, struct mkroom *mkr)
|
||||
static void
|
||||
light_region(region *tmpregion)
|
||||
{
|
||||
register boolean litstate = tmpregion->rlit ? 1 : 0;
|
||||
register int hiy = tmpregion->y2;
|
||||
register int x, y;
|
||||
register struct rm *lev;
|
||||
boolean litstate = tmpregion->rlit ? 1 : 0;
|
||||
int hiy = tmpregion->y2;
|
||||
int x, y;
|
||||
struct rm *lev;
|
||||
int lowy = tmpregion->y1;
|
||||
int lowx = tmpregion->x1, hix = tmpregion->x2;
|
||||
|
||||
@@ -2849,7 +2849,7 @@ wallify_map(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
static void
|
||||
maze1xy(coord *m, int humidity)
|
||||
{
|
||||
register int x, y, tryct = 2000;
|
||||
int x, y, tryct = 2000;
|
||||
/* tryct: normally it won't take more than ten or so tries due
|
||||
to the circumstances under which we'll be called, but the
|
||||
`humidity' screening might drastically change the chances */
|
||||
@@ -6203,7 +6203,7 @@ int
|
||||
lspo_region(lua_State *L)
|
||||
{
|
||||
coordxy dx1, dy1, dx2, dy2;
|
||||
register struct mkroom *troom;
|
||||
struct mkroom *troom;
|
||||
boolean do_arrival_room = FALSE, room_not_needed,
|
||||
irregular = FALSE, joined = TRUE;
|
||||
int rtype = OROOM, rlit = 1, needfill = 0;
|
||||
|
||||
+3
-3
@@ -233,8 +233,8 @@ deadbook(struct obj* book2)
|
||||
/* KMH -- Need ->known to avoid "_a_ Book of the Dead" */
|
||||
book2->known = 1;
|
||||
if (invocation_pos(u.ux, u.uy) && !On_stairs(u.ux, u.uy)) {
|
||||
register struct obj *otmp;
|
||||
register boolean arti1_primed = FALSE, arti2_primed = FALSE,
|
||||
struct obj *otmp;
|
||||
boolean arti1_primed = FALSE, arti2_primed = FALSE,
|
||||
arti_cursed = FALSE;
|
||||
|
||||
if (book2->cursed) {
|
||||
@@ -448,7 +448,7 @@ learn(void)
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
int
|
||||
study_book(register struct obj* spellbook)
|
||||
study_book(struct obj* spellbook)
|
||||
{
|
||||
int booktype = spellbook->otyp, i;
|
||||
boolean confused = (Confusion != 0);
|
||||
|
||||
+7
-7
@@ -55,7 +55,7 @@ somegold(long lmoney)
|
||||
* Deals in gold only, as leprechauns don't care for lesser coins.
|
||||
*/
|
||||
struct obj *
|
||||
findgold(register struct obj* argchain)
|
||||
findgold(struct obj* argchain)
|
||||
{
|
||||
struct obj *chain = argchain; /* allow arg to be nonnull */
|
||||
|
||||
@@ -68,11 +68,11 @@ findgold(register struct obj* argchain)
|
||||
* Steal gold coins only. Leprechauns don't care for lesser coins.
|
||||
*/
|
||||
void
|
||||
stealgold(register struct monst* mtmp)
|
||||
stealgold(struct monst* mtmp)
|
||||
{
|
||||
register struct obj *fgold = g_at(u.ux, u.uy);
|
||||
register struct obj *ygold;
|
||||
register long tmp;
|
||||
struct obj *fgold = g_at(u.ux, u.uy);
|
||||
struct obj *ygold;
|
||||
long tmp;
|
||||
struct monst *who;
|
||||
const char *whose, *what;
|
||||
|
||||
@@ -177,8 +177,8 @@ unstolenarm(void)
|
||||
static int
|
||||
stealarm(void)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
register struct obj *otmp;
|
||||
struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
|
||||
if (!gs.stealoid || !gs.stealmid)
|
||||
goto botm;
|
||||
|
||||
+8
-8
@@ -97,7 +97,7 @@ init_symbols(void)
|
||||
void
|
||||
init_showsyms(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAXPCHARS; i++)
|
||||
gs.showsyms[i + SYM_OFF_P] = defsyms[i].sym;
|
||||
@@ -115,7 +115,7 @@ init_showsyms(void)
|
||||
void
|
||||
init_ov_rogue_symbols(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SYM_MAX; i++)
|
||||
go.ov_rogue_syms[i] = (nhsym) 0;
|
||||
@@ -124,7 +124,7 @@ init_ov_rogue_symbols(void)
|
||||
void
|
||||
init_ov_primary_symbols(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SYM_MAX; i++)
|
||||
go.ov_primary_syms[i] = (nhsym) 0;
|
||||
@@ -169,7 +169,7 @@ get_othersym(int idx, int which_set)
|
||||
void
|
||||
init_primary_symbols(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAXPCHARS; i++)
|
||||
gp.primary_syms[i + SYM_OFF_P] = defsyms[i].sym;
|
||||
@@ -189,7 +189,7 @@ init_primary_symbols(void)
|
||||
void
|
||||
init_rogue_symbols(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/* These are defaults that can get overwritten
|
||||
later by the roguesymbols option */
|
||||
@@ -219,7 +219,7 @@ init_rogue_symbols(void)
|
||||
void
|
||||
assign_graphics(int whichset)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
switch (whichset) {
|
||||
case ROGUESET:
|
||||
@@ -255,7 +255,7 @@ assign_graphics(int whichset)
|
||||
void
|
||||
switch_symbols(int nondefault)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
if (nondefault) {
|
||||
for (i = 0; i < SYM_MAX; i++)
|
||||
@@ -764,7 +764,7 @@ savedsym_strbuf(strbuf_t *sbuf)
|
||||
|
||||
/* Parse the value of a SYMBOLS line from a config file */
|
||||
boolean
|
||||
parsesymbols(register char *opts, int which_set)
|
||||
parsesymbols(char *opts, int which_set)
|
||||
{
|
||||
int val;
|
||||
char *symname, *strval, *ch,
|
||||
|
||||
+2
-2
@@ -759,7 +759,7 @@ vault_tele(void)
|
||||
}
|
||||
|
||||
boolean
|
||||
teleport_pet(register struct monst* mtmp, boolean force_it)
|
||||
teleport_pet(struct monst* mtmp, boolean force_it)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -1109,7 +1109,7 @@ void
|
||||
level_tele(void)
|
||||
{
|
||||
static const char get_there_from[] = "get there from %s.";
|
||||
register int newlev;
|
||||
int newlev;
|
||||
d_level newlevel;
|
||||
const char *escape_by_flying = 0; /* when surviving dest of -N */
|
||||
char buf[BUFSZ];
|
||||
|
||||
+3
-3
@@ -556,7 +556,7 @@ done_timeout(int how, int which)
|
||||
void
|
||||
nh_timeout(void)
|
||||
{
|
||||
register struct prop *upp;
|
||||
struct prop *upp;
|
||||
struct kinfo *kptr;
|
||||
boolean was_flying;
|
||||
int sleeptime;
|
||||
@@ -576,7 +576,7 @@ nh_timeout(void)
|
||||
* neither is stopped if you don't have a luckstone.
|
||||
* Luck is based at 0 usually, +1 if a full moon and -1 on Friday 13th
|
||||
*/
|
||||
register int time_luck = stone_luck(FALSE);
|
||||
int time_luck = stone_luck(FALSE);
|
||||
boolean nostone = !carrying(LUCKSTONE) && !stone_luck(TRUE);
|
||||
|
||||
if (u.uluck > baseluck && (nostone || time_luck < 0))
|
||||
@@ -1782,7 +1782,7 @@ void
|
||||
do_storms(void)
|
||||
{
|
||||
int nstrike;
|
||||
register int x, y;
|
||||
int x, y;
|
||||
int dirx, diry;
|
||||
int count;
|
||||
|
||||
|
||||
+4
-4
@@ -619,7 +619,7 @@ free_ttlist(struct toptenentry *tt)
|
||||
void
|
||||
topten(int how, time_t when)
|
||||
{
|
||||
register struct toptenentry *t0, *tprev;
|
||||
struct toptenentry *t0, *tprev;
|
||||
struct toptenentry *t1;
|
||||
FILE *rfile;
|
||||
#ifdef LOGFILE
|
||||
@@ -921,7 +921,7 @@ static void
|
||||
outheader(void)
|
||||
{
|
||||
char linebuf[BUFSZ];
|
||||
register char *bp;
|
||||
char *bp;
|
||||
|
||||
Strcpy(linebuf, " No Points Name");
|
||||
bp = eos(linebuf);
|
||||
@@ -1187,7 +1187,7 @@ prscore(int argc, char **argv)
|
||||
{
|
||||
const char **players, *player0;
|
||||
int i, playerct, rank;
|
||||
register struct toptenentry *t1;
|
||||
struct toptenentry *t1;
|
||||
FILE *rfile;
|
||||
char pbuf[BUFSZ], *p;
|
||||
unsigned ln;
|
||||
@@ -1374,7 +1374,7 @@ get_rnd_toptenentry(void)
|
||||
{
|
||||
int rank, i;
|
||||
FILE *rfile;
|
||||
register struct toptenentry *tt;
|
||||
struct toptenentry *tt;
|
||||
static struct toptenentry tt_buf;
|
||||
|
||||
rfile = fopen_datafile(RECORD, "r", SCOREPREFIX);
|
||||
|
||||
+2
-2
@@ -36,8 +36,8 @@ settrack(void)
|
||||
coord *
|
||||
gettrack(coordxy x, coordxy y)
|
||||
{
|
||||
register int cnt, ndist;
|
||||
register coord *tc;
|
||||
int cnt, ndist;
|
||||
coord *tc;
|
||||
cnt = utcnt;
|
||||
for (tc = &utrack[utpnt]; cnt--;) {
|
||||
if (tc == utrack)
|
||||
|
||||
+15
-15
@@ -166,7 +166,7 @@ burnarmor(struct monst *victim)
|
||||
*/
|
||||
int
|
||||
erode_obj(
|
||||
register struct obj *otmp,
|
||||
struct obj *otmp,
|
||||
const char *ostr,
|
||||
int type,
|
||||
int ef_flags)
|
||||
@@ -355,7 +355,7 @@ erode_obj(
|
||||
*/
|
||||
boolean
|
||||
grease_protect(
|
||||
register struct obj *otmp,
|
||||
struct obj *otmp,
|
||||
const char *ostr,
|
||||
struct monst *victim)
|
||||
{
|
||||
@@ -3414,7 +3414,7 @@ feeltrap(struct trap *trap)
|
||||
static boolean
|
||||
find_random_launch_coord(struct trap *ttmp, coord *cc)
|
||||
{
|
||||
register int tmp;
|
||||
int tmp;
|
||||
boolean success = FALSE;
|
||||
coord bcc = UNDEFINED_VALUES;
|
||||
int distance;
|
||||
@@ -3592,7 +3592,7 @@ mintrap(struct monst *mtmp, unsigned mintrapflags)
|
||||
}
|
||||
trap_result = mtmp->mtrapped ? Trap_Caught_Mon : Trap_Effect_Finished;
|
||||
} else {
|
||||
register int tt = trap->ttyp;
|
||||
int tt = trap->ttyp;
|
||||
boolean forcetrap = ((mintrapflags & FORCETRAP) != 0);
|
||||
boolean forcebungle = (mintrapflags & FORCEBUNGLE) != 0;
|
||||
/* monster has seen such a trap before */
|
||||
@@ -3821,7 +3821,7 @@ float_down(
|
||||
long hmask,
|
||||
long emask) /* might cancel timeout */
|
||||
{
|
||||
register struct trap *trap = (struct trap *) 0;
|
||||
struct trap *trap = (struct trap *) 0;
|
||||
d_level current_dungeon_level;
|
||||
boolean no_msg = FALSE;
|
||||
|
||||
@@ -4113,7 +4113,7 @@ dofiretrap(
|
||||
static void
|
||||
domagictrap(void)
|
||||
{
|
||||
register int fate = rnd(20);
|
||||
int fate = rnd(20);
|
||||
|
||||
/* What happened to the poor sucker? */
|
||||
|
||||
@@ -4687,8 +4687,8 @@ emergency_disrobe(boolean *lostsome)
|
||||
int invc = inv_cnt(TRUE);
|
||||
|
||||
while (near_capacity() > (Punished ? UNENCUMBERED : SLT_ENCUMBER)) {
|
||||
register struct obj *obj, *otmp = (struct obj *) 0;
|
||||
register int i;
|
||||
struct obj *obj, *otmp = (struct obj *) 0;
|
||||
int i;
|
||||
|
||||
/* Pick a random object */
|
||||
if (invc > 0) {
|
||||
@@ -5592,7 +5592,7 @@ untrap(
|
||||
coordxy rx, coordxy ry,
|
||||
struct obj *container)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
coordxy x, y;
|
||||
int ch;
|
||||
struct trap *ttmp;
|
||||
@@ -6014,11 +6014,11 @@ openfallingtrap(
|
||||
/* only called when the player is doing something to the chest directly */
|
||||
boolean
|
||||
chest_trap(
|
||||
register struct obj *obj,
|
||||
register int bodypart,
|
||||
struct obj *obj,
|
||||
int bodypart,
|
||||
boolean disarm)
|
||||
{
|
||||
register struct obj *otmp = obj, *otmp2;
|
||||
struct obj *otmp = obj, *otmp2;
|
||||
char buf[80];
|
||||
const char *msg;
|
||||
coord cc;
|
||||
@@ -6215,7 +6215,7 @@ chest_trap(
|
||||
struct trap *
|
||||
t_at(coordxy x, coordxy y)
|
||||
{
|
||||
register struct trap *trap = gf.ftrap;
|
||||
struct trap *trap = gf.ftrap;
|
||||
|
||||
while (trap) {
|
||||
if (trap->tx == x && trap->ty == y)
|
||||
@@ -6388,7 +6388,7 @@ delfloortrap(struct trap *ttmp)
|
||||
|| (ttmp->ttyp == TELEP_TRAP) || (ttmp->ttyp == LEVEL_TELEP)
|
||||
|| (ttmp->ttyp == WEB) || (ttmp->ttyp == MAGIC_TRAP)
|
||||
|| (ttmp->ttyp == ANTI_MAGIC))) {
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
|
||||
if (u_at(ttmp->tx, ttmp->ty)) {
|
||||
if (u.utraptype != TT_BURIEDBALL)
|
||||
@@ -6504,7 +6504,7 @@ static const char lava_killer[] = "molten lava";
|
||||
boolean
|
||||
lava_effects(void)
|
||||
{
|
||||
register struct obj *obj, *obj2;
|
||||
struct obj *obj, *obj2;
|
||||
boolean usurvive, boil_away;
|
||||
unsigned protect_oid = 0;
|
||||
int burncount = 0, burnmesgcount = 0;
|
||||
|
||||
+3
-3
@@ -4757,7 +4757,7 @@ damageum(
|
||||
int
|
||||
explum(struct monst *mdef, struct attack *mattk)
|
||||
{
|
||||
register int tmp = d((int) mattk->damn, (int) mattk->damd);
|
||||
int tmp = d((int) mattk->damn, (int) mattk->damd);
|
||||
|
||||
switch (mattk->adtyp) {
|
||||
case AD_BLND:
|
||||
@@ -4825,8 +4825,8 @@ static int
|
||||
gulpum(struct monst *mdef, struct attack *mattk)
|
||||
{
|
||||
static char msgbuf[BUFSZ]; /* for gn.nomovemsg */
|
||||
register int tmp;
|
||||
register int dam = d((int) mattk->damn, (int) mattk->damd);
|
||||
int tmp;
|
||||
int dam = d((int) mattk->damn, (int) mattk->damd);
|
||||
boolean fatal_gulp,
|
||||
u_digest = digests(gy.youmonst.data),
|
||||
u_enfold = enfolds(gy.youmonst.data);
|
||||
|
||||
+3
-3
@@ -190,7 +190,7 @@ grddead(struct monst *grd)
|
||||
static boolean
|
||||
in_fcorridor(struct monst *grd, coordxy x, coordxy y)
|
||||
{
|
||||
register int fci;
|
||||
int fci;
|
||||
struct egd *egrd = EGD(grd);
|
||||
|
||||
for (fci = egrd->fcbeg; fci < egrd->fcend; fci++)
|
||||
@@ -242,7 +242,7 @@ vault_summon_gd(void)
|
||||
char
|
||||
vault_occupied(char *array)
|
||||
{
|
||||
register char *ptr;
|
||||
char *ptr;
|
||||
|
||||
for (ptr = array; *ptr; ptr++)
|
||||
if (gr.rooms[*ptr - ROOMOFFSET].rtype == VAULT)
|
||||
@@ -370,7 +370,7 @@ invault(void)
|
||||
}
|
||||
}
|
||||
while (levl[x][y].typ == ROOM) {
|
||||
register int dx, dy;
|
||||
int dx, dy;
|
||||
|
||||
dx = (gdx > x) ? 1 : (gdx < x) ? -1 : 0;
|
||||
dy = (gdy > y) ? 1 : (gdy < y) ? -1 : 0;
|
||||
|
||||
+22
-22
@@ -201,8 +201,8 @@ void
|
||||
vision_reset(void)
|
||||
{
|
||||
int y;
|
||||
register int x, i, dig_left, block;
|
||||
register struct rm *lev;
|
||||
int x, i, dig_left, block;
|
||||
struct rm *lev;
|
||||
|
||||
/* Start out with cs0 as our current array */
|
||||
gv.viz_array = cs_rows0;
|
||||
@@ -263,8 +263,8 @@ vision_reset(void)
|
||||
static void
|
||||
get_unused_cs(seenV ***rows, coordxy **rmin, coordxy **rmax)
|
||||
{
|
||||
register int row;
|
||||
register coordxy *nrmin, *nrmax;
|
||||
int row;
|
||||
coordxy *nrmin, *nrmax;
|
||||
|
||||
if (gv.viz_array == cs_rows0) {
|
||||
*rows = cs_rows1;
|
||||
@@ -305,7 +305,7 @@ rogue_vision(seenV **next, coordxy *rmin, coordxy *rmax)
|
||||
{
|
||||
int rnum = levl[u.ux][u.uy].roomno - ROOMOFFSET; /* no SHARED... */
|
||||
int start, stop, in_door, xhi, xlo, yhi, ylo;
|
||||
register int zx, zy;
|
||||
int zx, zy;
|
||||
|
||||
/* If in a lit room, we are able to see to its boundaries. */
|
||||
/* If dark, set COULD_SEE so various spells work -dlc */
|
||||
@@ -403,7 +403,7 @@ static int new_angle(struct rm *, unsigned char *, int, int);
|
||||
static int
|
||||
new_angle(struct rm *lev, unsigned char *sv, int row, int col)
|
||||
{
|
||||
register int res = *sv;
|
||||
int res = *sv;
|
||||
|
||||
/*
|
||||
* Do extra checks for crosswalls and T walls if we see them from
|
||||
@@ -513,8 +513,8 @@ vision_recalc(int control)
|
||||
int row = 0; /* row counter (outer loop) */
|
||||
int start, stop; /* inner loop starting/stopping index */
|
||||
int dx, dy; /* one step from a lit door or lit wall (see below) */
|
||||
register int col; /* inner loop counter */
|
||||
register struct rm *lev; /* pointer to current pos */
|
||||
int col; /* inner loop counter */
|
||||
struct rm *lev; /* pointer to current pos */
|
||||
struct rm *flev; /* pointer to position in "front" of current pos */
|
||||
const seenV *sv; /* ptr to seen angle bits */
|
||||
int oldseenv; /* previous seenv value */
|
||||
@@ -1182,7 +1182,7 @@ static genericptr_t varg;
|
||||
#define q1_path(srow, scol, y2, x2, label) \
|
||||
{ \
|
||||
int dx, dy; \
|
||||
register int k, err, x, y, dxs, dys; \
|
||||
int k, err, x, y, dxs, dys; \
|
||||
\
|
||||
x = (scol); \
|
||||
y = (srow); \
|
||||
@@ -1230,7 +1230,7 @@ static genericptr_t varg;
|
||||
#define q4_path(srow, scol, y2, x2, label) \
|
||||
{ \
|
||||
int dx, dy; \
|
||||
register int k, err, x, y, dxs, dys; \
|
||||
int k, err, x, y, dxs, dys; \
|
||||
\
|
||||
x = (scol); \
|
||||
y = (srow); \
|
||||
@@ -1279,7 +1279,7 @@ static genericptr_t varg;
|
||||
#define q2_path(srow, scol, y2, x2, label) \
|
||||
{ \
|
||||
int dx, dy; \
|
||||
register int k, err, x, y, dxs, dys; \
|
||||
int k, err, x, y, dxs, dys; \
|
||||
\
|
||||
x = (scol); \
|
||||
y = (srow); \
|
||||
@@ -1327,7 +1327,7 @@ static genericptr_t varg;
|
||||
#define q3_path(srow, scol, y2, x2, label) \
|
||||
{ \
|
||||
int dx, dy; \
|
||||
register int k, err, x, y, dxs, dys; \
|
||||
int k, err, x, y, dxs, dys; \
|
||||
\
|
||||
x = (scol); \
|
||||
y = (srow); \
|
||||
@@ -1389,7 +1389,7 @@ static int
|
||||
_q1_path(int scol, int srow, int y2, int x2)
|
||||
{
|
||||
int dx, dy;
|
||||
register int k, err, x, y, dxs, dys;
|
||||
int k, err, x, y, dxs, dys;
|
||||
|
||||
x = scol;
|
||||
y = srow;
|
||||
@@ -1436,7 +1436,7 @@ static int
|
||||
_q4_path(int scol, int srow, int y2, int x2)
|
||||
{
|
||||
int dx, dy;
|
||||
register int k, err, x, y, dxs, dys;
|
||||
int k, err, x, y, dxs, dys;
|
||||
|
||||
x = scol;
|
||||
y = srow;
|
||||
@@ -1483,7 +1483,7 @@ static int
|
||||
_q2_path(int scol, int srow, int y2, int x2)
|
||||
{
|
||||
int dx, dy;
|
||||
register int k, err, x, y, dxs, dys;
|
||||
int k, err, x, y, dxs, dys;
|
||||
|
||||
x = scol;
|
||||
y = srow;
|
||||
@@ -1530,7 +1530,7 @@ static int
|
||||
_q3_path(int scol, int srow, int y2, int x2)
|
||||
{
|
||||
int dx, dy;
|
||||
register int k, err, x, y, dxs, dys;
|
||||
int k, err, x, y, dxs, dys;
|
||||
|
||||
x = scol;
|
||||
y = srow;
|
||||
@@ -1644,8 +1644,8 @@ right_side(
|
||||
int nrow; /* new row (calculate once) */
|
||||
int deeper; /* if TRUE, call self as needed */
|
||||
int result; /* set by q?_path() */
|
||||
register int i; /* loop counter */
|
||||
register seenV *rowp = NULL; /* row optimization */
|
||||
int i; /* loop counter */
|
||||
seenV *rowp = NULL; /* row optimization */
|
||||
coordxy *row_min = NULL; /* left most [used by macro set_min()] */
|
||||
coordxy *row_max = NULL; /* right most [used by macro set_max()] */
|
||||
int lim_max; /* right most limit of circle */
|
||||
@@ -1832,8 +1832,8 @@ left_side(
|
||||
const coordxy *limits)
|
||||
{
|
||||
int left, left_edge, nrow, deeper, result;
|
||||
register int i;
|
||||
register seenV *rowp = NULL;
|
||||
int i;
|
||||
seenV *rowp = NULL;
|
||||
coordxy *row_min = NULL;
|
||||
coordxy *row_max = NULL;
|
||||
int lim_min;
|
||||
@@ -1977,7 +1977,7 @@ view_from(
|
||||
void (*func)(coordxy, coordxy, genericptr_t),
|
||||
genericptr_t arg)
|
||||
{
|
||||
register int i; /* loop counter */
|
||||
int i; /* loop counter */
|
||||
seenV *rowp; /* optimization for setting could_see */
|
||||
int nrow; /* the next row */
|
||||
int left; /* the left-most visible column */
|
||||
@@ -2085,7 +2085,7 @@ do_clear_area(
|
||||
view_from(srow, scol, (seenV **) 0, (coordxy *) 0, (coordxy *) 0,
|
||||
range, func, arg);
|
||||
} else {
|
||||
register int x;
|
||||
int x;
|
||||
int y, min_x, max_x, max_y, offset;
|
||||
const coordxy *limits;
|
||||
boolean override_vision;
|
||||
|
||||
+3
-3
@@ -510,7 +510,7 @@ static NEARDATA const int pwep[] = { HALBERD, BARDICHE, SPETUM,
|
||||
struct obj *
|
||||
select_rwep(struct monst *mtmp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
struct obj *mwep;
|
||||
boolean mweponly;
|
||||
int i;
|
||||
@@ -655,8 +655,8 @@ static const NEARDATA short hwep[] = {
|
||||
struct obj *
|
||||
select_hwep(struct monst *mtmp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
register int i;
|
||||
struct obj *otmp;
|
||||
int i;
|
||||
boolean strong = strongmonst(mtmp->data);
|
||||
boolean wearing_shield = (mtmp->misc_worn_check & W_ARMS) != 0;
|
||||
|
||||
|
||||
+1
-1
@@ -453,7 +453,7 @@ dowield(void)
|
||||
int
|
||||
doswapweapon(void)
|
||||
{
|
||||
register struct obj *oldwep, *oldswap;
|
||||
struct obj *oldwep, *oldswap;
|
||||
int result = 0;
|
||||
|
||||
/* May we attempt this? */
|
||||
|
||||
+4
-4
@@ -252,7 +252,7 @@ check_tty_wincap2(unsigned long wincap2)
|
||||
static struct win_choices *
|
||||
win_choices_find(const char *s)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; winchoices[i].procs; i++) {
|
||||
if (!strcmpi(s, winchoices[i].procs->name)) {
|
||||
@@ -341,7 +341,7 @@ choose_windows(const char *s)
|
||||
void
|
||||
addto_windowchain(const char *s)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; winchoices[i].procs; i++) {
|
||||
if ('+' != winchoices[i].procs->name[0])
|
||||
@@ -944,7 +944,7 @@ genl_status_update(
|
||||
{
|
||||
char newbot1[MAXCO], newbot2[MAXCO];
|
||||
long cond, *condptr = (long *) ptr;
|
||||
register int i;
|
||||
int i;
|
||||
unsigned pass, lndelta;
|
||||
enum statusfields idx1, idx2, *fieldlist;
|
||||
char *nb, *text = (char *) ptr;
|
||||
@@ -1857,7 +1857,7 @@ int select_menu(winid window, int how, menu_item **menu_list)
|
||||
}
|
||||
|
||||
void
|
||||
getlin(const char *query, register char *bufp)
|
||||
getlin(const char *query, char *bufp)
|
||||
{
|
||||
boolean old_bot_disabled = gb.bot_disabled;
|
||||
|
||||
|
||||
+10
-10
@@ -105,7 +105,7 @@ amulet(void)
|
||||
int
|
||||
mon_has_amulet(struct monst *mtmp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
|
||||
if (otmp->otyp == AMULET_OF_YENDOR)
|
||||
@@ -116,7 +116,7 @@ mon_has_amulet(struct monst *mtmp)
|
||||
int
|
||||
mon_has_special(struct monst *mtmp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
|
||||
if (otmp->otyp == AMULET_OF_YENDOR
|
||||
@@ -167,7 +167,7 @@ which_arti(int mask)
|
||||
static boolean
|
||||
mon_has_arti(struct monst *mtmp, short otyp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) {
|
||||
if (otyp) {
|
||||
@@ -186,7 +186,7 @@ mon_has_arti(struct monst *mtmp, short otyp)
|
||||
static struct monst *
|
||||
other_mon_has_arti(struct monst *mtmp, short otyp)
|
||||
{
|
||||
register struct monst *mtmp2;
|
||||
struct monst *mtmp2;
|
||||
|
||||
for (mtmp2 = fmon; mtmp2; mtmp2 = mtmp2->nmon)
|
||||
/* no need for !DEADMONSTER check here since they have no inventory */
|
||||
@@ -204,7 +204,7 @@ other_mon_has_arti(struct monst *mtmp, short otyp)
|
||||
static struct obj *
|
||||
on_ground(short otyp)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
|
||||
for (otmp = fobj; otmp; otmp = otmp->nobj)
|
||||
if (otyp) {
|
||||
@@ -238,9 +238,9 @@ you_have(int mask)
|
||||
static unsigned long
|
||||
target_on(int mask, struct monst *mtmp)
|
||||
{
|
||||
register short otyp;
|
||||
register struct obj *otmp;
|
||||
register struct monst *mtmp2;
|
||||
short otyp;
|
||||
struct obj *otmp;
|
||||
struct monst *mtmp2;
|
||||
|
||||
if (!M_Wants(mask))
|
||||
return (unsigned long) STRAT_NONE;
|
||||
@@ -481,7 +481,7 @@ has_aggravatables(struct monst *mon)
|
||||
void
|
||||
aggravate(void)
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
struct monst *mtmp;
|
||||
boolean in_w_tower = In_W_tower(u.ux, u.uy, &u.uz);
|
||||
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
@@ -504,7 +504,7 @@ aggravate(void)
|
||||
void
|
||||
clonewiz(void)
|
||||
{
|
||||
register struct monst *mtmp2;
|
||||
struct monst *mtmp2;
|
||||
|
||||
if ((mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, MM_NOWAIT))
|
||||
!= 0) {
|
||||
|
||||
+8
-8
@@ -48,9 +48,9 @@ const struct worn {
|
||||
void
|
||||
setworn(struct obj *obj, long mask)
|
||||
{
|
||||
register const struct worn *wp;
|
||||
register struct obj *oobj;
|
||||
register int p;
|
||||
const struct worn *wp;
|
||||
struct obj *oobj;
|
||||
int p;
|
||||
|
||||
if ((mask & (W_ARM | I_SPECIAL)) == (W_ARM | I_SPECIAL)) {
|
||||
/* restoring saved game; no properties are conferred via skin */
|
||||
@@ -121,8 +121,8 @@ setworn(struct obj *obj, long mask)
|
||||
void
|
||||
setnotworn(struct obj *obj)
|
||||
{
|
||||
register const struct worn *wp;
|
||||
register int p;
|
||||
const struct worn *wp;
|
||||
int p;
|
||||
|
||||
if (!obj)
|
||||
return;
|
||||
@@ -619,7 +619,7 @@ update_mon_extrinsics(
|
||||
int
|
||||
find_mac(struct monst *mon)
|
||||
{
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
int base = mon->data->ac;
|
||||
long mwflags = mon->misc_worn_check;
|
||||
|
||||
@@ -912,7 +912,7 @@ which_armor(struct monst *mon, long flag)
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
|
||||
for (obj = mon->minvent; obj; obj = obj->nobj)
|
||||
if (obj->owornmask & flag)
|
||||
@@ -1061,7 +1061,7 @@ nxt_unbypassed_loot(Loot *lootarray, struct obj *listhead)
|
||||
void
|
||||
mon_break_armor(struct monst *mon, boolean polyspot)
|
||||
{
|
||||
register struct obj *otmp;
|
||||
struct obj *otmp;
|
||||
struct permonst *mdat = mon->data;
|
||||
boolean vis = cansee(mon->mx, mon->my),
|
||||
handless_or_tiny = (nohands(mdat) || verysmall(mdat)),
|
||||
|
||||
+2
-2
@@ -102,9 +102,9 @@ write_ok(struct obj *obj)
|
||||
int
|
||||
dowrite(struct obj *pen)
|
||||
{
|
||||
register struct obj *paper;
|
||||
struct obj *paper;
|
||||
char namebuf[BUFSZ] = DUMMY, *nm, *bp;
|
||||
register struct obj *new_obj;
|
||||
struct obj *new_obj;
|
||||
int basecost, actualcost;
|
||||
int curseval;
|
||||
char qbuf[QBUFSZ];
|
||||
|
||||
@@ -1438,7 +1438,7 @@ obj_shudders(struct obj *obj)
|
||||
static void
|
||||
polyuse(struct obj *objhdr, int mat, int minwt)
|
||||
{
|
||||
register struct obj *otmp, *otmp2;
|
||||
struct obj *otmp, *otmp2;
|
||||
|
||||
for (otmp = objhdr; minwt > 0 && otmp; otmp = otmp2) {
|
||||
otmp2 = otmp->nexthere;
|
||||
@@ -2348,7 +2348,7 @@ bhitpile(
|
||||
coordxy tx, coordxy ty, /* target location */
|
||||
schar zz) /* direction for up/down zaps */
|
||||
{
|
||||
register struct obj *otmp, *next_obj;
|
||||
struct obj *otmp, *next_obj;
|
||||
boolean hidingunder, first;
|
||||
int prevotyp, hitanything = 0;
|
||||
|
||||
@@ -4011,7 +4011,7 @@ bhit(
|
||||
struct monst *
|
||||
boomhit(struct obj *obj, coordxy dx, coordxy dy)
|
||||
{
|
||||
register int i, ct;
|
||||
int i, ct;
|
||||
int boom; /* showsym[] index */
|
||||
struct monst *mtmp;
|
||||
boolean counterclockwise = URIGHTY; /* ULEFTY => clockwise */
|
||||
@@ -4207,7 +4207,7 @@ zhitm(
|
||||
&& !(type > 0 && engulfing_u(mon))
|
||||
&& nd > 2) {
|
||||
/* sufficiently powerful lightning blinds monsters */
|
||||
register unsigned rnd_tmp = rnd(50);
|
||||
unsigned rnd_tmp = rnd(50);
|
||||
mon->mcansee = 0;
|
||||
if ((mon->mblinded + rnd_tmp) > 127)
|
||||
mon->mblinded = 127;
|
||||
@@ -4599,7 +4599,7 @@ dobuzz(
|
||||
boolean say) /* announce out of sight hit/miss events if true */
|
||||
{
|
||||
int range, fltyp = zaptype(type), damgtype = fltyp % 10;
|
||||
register coordxy lsx, lsy;
|
||||
coordxy lsx, lsy;
|
||||
struct monst *mon;
|
||||
coord save_bhitpos;
|
||||
boolean shopdamage = FALSE,
|
||||
@@ -4613,7 +4613,7 @@ dobuzz(
|
||||
spell_type = is_hero_spell(type) ? SPE_MAGIC_MISSILE + damgtype : 0;
|
||||
|
||||
if (u.uswallow) {
|
||||
register int tmp;
|
||||
int tmp;
|
||||
|
||||
if (type < 0)
|
||||
return;
|
||||
@@ -5715,7 +5715,7 @@ destroy_one_item(struct obj *obj, int osym, int dmgtyp)
|
||||
void
|
||||
destroy_item(int osym, int dmgtyp)
|
||||
{
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
int i, deferral_indx = 0;
|
||||
/* 1+52+1: try to handle a full inventory; it doesn't matter if
|
||||
inventory actually has more, even if everything should be deferred */
|
||||
|
||||
@@ -67,7 +67,7 @@ nhmain(int argc, char *argv[])
|
||||
#endif /* __EMSCRIPTEN__ */
|
||||
{
|
||||
#ifdef CHDIR
|
||||
register char *dir;
|
||||
char *dir;
|
||||
#endif
|
||||
NHFILE *nhfp;
|
||||
boolean exact_username;
|
||||
@@ -535,7 +535,7 @@ whoami(void)
|
||||
* somebody else's name.
|
||||
*/
|
||||
if (!*gp.plname) {
|
||||
register const char *s;
|
||||
const char *s;
|
||||
|
||||
s = nh_getenv("USER");
|
||||
if (!s || !*s)
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ boolean
|
||||
pcmain(int argc, char *argv[])
|
||||
{
|
||||
NHFILE *nhfp;
|
||||
register char *dir;
|
||||
char *dir;
|
||||
#if defined(MSDOS)
|
||||
char *envp = NULL;
|
||||
char *sptr = NULL;
|
||||
|
||||
+4
-4
@@ -39,7 +39,7 @@ static int eraseoldlocks(void);
|
||||
static int
|
||||
eraseoldlocks(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/* cannot use maxledgerno() here, because we need to find a lock name
|
||||
* before starting everything (including the dungeon initialization
|
||||
@@ -63,7 +63,7 @@ eraseoldlocks(void)
|
||||
void
|
||||
getlock(void)
|
||||
{
|
||||
register int fd, c, ci, ct;
|
||||
int fd, c, ci, ct;
|
||||
int fcmask = FCMASK;
|
||||
char tbuf[BUFSZ];
|
||||
const char *fq_lock;
|
||||
@@ -201,13 +201,13 @@ gotlock:
|
||||
#endif /* PC_LOCKING */
|
||||
|
||||
void
|
||||
regularize(register char *s)
|
||||
regularize(char *s)
|
||||
/*
|
||||
* normalize file name - we don't like .'s, /'s, spaces, and
|
||||
* lots of other things
|
||||
*/
|
||||
{
|
||||
register char *lp;
|
||||
char *lp;
|
||||
|
||||
for (lp = s; *lp; lp++)
|
||||
if (*lp <= ' ' || *lp == '"' || (*lp >= '*' && *lp <= ',')
|
||||
|
||||
+2
-2
@@ -489,8 +489,8 @@ tputs(const char *string, /* characters to output */
|
||||
int (*output_func)(int)) /* actual output routine;
|
||||
* return value ignored */
|
||||
{
|
||||
register int c, num = 0;
|
||||
register const char *p = string;
|
||||
int c, num = 0;
|
||||
const char *p = string;
|
||||
|
||||
if (!p || !*p)
|
||||
return;
|
||||
|
||||
@@ -254,7 +254,7 @@ outdec(char *p, FILE *f, int n)
|
||||
|
||||
char *
|
||||
index(sp, c)
|
||||
register char *sp, c;
|
||||
char *sp, c;
|
||||
{
|
||||
do {
|
||||
if (*sp == c)
|
||||
|
||||
+3
-3
@@ -79,7 +79,7 @@ veryold(int fd)
|
||||
static int
|
||||
eraseoldlocks(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
#if defined(HANGUPHANDLING)
|
||||
gp.program_state.preserve_locks = 0; /* not required but shows intent */
|
||||
@@ -256,7 +256,7 @@ getlock(void)
|
||||
void
|
||||
regularize(char *s)
|
||||
{
|
||||
register char *lp;
|
||||
char *lp;
|
||||
|
||||
while ((lp = strchr(s, '.')) != 0 || (lp = strchr(s, '/')) != 0
|
||||
|| (lp = strchr(s, ' ')) != 0)
|
||||
@@ -329,7 +329,7 @@ dosh(void)
|
||||
int
|
||||
child(int wt)
|
||||
{
|
||||
register int f;
|
||||
int f;
|
||||
|
||||
suspend_nhwindows((char *) 0); /* also calls end_screen() */
|
||||
#ifdef _M_UNIX
|
||||
|
||||
+2
-2
@@ -249,7 +249,7 @@ same_dir(const char *d1, const char *d2)
|
||||
int
|
||||
c__translate(int code)
|
||||
{
|
||||
register int trans;
|
||||
int trans;
|
||||
|
||||
/* clang-format off */
|
||||
/* *INDENT-OFF* */
|
||||
@@ -309,7 +309,7 @@ vms_basename(const char *name, boolean keep_suffix)
|
||||
{
|
||||
unsigned len;
|
||||
char *base, *base_p, *xtra_p;
|
||||
register const char *name_p;
|
||||
const char *name_p;
|
||||
|
||||
/* skip directory/path */
|
||||
if ((name_p = strrchr(name, ']')) != 0)
|
||||
|
||||
+3
-3
@@ -125,7 +125,7 @@ parse_brdcst(char *buf) /* called by parse_next_broadcast() */
|
||||
char *txt;
|
||||
const char *nam, *cmd;
|
||||
#ifdef SHELL /* only parse if spawned commands are enabled */
|
||||
register char *p, *q;
|
||||
char *p, *q;
|
||||
boolean is_jnet_send;
|
||||
char user[127 + 1], node[127 + 1], sentinel;
|
||||
|
||||
@@ -305,10 +305,10 @@ parse_brdcst(char *buf) /* called by parse_next_broadcast() */
|
||||
|
||||
/* filter out non-printable characters and redundant noise
|
||||
*/
|
||||
static void filter_brdcst(register char *buf) /* called by parse_next_broadcast() */
|
||||
static void filter_brdcst(char *buf) /* called by parse_next_broadcast() */
|
||||
/* in: original text; out: filtered text */
|
||||
{
|
||||
register char c, *p, *buf_p;
|
||||
char c, *p, *buf_p;
|
||||
|
||||
/* filter the text; restrict consecutive spaces or dots to just two */
|
||||
for (p = buf_p = buf; *buf_p; buf_p++) {
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
NHFILE *nhfp;
|
||||
#ifdef CHDIR
|
||||
register char *dir;
|
||||
char *dir;
|
||||
#endif
|
||||
boolean resuming = FALSE; /* assume new game */
|
||||
|
||||
@@ -388,7 +388,7 @@ whoami(void)
|
||||
* Note that we trust the user here; it is possible to play under
|
||||
* somebody else's name.
|
||||
*/
|
||||
register char *s;
|
||||
char *s;
|
||||
|
||||
if (!*gp.plname && (s = nh_getenv("USER")))
|
||||
(void) lcase(strncpy(gp.plname, s, sizeof(gp.plname) - 1));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user