instead of BETA or not, have devel states of release, wip, beta
Now that development sources are made public prior to BETA testing, it is useful to have a work-in-progress state prior to BETA.
This commit is contained in:
@@ -8,7 +8,17 @@
|
||||
|
||||
#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
|
||||
@@ -339,9 +349,9 @@ struct savefile_info {
|
||||
#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
|
||||
|
||||
@@ -582,11 +582,11 @@ extcmd_via_menu()
|
||||
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;
|
||||
}
|
||||
@@ -660,7 +660,7 @@ extcmd_via_menu()
|
||||
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
|
||||
|
||||
@@ -468,7 +468,8 @@ long nmv; /* number of moves */
|
||||
{
|
||||
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*/
|
||||
|
||||
@@ -2476,7 +2476,7 @@ STATIC_OVL void
|
||||
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,
|
||||
@@ -2659,7 +2659,7 @@ struct obj *obj;
|
||||
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);
|
||||
|
||||
@@ -565,7 +565,7 @@ int how;
|
||||
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'
|
||||
|
||||
@@ -101,7 +101,7 @@ int
|
||||
rn2(x)
|
||||
register int x;
|
||||
{
|
||||
#ifdef BETA
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
if (x <= 0) {
|
||||
impossible("rn2(%d) attempted", x);
|
||||
return 0;
|
||||
@@ -121,7 +121,7 @@ register int x;
|
||||
{
|
||||
register int i, adjustment;
|
||||
|
||||
#ifdef BETA
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
if (x <= 0) {
|
||||
impossible("rnl(%d) attempted", x);
|
||||
return 0;
|
||||
@@ -163,7 +163,7 @@ int
|
||||
rnd(x)
|
||||
register int x;
|
||||
{
|
||||
#ifdef BETA
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
if (x <= 0) {
|
||||
impossible("rnd(%d) attempted", x);
|
||||
return 1;
|
||||
@@ -180,7 +180,7 @@ register int n, x;
|
||||
{
|
||||
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;
|
||||
|
||||
@@ -63,7 +63,7 @@ sys_early_init()
|
||||
/* 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;
|
||||
|
||||
@@ -63,7 +63,7 @@ char *buf;
|
||||
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);
|
||||
|
||||
@@ -210,7 +210,7 @@ const char *path, *files;
|
||||
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;
|
||||
|
||||
@@ -110,7 +110,8 @@ MAXPLAYERS=10
|
||||
|
||||
# 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
|
||||
|
||||
@@ -71,7 +71,8 @@
|
||||
|
||||
# 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
|
||||
|
||||
@@ -415,7 +415,7 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */
|
||||
|| (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 */
|
||||
|
||||
@@ -1182,7 +1182,7 @@ const char *delim;
|
||||
{
|
||||
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;
|
||||
@@ -1196,8 +1196,12 @@ const char *build_date;
|
||||
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
|
||||
@@ -1226,8 +1230,12 @@ const char *build_date;
|
||||
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.",
|
||||
@@ -1813,8 +1821,12 @@ do_options()
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user