avoid use of variables near and far
Some recent testing with a multi-platform compiler encountered difficulty with the use of a variable 'near' (and presumably 'far', but we don't have any of those in the source tree) due to reserved word extensions. Avoid using that as a variable name.
This commit is contained in:
+3
-3
@@ -1338,14 +1338,14 @@ rloc_to_core(
|
|||||||
if (domsg && (canspotmon(mtmp) || appearmsg)) {
|
if (domsg && (canspotmon(mtmp) || appearmsg)) {
|
||||||
int du = distu(x, y), olddu;
|
int du = distu(x, y), olddu;
|
||||||
const char *next = (du <= 2) ? " next to you" : 0, /* next2u() */
|
const char *next = (du <= 2) ? " next to you" : 0, /* next2u() */
|
||||||
*near = (du <= BOLT_LIM * BOLT_LIM) ? " close by" : 0;
|
*nearu = (du <= BOLT_LIM * BOLT_LIM) ? " close by" : 0;
|
||||||
|
|
||||||
mtmp->mstrategy &= ~STRAT_APPEARMSG; /* one chance only */
|
mtmp->mstrategy &= ~STRAT_APPEARMSG; /* one chance only */
|
||||||
if (telemsg && (couldsee(x, y) || sensemon(mtmp))) {
|
if (telemsg && (couldsee(x, y) || sensemon(mtmp))) {
|
||||||
pline("%s vanishes and reappears%s.",
|
pline("%s vanishes and reappears%s.",
|
||||||
Monnam(mtmp),
|
Monnam(mtmp),
|
||||||
next ? next
|
next ? next
|
||||||
: near ? near
|
: nearu ? nearu
|
||||||
: ((olddu = distu(oldx, oldy)) == du) ? ""
|
: ((olddu = distu(oldx, oldy)) == du) ? ""
|
||||||
: (du < olddu) ? " closer to you"
|
: (du < olddu) ? " closer to you"
|
||||||
: " farther away");
|
: " farther away");
|
||||||
@@ -1354,7 +1354,7 @@ rloc_to_core(
|
|||||||
appearmsg ? Amonnam(mtmp) : Monnam(mtmp),
|
appearmsg ? Amonnam(mtmp) : Monnam(mtmp),
|
||||||
appearmsg ? "suddenly " : "",
|
appearmsg ? "suddenly " : "",
|
||||||
!Blind ? "appears" : "arrives",
|
!Blind ? "appears" : "arrives",
|
||||||
next ? next : near ? near : "");
|
next ? next : nearu ? nearu : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user