autopickup exceptions
External names longer than 31 characters trigger a compiler warning for me about truncation, and that causes make to quit. So shorten the two long names. Also, call the cleanup routine for the FREE_ALL_MEMORY configuration.
This commit is contained in:
@@ -1417,8 +1417,8 @@ E void FDECL(set_wc_option_mod_status, (unsigned long, int));
|
||||
E void FDECL(set_wc2_option_mod_status, (unsigned long, int));
|
||||
E void FDECL(set_option_mod_status, (const char *,int));
|
||||
#ifdef AUTOPICKUP_EXCEPTIONS
|
||||
E int FDECL(add_autopickup_exception_mapping, (const char *));
|
||||
E void NDECL(free_autopickup_exception_mappings);
|
||||
E int FDECL(add_autopickup_exception, (const char *));
|
||||
E void NDECL(free_autopickup_exceptions);
|
||||
#endif /* AUTOPICKUP_EXCEPTIONS */
|
||||
|
||||
/* ### pager.c ### */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)files.c 3.4 2003/02/18 */
|
||||
/* SCCS Id: @(#)files.c 3.4 2003/11/14 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1745,7 +1745,7 @@ char *tmp_levels;
|
||||
plnamesuffix(); /* set the character class */
|
||||
#ifdef AUTOPICKUP_EXCEPTIONS
|
||||
} else if (match_varname(buf, "AUTOPICKUP_EXCEPTION", 5)) {
|
||||
add_autopickup_exception_mapping(bufp);
|
||||
add_autopickup_exception(bufp);
|
||||
#endif
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
} else if (match_varname(buf, "HACKDIR", 4)) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)options.c 3.4 2003/10/20 */
|
||||
/* SCCS Id: @(#)options.c 3.4 2003/11/14 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2841,7 +2841,7 @@ boolean setinitial,setfromfile;
|
||||
if (apebuf[0] == '\033') retval = FALSE;
|
||||
apebuf[0] = '"';
|
||||
Strcat(apebuf,"\"");
|
||||
add_autopickup_exception_mapping(apebuf);
|
||||
add_autopickup_exception(apebuf);
|
||||
} else if (opt_idx == 1) {
|
||||
tmpwin = create_nhwindow(NHW_TEXT);
|
||||
ape = iflags.autopickup_exceptions;
|
||||
@@ -3170,7 +3170,7 @@ dotogglepickup()
|
||||
|
||||
#ifdef AUTOPICKUP_EXCEPTIONS
|
||||
int
|
||||
add_autopickup_exception_mapping(mapping)
|
||||
add_autopickup_exception(mapping)
|
||||
const char *mapping;
|
||||
{
|
||||
struct autopickup_exception *newape, *ape;
|
||||
@@ -3249,9 +3249,10 @@ count_ape_maps()
|
||||
}
|
||||
|
||||
void
|
||||
free_autopickup_exception_mappings()
|
||||
free_autopickup_exceptions()
|
||||
{
|
||||
struct autopickup_exception *ape = iflags.autopickup_exceptions;
|
||||
|
||||
while((ape = iflags.autopickup_exceptions) != 0) {
|
||||
free(ape->pattern);
|
||||
iflags.autopickup_exceptions = ape->next;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)save.c 3.4 2002/08/22 */
|
||||
/* SCCS Id: @(#)save.c 3.4 2003/11/14 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1109,6 +1109,7 @@ freedynamicdata()
|
||||
if (iflags.wc_font_menu) free(iflags.wc_font_menu);
|
||||
if (iflags.wc_font_status) free(iflags.wc_font_status);
|
||||
if (iflags.wc_tile_file) free(iflags.wc_tile_file);
|
||||
free_autopickup_exceptions();
|
||||
|
||||
#endif /* FREE_ALL_MEMORY */
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user