/* Supply nhassert macro if not supplied by port */
#ifndef nhassert
-#define nhassert(expression) ((void)0)
+#define nhassert(e) ((void)0)
#endif
+
#endif /* GLOBAL_H */
sfcap = default_sfinfo;
sfrestinfo = default_sfinfo;
sfsaveinfo = default_sfinfo;
-};
+}
/*decl.c*/
int tx = u.tx;
int ty = u.ty;
boolean ret;
- int g = glyph_at(x,y);
+ int glyph = glyph_at(x,y);
if (x == u.ux && y == u.uy)
return TRUE;
- if (isok(x,y) && glyph_is_cmap(g) && S_stone == glyph_to_cmap(g)
+ if (isok(x,y) && glyph_is_cmap(glyph) && S_stone == glyph_to_cmap(glyph)
&& !levl[x][y].seenv)
return FALSE;
u.tx = x;
int k;
time_t timeresult = (time_t) 0;
struct tm t, *lt;
- char *g, *p, y[5], mo[3], md[3], h[3], mi[3], s[3];
+ char *d, *p, y[5], mo[3], md[3], h[3], mi[3], s[3];
if (buf && strlen(buf) == 14) {
- g = buf;
+ d = buf;
p = y; /* year */
for (k = 0; k < 4; ++k)
- *p++ = *g++;
+ *p++ = *d++;
*p = '\0';
p = mo; /* month */
for (k = 0; k < 2; ++k)
- *p++ = *g++;
+ *p++ = *d++;
*p = '\0';
p = md; /* day */
for (k = 0; k < 2; ++k)
- *p++ = *g++;
+ *p++ = *d++;
*p = '\0';
p = h; /* hour */
for (k = 0; k < 2; ++k)
- *p++ = *g++;
+ *p++ = *d++;
*p = '\0';
p = mi; /* minutes */
for (k = 0; k < 2; ++k)
- *p++ = *g++;
+ *p++ = *d++;
*p = '\0';
p = s; /* seconds */
for (k = 0; k < 2; ++k)
- *p++ = *g++;
+ *p++ = *d++;
*p = '\0';
lt = getlt();
if (lt) {
} else if (!strcmpi(bp, "looking glass")) {
; /* avoid false hit on "* glass" */
} else if (!BSTRCMPI(bp, p - 6, " glass") || !strcmpi(bp, "glass")) {
- register char *g = bp;
+ register char *s = bp;
/* treat "broken glass" as a non-existent item; since "broken" is
also a chest/box prefix it might have been stripped off above */
- if (broken || strstri(g, "broken"))
+ if (broken || strstri(s, "broken"))
return (struct obj *) 0;
- if (!strncmpi(g, "worthless ", 10))
- g += 10;
- if (!strncmpi(g, "piece of ", 9))
- g += 9;
- if (!strncmpi(g, "colored ", 8))
- g += 8;
- else if (!strncmpi(g, "coloured ", 9))
- g += 9;
- if (!strcmpi(g, "glass")) { /* choose random color */
+ if (!strncmpi(s, "worthless ", 10))
+ s += 10;
+ if (!strncmpi(s, "piece of ", 9))
+ s += 9;
+ if (!strncmpi(s, "colored ", 8))
+ s += 8;
+ else if (!strncmpi(s, "coloured ", 9))
+ s += 9;
+ if (!strcmpi(s, "glass")) { /* choose random color */
/* 9 different kinds */
typ = LAST_GEM + rnd(9);
if (objects[typ].oc_class == GEM_CLASS)
char tbuf[BUFSZ];
Strcpy(tbuf, "worthless piece of ");
- Strcat(tbuf, g); /* assume it starts with the color */
+ Strcat(tbuf, s); /* assume it starts with the color */
Strcpy(bp, tbuf);
}
}
which; /* 'h'|'H'|'i'|'I'|'j'|'J' */
{
const char *pnoun;
- int g;
+ int godgend;
char lwhich = lowc(which); /* H,I,J -> h,i,j */
/*
: (lwhich == 'i') ? "them"
: (lwhich == 'j') ? "their" : "?";
} else {
- g = (who == 'd') ? quest_status.godgend
+ godgend = (who == 'd') ? quest_status.godgend
: (who == 'l') ? quest_status.ldrgend
: (who == 'n') ? quest_status.nemgend
: 2; /* default to neuter */
- pnoun = (lwhich == 'h') ? genders[g].he
- : (lwhich == 'i') ? genders[g].him
- : (lwhich == 'j') ? genders[g].his : "?";
+ pnoun = (lwhich == 'h') ? genders[godgend].he
+ : (lwhich == 'i') ? genders[godgend].him
+ : (lwhich == 'j') ? genders[godgend].his : "?";
}
Strcpy(cvt_buf, pnoun);
/* capitalize for H,I,J */
static struct {
boolean roles[SIZE(roles)];
short mask;
-} rfilter = UNDEFINED_VALUES;
+} rfilter = { UNDEFINED_VALUES, UNDEFINED_VALUE};
STATIC_DCL int NDECL(randrole_filtered);
STATIC_DCL char *FDECL(promptsep, (char *, int));
not_yet[] = " not yet specified",
rand_choice[] = " random";
char buf[BUFSZ];
- int r, c, g, a, allowmask;
+ int r, c, gend, a, allowmask;
r = flags.initrole;
c = flags.initrace;
- g = flags.initgend;
+ gend = flags.initgend;
a = flags.initalign;
if (r >= 0) {
allowmask = roles[r].allow;
else if (c >= 0 && !(allowmask & ROLE_RACEMASK & races[c].allow))
c = ROLE_RANDOM;
if ((allowmask & ROLE_GENDMASK) == ROLE_MALE)
- g = 0; /* role forces male (hypothetical) */
+ gend = 0; /* role forces male (hypothetical) */
else if ((allowmask & ROLE_GENDMASK) == ROLE_FEMALE)
- g = 1; /* role forces female (valkyrie) */
+ gend = 1; /* role forces female (valkyrie) */
if ((allowmask & ROLE_ALIGNMASK) == AM_LAWFUL)
a = 0; /* aligns[lawful] */
else if ((allowmask & ROLE_ALIGNMASK) == AM_NEUTRAL)
: roles[r].name.m);
if (r >= 0 && roles[r].name.f) {
/* distinct female name [caveman/cavewoman, priest/priestess] */
- if (g == 1)
+ if (gend == 1)
/* female specified; replace male role name with female one */
Sprintf(index(buf, ':'), ": %s", roles[r].name.f);
- else if (g < 0)
+ else if (gend < 0)
/* gender unspecified; append slash and female role name */
Sprintf(eos(buf), "/%s", roles[r].name.f);
}
: races[c].noun);
putstr(where, 0, buf);
Sprintf(buf, "%12s ", "gender:");
- Strcat(buf, (which == RS_GENDER) ? choosing : (g == ROLE_NONE)
+ Strcat(buf, (which == RS_GENDER) ? choosing : (gend == ROLE_NONE)
? not_yet
- : (g == ROLE_RANDOM)
+ : (gend == ROLE_RANDOM)
? rand_choice
- : genders[g].adj);
+ : genders[gend].adj);
putstr(where, 0, buf);
Sprintf(buf, "%12s ", "alignment:");
Strcat(buf, (which == RS_ALGNMNT) ? choosing : (a == ROLE_NONE)
anything any;
char buf[BUFSZ];
const char *what = 0, *constrainer = 0, *forcedvalue = 0;
- int f = 0, r, c, g, a, i, allowmask;
+ int f = 0, r, c, gend, a, i, allowmask;
r = flags.initrole;
c = flags.initrace;
case RS_GENDER:
what = "gender";
f = flags.initgend;
- g = ROLE_NONE;
+ gend = ROLE_NONE;
if (r >= 0) {
allowmask = roles[r].allow & ROLE_GENDMASK;
if (allowmask == ROLE_MALE)
- g = 0; /* genders[male] */
+ gend = 0; /* genders[male] */
else if (allowmask == ROLE_FEMALE)
- g = 1; /* genders[female] */
- if (g >= 0) {
+ gend = 1; /* genders[female] */
+ if (gend >= 0) {
constrainer = "role";
- forcedvalue = genders[g].adj;
+ forcedvalue = genders[gend].adj;
} else if (f >= 0
&& (allowmask & ~rfilter.mask) == genders[f].allow) {
/* if there is only one gender choice available due to user
3186A3B121A4B0FD0052BF02 /* bitmfile.h */,
3186A36E21A4B0FA0052BF02 /* botl.h */,
3186A38721A4B0FB0052BF02 /* color.h */,
+ 31B8A30A21A20D730055BD01 /* config.h */,
3186A3C621A4B0FE0052BF02 /* config1.h */,
3186A37121A4B0FA0052BF02 /* context.h */,
3186A3C521A4B0FE0052BF02 /* coord.h */,
3186A36D21A4B0F90052BF02 /* xwindowp.h */,
3186A3BF21A4B0FD0052BF02 /* you.h */,
3186A3A721A4B0FD0052BF02 /* youprop.h */,
- 31B8A30A21A20D730055BD01 /* config.h */,
);
name = include;
sourceTree = "<group>";