diff --git a/dat/.gitignore b/dat/.gitignore index 6cdbe532d..748a8ffe1 100644 --- a/dat/.gitignore +++ b/dat/.gitignore @@ -23,3 +23,5 @@ dlb.lst guioptions porthelp NetHack.ad +gitinfo.txt + diff --git a/doc/fixes36.1 b/doc/fixes36.1 index d33e86598..28313a87c 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -568,6 +568,9 @@ try again to fix achievement recording bug with mines and sokoban prizes the fix for secret doors on special levels always having vertical orientation resulted in some--but not all--secret doors within vertical walls being displayed as horizontal walls while still hidden +the fix intended for "a shop object stolen from outside the shop (via + grappling hook) would be left marked as 'unpaid'" broke normal pickup, + preventing any picked up item from merging with compatible stack Platform- and/or Interface-Specific Fixes @@ -634,6 +637,8 @@ PANICTRACE: PANICTRACE_GDB used wrong value for ARGV0 when launching gdb if win32gui: gather raw_print error messages into a single dialog window win32tty: fix display errors when using a font with double wide or ambiguous width characters +Amiga (untested): 'makedefs -z' didn't handle FILE_PREFIX correctly when + building vis_tab.h and vis_tab.c General New Features diff --git a/include/extern.h b/include/extern.h index b152af29c..c4a039c44 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2570,7 +2570,7 @@ E unsigned long NDECL(get_current_feature_ver); E const char *FDECL(copyright_banner_line, (int)); #ifdef RUNTIME_PORT_ID -E void FDECL(append_port_id, (char *)); +E char *FDECL(get_port_id, (char *)); #endif /* ### video.c ### */ diff --git a/include/patchlevel.h b/include/patchlevel.h index 0d2828ffc..daa0234e0 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -15,7 +15,7 @@ */ #define EDITLEVEL 0 -#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2016" +#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2018" #define COPYRIGHT_BANNER_B \ " By Stichting Mathematisch Centrum and M. Stephenson." /* COPYRIGHT_BANNER_C is generated by makedefs into date.h */ diff --git a/src/pickup.c b/src/pickup.c index d09bbbfdb..0f53d8cbb 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pickup.c $NHDT-Date: 1515144225 2018/01/05 09:23:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.193 $ */ +/* NetHack 3.6 pickup.c $NHDT-Date: 1516581051 2018/01/22 00:30:51 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.194 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1500,17 +1500,16 @@ struct obj *otmp; boolean robshop = (!u.uswallow && otmp != uball && costly_spot(ox, oy)); obj_extract_self(otmp); - otmp->nomerge = 1; - result = addinv(otmp); - otmp->nomerge = 0; newsym(ox, oy); - /* this used to be done before addinv(), but remote_burglary() - calls rob_shop() which calls setpaid() after moving costs of - unpaid items to shop debt; setpaid() calls clear_unpaid() for - lots of object chains, but 'otmp' wasn't on any of those so - remained flagged as an unpaid item in inventory, triggering - impossible() every time inventory was examined... */ + /* for shop items, addinv() needs to be after addtobill() (so that + object merger can take otmp->unpaid into account) but before + remote_robbery() (which calls rob_shop() which calls setpaid() + after moving costs of unpaid items to shop debt; setpaid() + calls clear_unpaid() for lots of object chains, but 'otmp' isn't + on any of those between obj_extract_self() and addinv(); for + 3.6.0, 'otmp' remained flagged as an unpaid item in inventory + and triggered impossible() every time inventory was examined) */ if (robshop) { char saveushops[5], fakeshop[2]; @@ -1524,10 +1523,14 @@ struct obj *otmp; /* sets obj->unpaid if necessary */ addtobill(otmp, TRUE, FALSE, FALSE); Strcpy(u.ushops, saveushops); - /* if you're outside the shop, make shk notice */ - if (!index(u.ushops, *fakeshop)) - remote_burglary(ox, oy); + robshop = otmp->unpaid && !index(u.ushops, *fakeshop); } + + result = addinv(otmp); + /* if you're taking a shop item from outside the shop, make shk notice */ + if (robshop) + remote_burglary(ox, oy); + return result; } diff --git a/src/version.c b/src/version.c index 4567e30d7..19f74c265 100644 --- a/src/version.c +++ b/src/version.c @@ -15,8 +15,6 @@ #include "patchlevel.h" #endif -#define BETA_INFO "" - STATIC_DCL void FDECL(insert_rtoption, (char *)); /* fill buffer with short version (so caller can avoid including date.h) */ @@ -32,13 +30,26 @@ char * getversionstring(buf) char *buf; { + int details = 0; + Strcpy(buf, VERSION_ID); -#if defined(BETA) && defined(BETA_INFO) - Sprintf(eos(buf), " %s", BETA_INFO); -#endif #if defined(RUNTIME_PORT_ID) - append_port_id(buf); + details++; #endif + + if (details) { + int c = 0; + char tmpbuf[BUFSZ]; + char *tmp = (char *)0; + + Sprintf(eos(buf), " ("); +#if defined(RUNTIME_PORT_ID) + tmp = get_port_id(tmpbuf); + if (tmp) + Sprintf(eos(buf), "%s%s", c++ ? "," : "", tmp); +#endif + Sprintf(eos(buf), ")"); + } return buf; } diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index 892744432..842bfd036 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -326,23 +326,23 @@ int interjection_type; */ #ifndef _M_IX86 #ifdef _M_X64 -#define TARGET_PORT "(x64) " +#define TARGET_PORT "x64" #endif #ifdef _M_IA64 -#define TARGET_PORT "(IA64) " +#define TARGET_PORT "IA64" #endif #endif #ifndef TARGET_PORT -#define TARGET_PORT "(x86) " +#define TARGET_PORT "x86" #endif -void -append_port_id(buf) +char * +get_port_id(buf) char *buf; { - char *portstr = TARGET_PORT; - Sprintf(eos(buf), " %s", portstr); + Strcpy(buf, TARGET_PORT); + return buf; } #endif /* RUNTIME_PORT_ID */ diff --git a/util/makedefs.c b/util/makedefs.c index a4a3f558d..1e3a98ac7 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makedefs.c $NHDT-Date: 1506993895 2017/10/03 01:24:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.117 $ */ +/* NetHack 3.6 makedefs.c $NHDT-Date: 1516697571 2018/01/23 08:52:51 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.118 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) Dean Luick, 1990. */ @@ -2830,7 +2830,7 @@ do_vision() #ifdef FILE_PREFIX Strcat(filename, file_prefix); #endif - Sprintf(filename, INCLUDE_TEMPLATE, VIS_TAB_H); + Sprintf(eos(filename), INCLUDE_TEMPLATE, VIS_TAB_H); if (!(ofp = fopen(filename, WRTMODE))) { perror(filename); exit(EXIT_FAILURE); @@ -2853,10 +2853,15 @@ do_vision() #ifdef FILE_PREFIX Strcat(filename, file_prefix); #endif - Sprintf(filename, SOURCE_TEMPLATE, VIS_TAB_C); + Sprintf(eos(filename), SOURCE_TEMPLATE, VIS_TAB_C); if (!(ofp = fopen(filename, WRTMODE))) { perror(filename); - Sprintf(filename, INCLUDE_TEMPLATE, VIS_TAB_H); + /* creating vis_tab.c failed; remove the vis_tab.h we just made */ + filename[0] = '\0'; +#ifdef FILE_PREFIX + Strcat(filename, file_prefix); +#endif + Sprintf(eos(filename), INCLUDE_TEMPLATE, VIS_TAB_H); Unlink(filename); exit(EXIT_FAILURE); }