lint: use const for string literal
This commit is contained in:
+5
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 options.c $NHDT-Date: 1430192504 2015/04/28 03:41:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.189 $ */
|
/* NetHack 3.5 options.c $NHDT-Date: 1430441885 2015/05/01 00:58:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.191 $ */
|
||||||
/* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */
|
/* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -501,7 +501,7 @@ STATIC_OVL int FDECL(count_ape_maps, (int *, int *));
|
|||||||
STATIC_DCL const char *FDECL(clr2colorname, (int));
|
STATIC_DCL const char *FDECL(clr2colorname, (int));
|
||||||
STATIC_DCL const char *FDECL(attr2attrname, (int));
|
STATIC_DCL const char *FDECL(attr2attrname, (int));
|
||||||
STATIC_DCL int NDECL(query_color);
|
STATIC_DCL int NDECL(query_color);
|
||||||
STATIC_DCL int FDECL(query_attr, (char *));
|
STATIC_DCL int FDECL(query_attr, (const char *));
|
||||||
STATIC_DCL boolean FDECL(add_menu_coloring_parsed, (char *, int, int));
|
STATIC_DCL boolean FDECL(add_menu_coloring_parsed, (char *, int, int));
|
||||||
STATIC_DCL void FDECL(free_one_menu_coloring, (int));
|
STATIC_DCL void FDECL(free_one_menu_coloring, (int));
|
||||||
STATIC_DCL int NDECL(count_menucolors);
|
STATIC_DCL int NDECL(count_menucolors);
|
||||||
@@ -1221,7 +1221,7 @@ query_color()
|
|||||||
|
|
||||||
int
|
int
|
||||||
query_attr(prompt)
|
query_attr(prompt)
|
||||||
char *prompt;
|
const char *prompt;
|
||||||
{
|
{
|
||||||
winid tmpwin;
|
winid tmpwin;
|
||||||
anything any;
|
anything any;
|
||||||
@@ -1233,7 +1233,8 @@ char *prompt;
|
|||||||
any = zeroany;
|
any = zeroany;
|
||||||
for (i = 0; i < SIZE(attrnames); i++) {
|
for (i = 0; i < SIZE(attrnames); i++) {
|
||||||
any.a_int = i + 1;
|
any.a_int = i + 1;
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, attrnames[i].attr, attrnames[i].name, MENU_UNSELECTED);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0,
|
||||||
|
attrnames[i].attr, attrnames[i].name, MENU_UNSELECTED);
|
||||||
}
|
}
|
||||||
end_menu(tmpwin, prompt ? prompt : "Pick an attribute");
|
end_menu(tmpwin, prompt ? prompt : "Pick an attribute");
|
||||||
pick_cnt = select_menu(tmpwin, PICK_ONE, &picks);
|
pick_cnt = select_menu(tmpwin, PICK_ONE, &picks);
|
||||||
|
|||||||
Reference in New Issue
Block a user