diff --git a/include/config.h b/include/config.h index 7bcb6bbc9..b8e794bf9 100644 --- a/include/config.h +++ b/include/config.h @@ -7,7 +7,17 @@ #define CONFIG_H /* - * Section 1: Operating and window systems selection. + * Section 1: NetHack consolidated version, patchlevel, development status. + */ + +#ifdef SHORT_FILENAMES +#include "patchlev.h" +#else +#include "patchlevel.h" +#endif + +/* + * Section 2: Operating and window systems selection. * Select the version of the OS you are using. * For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h. * A "VMS" option is not needed since the VMS C-compilers @@ -144,7 +154,7 @@ #endif /* - * Section 2: Some global parameters and filenames. + * Section 3: Some global parameters and filenames. * * LOGFILE, XLOGFILE, NEWS and PANICLOG refer to files in * the playground directory. Commenting out LOGFILE, XLOGFILE, @@ -373,7 +383,7 @@ #endif /* CHDIR */ /* - * Section 3: Definitions that may vary with system type. + * Section 4: Definitions that may vary with system type. * For example, both schar and uchar should be short ints on * the AT&T 3B2/3B5/etc. family. */ @@ -466,7 +476,7 @@ typedef unsigned char uchar; #endif /* - * Section 4: EXPERIMENTAL STUFF + * Section 5: EXPERIMENTAL STUFF * * Conditional compilation of new or experimental options are controlled here. * Enable any of these at your own risk -- there are almost certainly @@ -576,7 +586,7 @@ typedef unsigned char uchar; #define USE_ISAAC64 /* Use cross-plattform, bundled RNG */ -/* End of Section 4 */ +/* End of Section 5 */ #ifdef TTY_TILES_ESCCODES # ifndef USE_TILES diff --git a/include/global.h b/include/global.h index 09d744e37..20939108d 100644 --- a/include/global.h +++ b/include/global.h @@ -8,23 +8,6 @@ #include -/* - * Development status possibilities. - */ -#define NH_STATUS_RELEASED 0 /* Released */ -#define NH_STATUS_WIP 1 /* Work in progress */ -#define NH_STATUS_BETA 2 /* BETA testing */ -#define NH_STATUS_POSTRELEASE 3 /* patch commit point only */ - -/* - * Development status of this NetHack version. - */ -#define NH_DEVEL_STATUS NH_STATUS_WIP - -#ifndef DEBUG /* allow tool chains to define without causing warnings */ -#define DEBUG -#endif - /* * Files expected to exist in the playground directory. */ diff --git a/include/patchlevel.h b/include/patchlevel.h index 0abb28d85..b5cda35a8 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -3,6 +3,9 @@ /*-Copyright (c) Michael Allison, 2012. */ /* NetHack may be freely redistributed. See license for details. */ +#ifndef PATCHLEVEL_H +#define PATCHLEVEL_H + /* NetHack 3.7.x */ #define VERSION_MAJOR 3 #define VERSION_MINOR 7 @@ -16,6 +19,23 @@ */ #define EDITLEVEL 22 +/* + * Development status possibilities. + */ +#define NH_STATUS_RELEASED 0 /* Released */ +#define NH_STATUS_WIP 1 /* Work in progress */ +#define NH_STATUS_BETA 2 /* BETA testing */ +#define NH_STATUS_POSTRELEASE 3 /* patch commit point only */ + +/* + * Development status of this NetHack version. + */ +#define NH_DEVEL_STATUS NH_STATUS_WIP + +#ifndef DEBUG /* allow tool chains to define without causing warnings */ +#define DEBUG +#endif + #define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2020" #define COPYRIGHT_BANNER_B \ " By Stichting Mathematisch Centrum and M. Stephenson." @@ -532,4 +552,5 @@ /****************************************************************************/ +#endif /* PATHLEVEL_H */ /*patchlevel.h*/ diff --git a/src/dlb.c b/src/dlb.c index 6bad04fb1..8d4439894 100644 --- a/src/dlb.c +++ b/src/dlb.c @@ -4,9 +4,6 @@ #include "config.h" #include "dlb.h" -#if defined(VERSION_IN_DLB_FILENAME) -#include "patchlevel.h" -#endif #ifdef __DJGPP__ #include diff --git a/src/topten.c b/src/topten.c index 73fee19a0..da418bf69 100644 --- a/src/topten.c +++ b/src/topten.c @@ -5,11 +5,6 @@ #include "hack.h" #include "dlb.h" -#ifdef SHORT_FILENAMES -#include "patchlev.h" -#else -#include "patchlevel.h" -#endif /* If UPDATE_RECORD_IN_PLACE is defined, we don't want to rewrite the * whole file, because that entails creating a new version which diff --git a/src/version.c b/src/version.c index 6973b6cbd..3d3ae6999 100644 --- a/src/version.c +++ b/src/version.c @@ -7,16 +7,6 @@ #include "dlb.h" #include "date.h" -/* - * All the references to the contents of patchlevel.h have been moved - * into makedefs.... - */ -#ifdef SHORT_FILENAMES -#include "patchlev.h" -#else -#include "patchlevel.h" -#endif - #if defined(CROSSCOMPILE) struct cross_target_s cross_target = { /* https://groups.google.com/forum/#!original/ diff --git a/util/makedefs.c b/util/makedefs.c index 0af3d901f..7e70ed11a 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -23,13 +23,6 @@ #include "flag.h" #include "dlb.h" -/* version information */ -#ifdef SHORT_FILENAMES -#include "patchlev.h" -#else -#include "patchlevel.h" -#endif - #include #ifdef MAC #if defined(__SC__) || defined(__MRC__) /* MPW compilers */