build bits
Eliminate a few warnings: array name used as boolean is always true, parameter 'flags' shadows (blocks access to) global struct 'flags', initializer discards 'const' (assigning string literal to 'char *'). Plus a couple of simplifications.
This commit is contained in:
21
src/pager.c
21
src/pager.c
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
@@ -1229,7 +1229,7 @@ coord *click_cc;
|
||||
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));
|
||||
}
|
||||
@@ -1364,19 +1364,20 @@ boolean without_asking;
|
||||
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],
|
||||
|
||||
Reference in New Issue
Block a user