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