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:
nethack.rankin
2003-11-15 08:09:18 +00:00
parent e9afb34423
commit 23d3a146d9
4 changed files with 11 additions and 9 deletions

View File

@@ -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;