-HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.949 $ $NHDT-Date: 1655065133 2022/06/12 20:18:53 $
+HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.951 $ $NHDT-Date: 1655402422 2022/06/16 18:00:22 $
General Fixes and Modified Features
-----------------------------------
display when hero bought something during itemized billing didn't work
if paying for a used-up shop item--prices of any unpaid items vanished
when inventory got updated to reflect transfer of hero's gold to shk
+save files created with SCORE_ON_BOTL disabled were erroneously being rejected
+ if the program was rebuilt with it enabled and vice versa
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
-/* NetHack 3.7 date.c $NHDT-Date: 1645393645 2022/02/20 21:47:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $ */
+/* NetHack 3.7 date.c $NHDT-Date: 1655402414 2022/06/16 18:00:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $ */
/* Copyright (c) Michael Allison, 2021. */
/* NetHack may be freely redistributed. See license for details. */
nh_snprintf(__func__, __LINE__, str, size, __VA_ARGS__)
extern void nh_snprintf(const char *func, int line, char *str, size_t size,
const char *fmt, ...);
+extern unsigned long md_ignored_features(void);
extern char *mdlib_version_string(char *, const char *);
extern char *version_id_string(char *, int, const char *);
extern char *bannerc_string(char *, int, const char *);
nomakedefs.version_number = version->incarnation;
nomakedefs.version_features = version->feature_set;
-#ifdef MD_IGNORED_FEATURES
- nomakedefs.ignored_features = MD_IGNORED_FEATURES;
-#endif
+ nomakedefs.ignored_features = md_ignored_features();
nomakedefs.version_sanity1 = version->entity_count;
nomakedefs.version_sanity2 = version->struct_sizes1;
nomakedefs.version_sanity3 = version->struct_sizes2;
-/* NetHack 3.7 mdlib.c $NHDT-Date: 1644524060 2022/02/10 20:14:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.27 $ */
+/* NetHack 3.7 mdlib.c $NHDT-Date: 1655402414 2022/06/16 18:00:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.31 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* Copyright (c) M. Stephenson, 1990, 1991. */
/* REPRODUCIBLE_BUILD will change this to TRUE */
static boolean date_via_env = FALSE;
+extern unsigned long md_ignored_features(void);
char *mdlib_version_string(char *, const char *);
char *version_id_string(char *, int, const char *);
char *bannerc_string(char *, int, const char *);
* That check is done in src/restore.c now.
*
*/
-#ifndef MD_IGNORED_FEATURES
-#define MD_IGNORED_FEATURES \
- (0L | (1L << 19) /* SCORE_ON_BOTL */ \
- | (1L << 27) /* ZEROCOMP */ \
- | (1L << 28) /* RLECOMP */ \
- )
-#endif /* MD_IGNORED_FEATUES */
+unsigned long
+md_ignored_features(void)
+{
+ return (0UL
+ | (1UL << 19) /* SCORE_ON_BOTL */
+ | (1UL << 27) /* ZEROCOMP */
+ | (1UL << 28) /* RLECOMP */
+ );
+}
static void
make_version(void)
"data librarian with a version-dependent name",
#endif
#endif
+#ifdef EDIT_GETLIN
+ "edit getlin - some prompts remember previous response",
+#endif
#ifdef DUMPLOG
"end-of-game dumplogs",
#endif
#ifdef INSURANCE
"insurance files for recovering from crashes",
#endif
+#ifdef LIVELOG
+ "live logging support",
+#endif
#ifdef LOGFILE
"log file",
#endif
#ifdef MAIL
"mail daemon",
#endif
+#ifdef MONITOR_HEAP
+ "monitor heap - record memory usage for later analysis",
+#endif
#if defined(GNUDOS) || defined(__DJGPP__)
"MSDOS protected mode",
#endif
-/* NetHack 3.7 version.c $NHDT-Date: 1654069065 2022/06/01 07:37:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.91 $ */
+/* NetHack 3.7 version.c $NHDT-Date: 1655402415 2022/06/16 18:00:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.92 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2018. */
/* NetHack may be freely redistributed. See license for details. */
#endif
boolean
-check_version(struct version_info *version_data, const char *filename,
- boolean complain, unsigned long utdflags)
+check_version(
+ struct version_info *version_data,
+ const char *filename,
+ boolean complain,
+ unsigned long utdflags)
{
if (
-#ifdef VERSION_COMPATIBILITY
+#ifdef VERSION_COMPATIBILITY /* patchlevel.h */
version_data->incarnation < VERSION_COMPATIBILITY
|| version_data->incarnation > nomakedefs.version_number
#else
}
return FALSE;
} else if (
-#ifndef IGNORED_FEATURES
- version_data->feature_set != nomakedefs.version_features
-#else
(version_data->feature_set & ~nomakedefs.ignored_features)
- != (VERSION_FEATURES & ~nomakedefs.ignored_features)
-#endif
+ != (nomakedefs.version_features & ~nomakedefs.ignored_features)
|| ((utdflags & UTD_SKIP_SANITY1) == 0
&& version_data->entity_count != nomakedefs.version_sanity1)
|| ((utdflags & UTD_CHECKSIZES) != 0
&& version_data->struct_sizes1 != nomakedefs.version_sanity2)
|| ((utdflags & UTD_CHECKSIZES) != 0
- && version_data->struct_sizes2 != nomakedefs.version_sanity3)) {
+ && version_data->struct_sizes2 != nomakedefs.version_sanity3)
+ ) {
if (complain) {
pline("Configuration incompatibility for file \"%s\".", filename);
display_nhwindow(WIN_MESSAGE, TRUE);
store_version(NHFILE *nhfp)
{
struct version_info version_data = {
- 0UL,0UL,0UL,0UL,0Ul
+ 0UL, 0UL, 0UL, 0UL, 0UL
};
/* actual version number */
bufoff(nhfp->fd);
/* bwrite() before bufon() uses plain write() */
store_formatindicator(nhfp);
- bwrite(nhfp->fd,(genericptr_t) &version_data,
+ bwrite(nhfp->fd, (genericptr_t) &version_data,
(unsigned) (sizeof version_data));
bufon(nhfp->fd);
}
-/* NetHack 3.7 makedefs.c $NHDT-Date: 1645393932 2022/02/20 21:52:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.211 $ */
+/* NetHack 3.7 makedefs.c $NHDT-Date: 1655402416 2022/06/16 18:00:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.215 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* Copyright (c) M. Stephenson, 1990, 1991. */
ul_sfx);
Fprintf(ofp, "#define VERSION_FEATURES 0x%08lx%s\n", version.feature_set,
ul_sfx);
-#ifdef MD_IGNORED_FEATURES
- Fprintf(ofp, "#define IGNORED_FEATURES 0x%08lx%s\n",
- (unsigned long) MD_IGNORED_FEATURES, ul_sfx);
-#endif
+ {
+ unsigned long ignored_features = md_ignored_features();
+
+ Fprintf(ofp, "#define IGNORED_FEATURES 0x%08lx%s\n",
+ ignored_features, ul_sfx);
+ }
Fprintf(ofp, "#define VERSION_SANITY1 0x%08lx%s\n", version.entity_count,
ul_sfx);
#ifndef __EMSCRIPTEN__