pull in the recent unconditionals merge from master

This commit is contained in:
Derek S. Ray
2015-02-27 21:25:00 -05:00
parent 7f0ff8f011
commit b1a7bbbbdb
538 changed files with 1715 additions and 5685 deletions

2
util/.gitignore vendored
View File

@@ -8,3 +8,5 @@ lev_yacc.c
tile2x11
lev_comp
tileedit
dlb
recover

View File

@@ -1,5 +1,6 @@
%{
/* NetHack 3.5 dgn_comp.l $Date$ $Revision$ */
/* NetHack 3.5 dgn_comp.l $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 dgn_comp.l $Date: 2009/05/06 10:54:26 $ $Revision: 1.7 $ */
/* SCCS Id: @(#)dgn_lex.c 3.5 2002/03/27 */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* Copyright (c) 1990 by M. Stephenson */

View File

@@ -1,5 +1,6 @@
%{
/* NetHack 3.5 dgn_comp.y $Date$ $Revision$ */
/* NetHack 3.5 dgn_comp.y $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 dgn_comp.y $Date: 2009/05/06 10:54:26 $ $Revision: 1.5 $ */
/* SCCS Id: @(#)dgn_comp.c 3.5 1996/06/22 */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* Copyright (c) 1990 by M. Stephenson */

View File

@@ -1,4 +1,5 @@
/* NetHack 3.5 dgn_main.c $Date$ $Revision$ */
/* NetHack 3.5 dgn_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 dgn_main.c $Date: 2009/05/06 10:54:27 $ $Revision: 1.7 $ */
/* SCCS Id: @(#)dgn_main.c 3.5 1994/09/23 */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* Copyright (c) 1990 by M. Stephenson */

View File

@@ -1,4 +1,5 @@
/* NetHack 3.5 dlb_main.c $Date$ $Revision$ */
/* NetHack 3.5 dlb_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 dlb_main.c $Date: 2012/01/16 03:56:08 $ $Revision: 1.6 $ */
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,5 +1,6 @@
%{
/* NetHack 3.5 lev_comp.l $Date$ $Revision$ */
/* NetHack 3.5 lev_comp.l $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 lev_comp.l $Date: 2009/05/06 10:54:31 $ $Revision: 1.9 $ */
/* SCCS Id: @(#)lev_lex.c 3.5 2002/03/27 */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,5 +1,6 @@
%{
/* NetHack 3.5 lev_comp.y $Date$ $Revision$ */
/* NetHack 3.5 lev_comp.y $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 lev_comp.y $Date: 2009/05/06 10:54:31 $ $Revision: 1.8 $ */
/* SCCS Id: @(#)lev_yacc.c 3.5 2007/08/01 */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,5 @@
/* NetHack 3.5 lev_main.c $Date$ $Revision$ */
/* NetHack 3.5 lev_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 lev_main.c $Date: 2012/01/12 04:48:12 $ $Revision: 1.20 $ */
/* SCCS Id: @(#)lev_main.c 3.5 2007/01/17 */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */
@@ -493,12 +494,7 @@ char c;
case '{' : return(FOUNTAIN);
case '\\' : return(THRONE);
case 'K' :
#ifdef SINKS
return(SINK);
#else
yywarning("Sinks are not allowed in this version! Ignoring...");
return(ROOM);
#endif
case '}' : return(MOAT);
case 'P' : return(POOL);
case 'L' : return(LAVAPOOL);

View File

@@ -1,11 +1,11 @@
/* NetHack 3.5 makedefs.c $Date$ $Revision$ */
/* NetHack 3.5 makedefs.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.63 $ */
/* NetHack 3.5 makedefs.c $Date: 2012/01/15 09:27:03 $ $Revision: 1.50 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* Copyright (c) M. Stephenson, 1990, 1991. */
/* Copyright (c) Dean Luick, 1990. */
/* NetHack may be freely redistributed. See license for details. */
#define MAKEDEFS_C /* use to conditionally include file sections */
/* #define DEBUG */ /* uncomment for debugging info */
#include "config.h"
#include "permonst.h"
@@ -384,6 +384,7 @@ getfp(template, tag, mode)
return rv;
}
static boolean debug = FALSE;
static FILE *inputfp;
static FILE *outputfp;
@@ -430,6 +431,15 @@ do_ext_makedefs(int argc, char **argv){
Fprintf(stdout, "%s", version_string(buf, delim));
exit(EXIT_SUCCESS);
}
IS_OPTION("debug"){
debug = TRUE;
CONTINUE;
}
IS_OPTION("make"){
CONSUME;
do_makedefs(argv[0]);
exit(EXIT_SUCCESS);
}
IS_OPTION("input"){
CONSUME;
if(!strcmp(argv[0], "-")){
@@ -959,9 +969,7 @@ do_rumors()
*
*/
#define IGNORED_FEATURES ( 0L \
| (1L << 12) /* GOLDOBJ */ \
| (1L << 20) /* EXP_ON_BOTL */ \
| (1L << 21) /* SCORE_ON_BOTL */ \
| (1L << 19) /* SCORE_ON_BOTL */ \
| (1L << 27) /* ZEROCOMP */ \
| (1L << 28) /* RLECOMP */ \
)
@@ -987,29 +995,11 @@ make_version()
*/
version.feature_set = (unsigned long)(0L
/* levels and/or topology (0..4) */
#ifdef REINCARNATION
| (1L << 1)
#endif
#ifdef SINKS
| (1L << 2)
#endif
/* monsters (5..9) */
#ifdef KOPS
#ifdef MAIL
| (1L << 6)
#endif
#ifdef MAIL
| (1L << 7)
#endif
/* objects (10..14) */
#ifdef TOURIST
| (1L << 10)
#endif
#ifdef STEED
| (1L << 11)
#endif
#ifdef GOLDOBJ
| (1L << 12)
#endif
/* flag bits and/or other global variables (15..26) */
#ifdef TEXTCOLOR
| (1L << 17)
@@ -1017,14 +1007,8 @@ make_version()
#ifdef INSURANCE
| (1L << 18)
#endif
#ifdef ELBERETH
| (1L << 19)
#endif
#ifdef EXP_ON_BOTL
| (1L << 20)
#endif
#ifdef SCORE_ON_BOTL
| (1L << 21)
| (1L << 19)
#endif
/* data format (27..31)
* External compression methods such as COMPRESS and ZLIB_COMP
@@ -1229,9 +1213,6 @@ static const char *build_opts[] = {
#ifdef ANSI_DEFAULT
"ANSI default terminal",
#endif
#ifdef AUTOPICKUP_EXCEPTIONS
"autopickup exceptions",
#endif
#ifdef TEXTCOLOR
"color",
#endif
@@ -1250,30 +1231,12 @@ static const char *build_opts[] = {
#ifdef DLB
"data librarian",
#endif
#ifdef WIZARD
"debug mode",
#endif
#ifdef DUNGEON_OVERVIEW
"dungeon map overview patch",
#endif
#ifdef ELBERETH
"Elbereth",
#endif
#ifdef EXP_ON_BOTL
"experience points on status line",
#endif
#ifdef MFLOPPY
"floppy drive support",
#endif
#ifdef GOLDOBJ
"gold object in inventories",
#endif
#ifdef INSURANCE
"insurance files for recovering from crashes",
#endif
#ifdef KOPS
"Keystone Kops",
#endif
#ifdef HOLD_LOCKFILE_OPEN
"exclusive lock on level 0 file",
#endif
@@ -1283,9 +1246,6 @@ static const char *build_opts[] = {
#ifdef MAIL
"mail daemon",
#endif
#ifdef BARGETHROUGH
"monsters moving monsters",
#endif
#ifdef GNUDOS
"MSDOS protected mode",
#endif
@@ -1303,18 +1263,9 @@ static const char *build_opts[] = {
# endif
# endif
#endif
#ifdef REDO
"redo command",
#endif
#ifdef SELECTSAVED
"restore saved games via menu",
#endif
#ifdef REINCARNATION
"rogue level",
#endif
#ifdef STEED
"saddles and riding",
#endif
#ifdef SCORE_ON_BOTL
"score on status line",
#endif
@@ -1340,15 +1291,9 @@ static const char *build_opts[] = {
# endif
# endif
#endif
#ifdef SEDUCE
"seduction",
#endif
#ifdef SHELL
"shell command",
#endif
#ifdef SINKS
"sinks",
#endif
#ifdef SUSPEND
"suspend command",
#endif
@@ -1362,9 +1307,6 @@ static const char *build_opts[] = {
#ifdef TIMED_DELAY
"timed wait for display effects",
#endif
#ifdef TOURIST
"tourists",
#endif
#ifdef USER_SOUNDS
# ifdef USER_SOUNDS_REGEX
"user sounds via regular expressions",
@@ -1681,12 +1623,6 @@ h_filter(line)
if (*line == '#') return TRUE; /* ignore comment lines */
if (sscanf(line, "----- %s", tag) == 1) {
skip = FALSE;
#ifndef SINKS
if (!strcmp(tag, "SINKS")) skip = TRUE;
#endif
#ifndef ELBERETH
if (!strcmp(tag, "ELBERETH")) skip = TRUE;
#endif
} else if (skip && !strncmp(line, "-----", 5))
skip = FALSE;
return skip;
@@ -1858,12 +1794,9 @@ static struct deflist {
const char *defname;
boolean true_or_false;
} deflist[] = {
#ifdef REINCARNATION
{ "REINCARNATION", TRUE },
#else
{ "REINCARNATION", FALSE },
#endif
{ 0, 0 } };
{ 0, 0 }
};
static int
check_control(s)
@@ -2322,36 +2255,30 @@ put_qt_hdrs()
/*
* The main header record.
*/
#ifdef DEBUG
Fprintf(stderr, "%ld: header info.\n", ftell(ofp));
#endif
if (debug) Fprintf(stderr, "%ld: header info.\n", ftell(ofp));
(void) fwrite((genericptr_t)&(qt_hdr.n_hdr), sizeof(int), 1, ofp);
(void) fwrite((genericptr_t)&(qt_hdr.id[0][0]), sizeof(char)*LEN_HDR,
qt_hdr.n_hdr, ofp);
(void) fwrite((genericptr_t)&(qt_hdr.offset[0]), sizeof(long),
qt_hdr.n_hdr, ofp);
#ifdef DEBUG
for(i = 0; i < qt_hdr.n_hdr; i++)
Fprintf(stderr, "%c @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]);
Fprintf(stderr, "\n");
#endif
if (debug) {
for(i = 0; i < qt_hdr.n_hdr; i++)
Fprintf(stderr, "%s @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]);
Fprintf(stderr, "\n");
}
/*
* The individual class headers.
*/
for(i = 0; i < qt_hdr.n_hdr; i++) {
#ifdef DEBUG
Fprintf(stderr, "%ld: %c header info.\n", ftell(ofp),
qt_hdr.id[i]);
#endif
if (debug) Fprintf(stderr, "%ld: %s header info.\n", ftell(ofp),
qt_hdr.id[i]);
(void) fwrite((genericptr_t)&(msg_hdr[i].n_msg), sizeof(int),
1, ofp);
(void) fwrite((genericptr_t)&(msg_hdr[i].qt_msg[0]),
sizeof(struct qtmsg), msg_hdr[i].n_msg, ofp);
#ifdef DEBUG
{ int j;
if (debug) { int j;
for(j = 0; j < msg_hdr[i].n_msg; j++) {
Fprintf(stderr, "msg %d @ %ld (%ld)",
msg_hdr[i].qt_msg[j].msgnum,
@@ -2363,7 +2290,6 @@ put_qt_hdrs()
Fprintf(stderr, "\n");
}
}
#endif
}
}
@@ -2416,9 +2342,7 @@ do_questtxt()
/* we have summary text; replace raw %E record with it */
Strcpy(in_line, summary_p); /* (guaranteed to fit) */
} else if(qt_comment(in_line)) continue;
#ifdef DEBUG
Fprintf(stderr, "%ld: %s", ftell(stdout), in_line);
#endif
if (debug) Fprintf(stderr, "%ld: %s", ftell(stdout), in_line);
(void) fputs(xcrypt(in_line), ofp);
}
Fclose(ifp);
@@ -2544,11 +2468,9 @@ do_objs()
if (!strncmp(objnam, "THE_", 4))
objnam += 4;
#ifdef TOURIST
/* fudge _platinum_ YENDORIAN EXPRESS CARD */
if (!strncmp(objnam, "PLATINUM_", 9))
objnam += 9;
#endif
Fprintf(ofp,"#define\tART_%s\t%d\n", limit(objnam, 1), i);
}

View File

@@ -1,5 +1,6 @@
/*
* NetHack 3.5 mdgrep.h $Date$ $Revision$
* NetHack 3.5 mdgrep.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
* NetHack 3.5 mdgrep.h $Date: 2010/05/01 20:57:17 $ $Revision: 1.5 $
* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008
* NetHack may be freely redistributed. See license for details.
*
@@ -256,11 +257,7 @@ static struct grep_var grep_vars[]={
#else
{"WIN_CE_SMARTPHONE", 0},
#endif
#if defined(WIZARD)
{"WIZARD", 1},
#else
{"WIZARD", 0},
#endif
#if defined(X11_GRAPHICS)
{"X11_GRAPHICS", 1},
#else

View File

@@ -1,5 +1,5 @@
#!perl
# NetHack 3.5 mdgrep.pl $NHDT-Date: 1423877528 2015/02/14 01:32:08 $ $NHDT-Revision: 1.7 $
# NetHack 3.5 mdgrep.pl $NHDT-Date: 1423877528 2015/02/14 01:32:08 $ $NHDT-Branch$:$NHDT-Revision: 1.7 $
# Copyright (c) Kenneth Lorber, Kensington, Maryland
# NetHack may be freely redistributed. See license for details.
@@ -18,7 +18,7 @@
# Game Features:
@feature = qw/ZEROCOMP USE_TILES ASCIIGRAPH CLIPPING TEXTCOLOR
COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS WIZARD
COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS
SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS
VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING
BSD_JOB_CONTROL MAIL POSIX_JOB_CONTROL INSURANCE
@@ -56,6 +56,7 @@ $outfile = "mdgrep.h";
sub start_file {
($rev) = ('$NHDT-Revision: 1.7 $') =~ m/: (.*) .$/;
my $date = '$NHDT-Date: 1423877529 2015/02/14 01:32:09 $';
my $branch = '$NHDT-Branch$';
my $revision = '$NHDT-Revision: 1.7 $';
open(OUT, ">$outfile") || die "open $outfile: $!";
# NB: Date and Revision below will be modified when mdgrep.h is written to
@@ -63,7 +64,7 @@ sub start_file {
# before generating mdgrep.h and committing that file).
print OUT <<E_O_M;
/*
* NetHack 3.5 $outfile $date $revision
* NetHack 3.5 $outfile $date $branch:$revision
* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008
* NetHack may be freely redistributed. See license for details.
*

View File

@@ -1,4 +1,5 @@
/* NetHack 3.5 panic.c $Date$ $Revision$ */
/* NetHack 3.5 panic.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 panic.c $Date: 2009/05/06 10:54:39 $ $Revision: 1.4 $ */
/* SCCS Id: @(#)panic.c 3.5 1994/03/02 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,5 @@
/* NetHack 3.5 recover.c $Date$ $Revision$ */
/* NetHack 3.5 recover.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 recover.c $Date: 2009/05/06 10:54:40 $ $Revision: 1.11 $ */
/* SCCS Id: @(#)recover.c 3.5 1999/10/23 */
/* Copyright (c) Janet Walz, 1992. */
/* NetHack may be freely redistributed. See license for details. */