-/* NetHack 3.6 do_name.c $NHDT-Date: 1519420054 2018/02/23 21:07:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.128 $ */
+/* NetHack 3.6 do_name.c $NHDT-Date: 1537477563 2018/09/20 21:06:03 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.132 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2018. */
/* NetHack may be freely redistributed. See license for details. */
if (do_saddle && (mtmp->misc_worn_check & W_SADDLE) && !Blind
&& !Hallucination)
Strcat(buf, "saddled ");
- if (buf[0] != 0)
- has_adjectives = TRUE;
- else
- has_adjectives = FALSE;
+ has_adjectives = (buf[0] != '\0');
/* Put the actual monster name or type into the buffer now */
/* Be sure to remember whether the buffer starts with a name */
struct monst *mtmp;
char *gang;
{
- size_t sz = 0;
+ int sz = 0;
char buf[BUFSZ], buf2[BUFSZ], *orcname;
orcname = rndorcname(buf2);
- sz = strlen(gang) + strlen(orcname) + strlen(" of ");
- if (buf && gang && orcname && (sz < (BUFSZ - 1))) {
- Sprintf(buf, "%s of %s",
- upstart(orcname), upstart(gang));
+ sz = (int) (strlen(gang) + strlen(orcname) + sizeof " of " - sizeof "");
+ if (gang && orcname && sz < BUFSZ) {
+ Sprintf(buf, "%s of %s", upstart(orcname), upstart(gang));
mtmp = christen_monst(mtmp, buf);
}
return mtmp;
-/* NetHack 3.6 mkmaze.c $NHDT-Date: 1518718417 2018/02/15 18:13:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.55 $ */
+/* NetHack 3.6 mkmaze.c $NHDT-Date: 1537477570 2018/09/20 21:06:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.61 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2018. */
/* NetHack may be freely redistributed. See license for details. */
char *s;
{
/* this kludge only works as long as orctown is minetn-1 */
- if (dungeons[u.uz.dnum].dname
- && !strcmp(dungeons[u.uz.dnum].dname, "The Gnomish Mines")
- && !strcmp(s, "minetn-1"))
- ransacked = 1;
- else
- ransacked = 0;
+ ransacked = (u.uz.dnum == mines_dnum && !strcmp(s, "minetn-1"));
}
#define ORC_LEADER 1
void
-migrate_orc(mtmp, flags)
+migrate_orc(mtmp, mflags)
struct monst *mtmp;
-unsigned long flags;
+unsigned long mflags;
{
int nlev, max_depth, cur_depth;
d_level dest;
cur_depth = (int) depth(&u.uz);
max_depth = dunlevs_in_dungeon(&u.uz) +
(dungeons[u.uz.dnum].depth_start - 1);
- if (flags == ORC_LEADER) {
+ if (mflags == ORC_LEADER) {
/* Note that the orc leader will take possession of any
* remaining stuff not already delivered to other
* orcs between here and the bottom of the mines.
-/* NetHack 3.6 pager.c $NHDT-Date: 1523142395 2018/04/07 23:06:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.123 $ */
+/* NetHack 3.6 pager.c $NHDT-Date: 1537477571 2018/09/20 21:06:11 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.129 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2018. */
/* NetHack may be freely redistributed. See license for details. */
Strcpy(temp_buf, firstmatch);
checkfile(temp_buf, pm, FALSE,
(boolean) (ans == LOOK_VERBOSE), supplemental_name);
- if (supplemental_pm && supplemental_name)
+ if (supplemental_pm)
do_supplemental_info(supplemental_name, supplemental_pm,
(boolean) (ans == LOOK_VERBOSE));
}
if (yes_to_moreinfo) {
int i, subs = 0;
char *gang = bp + 4;
- char *text[] = {
- "%s is a member of a marauding horde of orcs",
- "rumored to have brutally attacked and plundered the ordinarily",
- "sheltered town that is located deep within The Gnomish Mines.",
- "",
- "The members of that vicious horde proudly and defiantly acclaim their",
- "allegiance to their leader %s in their names.",
+ static const char *text[] = {
+ "%s is a member of a marauding horde of orcs",
+ "rumored to have brutally attacked and plundered the ordinarily",
+ "sheltered town that is located deep within The Gnomish Mines.",
+ "",
+ "The members of that vicious horde proudly and defiantly acclaim",
+ "their allegiance to their leader %s in their names.",
};
*bp = '\0';
datawin = create_nhwindow(NHW_MENU);
for (i = 0; i < SIZE(text); i++) {
- char buf[BUFSZ], *txt;
+ char buf[BUFSZ];
+ const char *txt;
if (strstri(text[i], "%s") != 0) {
Sprintf(buf, text[i],