#include <stdio.h>
-#define BETA /* development or beta testing [MRS] */
+/*
+ * Development status possibilities.
+ */
+#define NH_STATUS_RELEASED 0 /* Released */
+#define NH_STATUS_WIP 1 /* Work in progress */
+#define NH_STATUS_BETA 2 /* BETA testing */
+
+/*
+ * 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
#define MAXMONNO 120 /* extinct monst after this number created */
#define MHPMAX 500 /* maximum monster hp */
-/* PANICTRACE: Always defined for BETA but only for supported platforms. */
+/* PANICTRACE: Always defined for NH_DEVEL_STATUS == NH_STATUS_BETA but only for supported platforms. */
#ifdef UNIX
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
/* see end.c */
#ifndef PANICTRACE
#define PANICTRACE
if ((len = (int) strlen(efp->ef_desc)) > biggest)
biggest = len;
if (++i > MAX_EXT_CMD) {
-#if defined(BETA)
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
impossible(
"Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.",
MAX_EXT_CMD);
-#endif /* BETA */
+#endif /* NH_DEVEL_STATUS != NH_STATUS_RELEASED */
iflags.extmenu = 0;
return -1;
}
if (n == 1) {
if (matchlevel > (QBUFSZ - 2)) {
free((genericptr_t) pick_list);
-#if defined(BETA)
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
impossible("Too many chars (%d) entered in extcmd_via_menu()",
matchlevel);
#endif
{
int imv = 0; /* avoid zillions of casts and lint warnings */
-#if defined(DEBUG) || defined(BETA)
+#if defined(DEBUG) || (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
+
if (nmv < 0L) { /* crash likely... */
panic("catchup from future time?");
/*NOTREACHED*/
sanity_check_worn(obj)
struct obj *obj;
{
-#if defined(BETA) || defined(DEBUG)
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG)
static unsigned long wearbits[] = {
W_ARM, W_ARMC, W_ARMH, W_ARMS, W_ARMG, W_ARMF, W_ARMU,
W_WEP, W_QUIVER, W_SWAPWEP, W_AMUL, W_RINGL, W_RINGR, W_TOOL,
insane_object(obj, ofmt0, maskbuf, mon);
}
}
-#else /* not (BETA || DEBUG) */
+#else /* not (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || DEBUG) */
/* dummy use of obj to avoid "arg not used" complaint */
if (!obj)
insane_object(obj, ofmt0, "<null>", (struct monst *) 0);
if (qt_msg->summary_size) {
(void) dlb_fgets(in_line, sizeof in_line, msg_file);
convert_line(in_line, out_line);
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
} else if (qt_msg->delivery == 'c') { /* skip for 'qtdump' of 'p' */
/* delivery 'c' and !summary_size, summary expected but not present;
this doesn't prefix the number with role code vs 'general'
rn2(x)
register int x;
{
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
if (x <= 0) {
impossible("rn2(%d) attempted", x);
return 0;
{
register int i, adjustment;
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
if (x <= 0) {
impossible("rnl(%d) attempted", x);
return 0;
rnd(x)
register int x;
{
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
if (x <= 0) {
impossible("rnd(%d) attempted", x);
return 1;
{
register int tmp = n;
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
if (x < 0 || n < 0 || (x == 0 && n != 0)) {
impossible("d(%d,%d) attempted", n, x);
return 1;
/* panic options */
sysopt.gdbpath = dupstr(GDBPATH);
sysopt.greppath = dupstr(GREPPATH);
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
sysopt.panictrace_gdb = 1;
#ifdef PANICTRACE_LIBC
sysopt.panictrace_libc = 2;
Sprintf(eos(buf), "%s%s", c++ ? "," : "", NetHack_git_sha);
#endif
#if defined(NETHACK_GIT_BRANCH)
-#if defined(BETA)
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
if (NetHack_git_branch)
Sprintf(eos(buf), "%sbranch:%s",
c++ ? "," : "", NetHack_git_branch);
BPTR dirLock, dirLock2;
struct FileInfoBlock *fibp;
int chklen;
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
if(files != alllevels)panic("eraseall");
#endif
chklen=(int)index(files,'*')-(int)files;
# Try to get more info in case of a program bug or crash. Only used
# if the program is built with the PANICTRACE compile-time option enabled.
-# By default PANICTRACE is enabled if BETA is defined, otherwise disabled.
+# By default PANICTRACE is enabled if (NH_DEVEL_STATUS != NH_STATUS_RELEASED),
+# otherwise disabled.
# Using GDB can get more information and works on more systems but requires
# 'gdb' be available; using LIBC only works if NetHack is linked with a
# libc that supports the backtrace(3) API. Both require certain compilation
# Try to get more info in case of a program bug or crash. Only used
# if the program is built with the PANICTRACE compile-time option enabled.
-# By default PANICTRACE is enabled if BETA is defined, otherwise disabled.
+# By default PANICTRACE is enabled if (NH_DEVEL_STATUS != NH_STATUS_RELEASED),
+# otherwise disabled.
# (GDBPATH, GREPPATH, and PANICTRACE_LIBC aren't used on VMS.
# PANICTRACE_GDB is repurposed, with nothing to do with 'gdb'.
# Values are 1: show traceback and exit, 2: show traceback and
|| (condition >= SS$_ASTFLT && condition <= SS$_TBIT)
|| (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) {
program_state.done_hup = TRUE; /* pretend hangup has been attempted */
-#ifndef BETA
+#if (NH_DEVEL_STATUS == NH_STATUS_RELEASED)
if (wizard)
#endif
abort(); /* enter the debugger */
{
Sprintf(outbuf, "%d%s%d%s%d", VERSION_MAJOR, delim, VERSION_MINOR, delim,
PATCHLEVEL);
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
Sprintf(eos(outbuf), "-%d", EDITLEVEL);
#endif
return outbuf;
char subbuf[64], versbuf[64];
char betabuf[64];
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
+#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
Strcpy(betabuf, " Beta");
+#else
+ Strcpy(betabuf, " Work-in-progress");
+#endif
#else
betabuf[0] = '\0';
#endif
subbuf[0] = ' ';
Strcpy(&subbuf[1], PORT_SUB_ID);
#endif
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
+#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
Strcat(subbuf, " Beta");
+#else
+ Strcat(subbuf, " Work-in-progress");
+#endif
#endif
Sprintf(outbuf, " Version %s %s%s, %s %s.",
Fprintf(ofp, "\n%sNetHack version %d.%d.%d%s\n",
opt_indent,
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL,
-#ifdef BETA
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
+#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
" [beta]"
+#else
+ " [work-in-progress]"
+#endif
#else
""
#endif