From 3896fcff8b07d3caea11e4dd28afcc8fb07d891d Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 4 Feb 2019 15:01:36 -0800 Subject: [PATCH 1/2] function call through pointer There be others of these. Don't for ANSI C for something this simple. --- src/do_name.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/do_name.c b/src/do_name.c index 2cfd935a4..c4605b479 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_name.c $NHDT-Date: 1546987367 2019/01/08 22:42:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.140 $ */ +/* NetHack 3.6 do_name.c $NHDT-Date: 1549321230 2019/02/04 23:00:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.143 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -382,7 +382,7 @@ int x, y, gloc; || IS_UNEXPLORED_LOC(x, y - 1))); case GLOC_VALID: if (getpos_getvalid) - return (getpos_getvalid(x,y)); + return (*getpos_getvalid)(x,y); /*FALLTHRU*/ case GLOC_INTERESTING: return gather_locs_interesting(x,y, GLOC_DOOR) @@ -551,7 +551,7 @@ int cx, cy; custompline(SUPPRESS_HISTORY, "%s%s%s%s%s", firstmatch, *tmpbuf ? " " : "", tmpbuf, (iflags.autodescribe - && getpos_getvalid && !getpos_getvalid(cx, cy)) + && getpos_getvalid && !(*getpos_getvalid)(cx, cy)) ? " (illegal)" : "", (iflags.getloc_travelmode && !is_valid_travelpt(cx, cy)) ? " (no travel path)" : ""); From f38dca7cb1abc5a76450bb8af4d0afb10365b787 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 4 Feb 2019 18:35:17 -0500 Subject: [PATCH 2/2] variable moved to context long ago just reported, a variable moved to context long ago --- sys/amiga/winstr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amiga/winstr.c b/sys/amiga/winstr.c index 46946b522..fd745c182 100644 --- a/sys/amiga/winstr.c +++ b/sys/amiga/winstr.c @@ -186,7 +186,7 @@ const char *str; if (cw->data[cw->cury] == NULL) panic("NULL pointer for status window"); ob = &cw->data[cw->cury][j = cw->curx]; - if (flags.botlx) + if (context.botlx) *ob = 0; /* Display when beam at top to avoid flicker... */