Merge branch 'NetHack-3.6.0'
Conflicts: sys/share/dgn_lex.c sys/share/dgn_yacc.c sys/share/lev_lex.c sys/share/lev_yacc.c sys/share/pcmain.c win/win32/mswproc.c Changes to be committed: modified: Files modified: README modified: include/global.h modified: include/lint.h modified: include/patchlevel.h modified: include/sys.h modified: include/system.h modified: src/attrib.c modified: src/bones.c modified: src/dbridge.c modified: src/dig.c modified: src/eat.c modified: src/files.c modified: src/makemon.c modified: src/mkmaze.c modified: src/mon.c modified: src/sp_lev.c modified: src/version.c modified: sys/share/dgn_lex.c modified: sys/share/dgn_yacc.c modified: sys/share/lev_lex.c modified: sys/share/lev_yacc.c modified: sys/share/pcmain.c modified: sys/unix/Makefile.utl modified: util/dgn_comp.l modified: util/lev_comp.l modified: win/win32/mswproc.c
This commit is contained in:
116
Files
116
Files
@@ -6,7 +6,7 @@ from or not transferred to your system if you wish.
|
||||
|
||||
.:
|
||||
(files in top directory)
|
||||
DEVEL Files Porting README
|
||||
Files Porting README
|
||||
|
||||
dat:
|
||||
(files for all versions)
|
||||
@@ -26,7 +26,7 @@ Guidebook.mn Guidebook.tex Guidebook.txt dgn_comp.6 dgn_comp.txt
|
||||
dlb.6 dlb.txt fixes22.0 fixes30.0 fixes31.1
|
||||
fixes31.2 fixes31.3 fixes32.0 fixes32.1 fixes32.2
|
||||
fixes32.3 fixes33.0 fixes33.1 fixes34.0 fixes34.1
|
||||
fixes34.2 fixes34.3 fixes34.4 fixes36.0 lev_comp.6
|
||||
fixes34.2 fixes34.3 fixes35.0 fixes36.0 lev_comp.6
|
||||
lev_comp.txt makedefs.6 makedefs.txt nethack.6 nethack.txt
|
||||
recover.6 recover.txt tmac.n window.doc
|
||||
|
||||
@@ -42,10 +42,10 @@ mkroom.h monattk.h mondata.h monflag.h monst.h
|
||||
monsym.h ntconf.h obj.h objclass.h os2conf.h
|
||||
patchlevel.h pcconf.h permonst.h prop.h qtext.h
|
||||
quest.h rect.h region.h rm.h skills.h
|
||||
sp_lev.h spell.h system.h tcap.h timeout.h
|
||||
tosconf.h tradstdc.h trampoli.h trap.h unixconf.h
|
||||
vision.h vmsconf.h wceconf.h winami.h winprocs.h
|
||||
wintype.h you.h youprop.h
|
||||
sp_lev.h spell.h sys.h system.h tcap.h
|
||||
timeout.h tosconf.h tradstdc.h trampoli.h trap.h
|
||||
unixconf.h vision.h vmsconf.h wceconf.h winami.h
|
||||
winprocs.h wintype.h you.h youprop.h
|
||||
(file for tty versions)
|
||||
wintty.h
|
||||
(files for X versions)
|
||||
@@ -79,11 +79,11 @@ potion.c pray.c priest.c quest.c questpgr.c
|
||||
read.c rect.c region.c restore.c rip.c
|
||||
rnd.c role.c rumors.c save.c shk.c
|
||||
shknam.c sit.c sounds.c sp_lev.c spell.c
|
||||
steal.c steed.c teleport.c timeout.c topten.c
|
||||
track.c trap.c u_init.c uhitm.c vault.c
|
||||
version.c vision.c weapon.c were.c wield.c
|
||||
windows.c wizard.c worm.c worn.c write.c
|
||||
zap.c
|
||||
steal.c steed.c sys.c teleport.c timeout.c
|
||||
topten.c track.c trap.c u_init.c uhitm.c
|
||||
vault.c version.c vision.c weapon.c were.c
|
||||
wield.c windows.c wizard.c worm.c worn.c
|
||||
write.c zap.c
|
||||
|
||||
sys/amiga:
|
||||
(files for Amiga versions - untested for 3.6.0)
|
||||
@@ -119,8 +119,8 @@ sys/msdos:
|
||||
Install.dos Makefile.BC Makefile.GCC Makefile.MSC moveinit.pat
|
||||
msdos.c msdoshlp.txt ovlinit.c pckeys.c pctiles.c
|
||||
pctiles.h pcvideo.h portio.h schema1.BC schema2.BC
|
||||
schema3.MSC setup.bat sound.c tile2bin.c video.c
|
||||
vidtxt.c vidvga.c
|
||||
schema3.MSC SCHEMA35.MSC setup.bat sound.c tile2bin.c
|
||||
video.c vidtxt.c vidvga.c
|
||||
(files for running MSDOS binary under Windows)
|
||||
nhico.uu nhpif.uu
|
||||
|
||||
@@ -129,13 +129,13 @@ sys/os2:
|
||||
Install.os2 Makefile.os2 nhpmico.uu os2.c
|
||||
|
||||
sys/share:
|
||||
(files for MSDOS and OS/2 versions)
|
||||
(files for MSDOS and OS/2 versions - untested for 3.6.0)
|
||||
Makefile.lib termcap.uu
|
||||
(file for MSDOS, OS/2, NT, Amiga, and Atari versions)
|
||||
(file for MSDOS, OS/2, NT, Amiga, and Atari versions - untested for 3.6.0)
|
||||
pcmain.c
|
||||
(files for MSDOS, OS/2, NT, and Atari versions)
|
||||
(files for MSDOS, OS/2, NT, and Atari versions - untested for 3.6.0)
|
||||
pcsys.c pcunix.c
|
||||
(file for MSDOS, OS/2, and Atari versions)
|
||||
(file for MSDOS, OS/2, and Atari versions - untested for 3.6.0)
|
||||
NetHack.cnf pctty.c
|
||||
(files for UNIX and Be versions)
|
||||
ioctl.c unixtty.c
|
||||
@@ -169,7 +169,8 @@ sys/unix:
|
||||
(files for UNIX versions)
|
||||
Install.unx Makefile.dat Makefile.doc Makefile.src Makefile.top
|
||||
Makefile.utl README.linux depend.awk mkmkfile.sh nethack.sh
|
||||
setup.sh sysconf unixmain.c unixres.c unixunix.c
|
||||
NewInstall.unx setup.sh sysconf unixmain.c unixres.c
|
||||
unixunix.c
|
||||
(files for replacement cpp, only needed by some ancient UNIX systems)
|
||||
cpp1.shr cpp2.shr cpp3.shr
|
||||
(file for sound driver for 386 UNIX)
|
||||
@@ -177,8 +178,8 @@ snd86unx.shr
|
||||
|
||||
sys/unix/hints:
|
||||
(files for configuring UNIX NetHack versions)
|
||||
linux linux-x11 macosx macosx10.5 macosx10.7
|
||||
macosx10.10 unix
|
||||
linux linux-chroot linux-x11 macosx macosx10.5
|
||||
macosx10.7 macosx.sh macosx10.10 unix
|
||||
|
||||
sys/vms:
|
||||
(files for VMS version - untested for 3.6.0)
|
||||
@@ -196,28 +197,29 @@ mhdlg.h mhfont.c mhfont.h mhinput.c mhinput.h
|
||||
mhmain.c mhmain.h mhmap.c mhmap.h mhmenu.c
|
||||
mhmenu.h mhmsg.h mhmsgwnd.c mhmsgwnd.h mhrip.c
|
||||
mhrip.h mhstatus.c mhstatus.h mhtext.c mhtext.h
|
||||
mhtxtbuf.c mhtxtbuf.h mswproc.c newres.h resource.h
|
||||
winMS.h winhack.c winhack.rc winhcksp.rc winmain.c
|
||||
mhtxtbuf.c mhtxtbuf.h mswproc.c newres.h nhico.uu
|
||||
resource.h winMS.h winhack.c winhack.rc winhcksp.rc
|
||||
winmain.c
|
||||
|
||||
sys/wince/ceinc:
|
||||
(header files for Windows CE and PocketPC)
|
||||
(header files for Windows CE and PocketPC - untested for 3.6.0)
|
||||
assert.h errno.h fcntl.h
|
||||
|
||||
sys/wince/ceinc/sys:
|
||||
(sys/stat.h for Windows CE and PocketPC)
|
||||
(sys/stat.h for Windows CE and PocketPC - untested for 3.6.0)
|
||||
stat.h
|
||||
|
||||
sys/winnt:
|
||||
(files for Windows 9x, NT and Windows2000 version)
|
||||
(files for Windows 7/8.x/10 version)
|
||||
Install.nt Makefile.gcc Makefile.msc console.rc defaults.nh
|
||||
nethack.def nh340key.c nhdefkey.c nhico.uu nhraykey.c
|
||||
nhsetup.bat ntsound.c nttty.c porthelp sysconf
|
||||
win32api.h winnt.c
|
||||
nhsetup.bat ntsound.c nttty.c porthelp stubs.c
|
||||
sysconf win32api.h winnt.c
|
||||
|
||||
util:
|
||||
(files for all versions)
|
||||
dgn_main.c dlb_main.c lev_main.c makedefs.c panic.c
|
||||
recover.c
|
||||
dgn_main.c dlb_main.c lev_main.c makedefs.c mdgrep.h
|
||||
mdgrep.pl panic.c recover.c
|
||||
(lex/yacc input for special level and dungeon compilers)
|
||||
dgn_comp.l dgn_comp.y lev_comp.l lev_comp.y
|
||||
|
||||
@@ -235,14 +237,18 @@ nh_icon.xpm pet_mark.xbm pilemark.xbm rip.xpm tile2x11.c
|
||||
winX.c winmap.c winmenu.c winmesg.c winmisc.c
|
||||
winstat.c wintext.c winval.c
|
||||
|
||||
win/chain:
|
||||
(files for win/chain)
|
||||
wc_chainin.c wc_chainout.c wc_trace.c
|
||||
|
||||
win/gem:
|
||||
(files for GEM versions)
|
||||
(files for GEM versions - untested for 3.6.0)
|
||||
Install.gem bitmfile.c gem_rsc.uu gem_rso.uu gr_rect.c
|
||||
gr_rect.h load_img.c tile2img.c title.uu wingem.c
|
||||
wingem1.c xpm2img.c
|
||||
|
||||
win/gnome:
|
||||
(files for GNOME versions)
|
||||
(files for GNOME versions - untested for 3.6.0)
|
||||
README gn_xpms.h gnaskstr.c gnaskstr.h gnbind.c
|
||||
gnbind.h gnglyph.c gnglyph.h gnmain.c gnmain.h
|
||||
gnmap.c gnmap.h gnmenu.c gnmenu.h gnmesg.c
|
||||
@@ -251,11 +257,16 @@ gnplayer.h gnsignal.c gnsignal.h gnstatus.c gnstatus.h
|
||||
gntext.c gntext.h gnworn.c gnworn.h gnyesno.c
|
||||
gnyesno.h mapbg.xpm
|
||||
|
||||
win/macosx:
|
||||
(files for macosx versions)
|
||||
NetHackGuidebook.applescript NetHackRecover.applescript
|
||||
NetHackTerm.applescript recover.pl
|
||||
|
||||
win/share:
|
||||
(files for versions using optional tiles)
|
||||
gifread.c monsters.txt objects.txt other.txt ppmwrite.c
|
||||
thintile.c tile.doc tile.h tile2bmp.c tilemap.c
|
||||
tiletext.c
|
||||
renumtiles.pl thintile.c tile.doc tile.h tile2bmp.c
|
||||
tilemap.c tiletext.c
|
||||
|
||||
win/tty:
|
||||
(files for tty versions)
|
||||
@@ -271,11 +282,20 @@ mhsplash.h mhstatus.c mhstatus.h mhtext.c mhtext.h
|
||||
mnsel.uu mnselcnt.uu mnunsel.uu mswproc.c
|
||||
petmark.uu pilemark.uu resource.h rip.uu splash.uu
|
||||
tiles.mak winMS.h winhack.c winhack.rc
|
||||
|
||||
win/win32/vs2010:
|
||||
(files for Visual Studio 2010 Express Edition builds)
|
||||
dgncomp.vcxproj dgnstuff.vcxproj dgnstuff.mak dlb_main.vcxproj
|
||||
levcomp.vcxproj levstuff.vcxproj levstuff.mak makedefs.vcxproj
|
||||
NetHack.sln uudecode.vcxproj NetHackW.vcxproj tile2bmp.vcxproj
|
||||
recover.vcxproj tilemap.vcxproj tiles.vcxproj
|
||||
dgncomp.vcxproj dgnstuff.vcxproj dlb_main.vcxproj levcomp.vcxproj
|
||||
levstuff.vcxproj makedefs.vcxproj NetHack.sln NetHackW.vcxproj
|
||||
recover.vcxproj tile2bmp.vcxproj tilemap.vcxproj tiles.vcxproj
|
||||
uudecode.vcxproj
|
||||
|
||||
win/win32/vs2013:
|
||||
(files for Visual Studio 2013 Express Edition builds)
|
||||
dgncomp.vcxproj dgnstuff.vcxproj dlb_main.vcxproj levcomp.vcxproj
|
||||
levstuff.vcxproj makedefs.vcxproj NetHack.sln NetHack.vcxproj
|
||||
NetHackW.vcxproj nhdefkey.vcxproj recover.vcxproj tile2bmp.vcxproj
|
||||
tilemap.vcxproj tiles.vcxproj uudecode.vcxproj
|
||||
|
||||
This is a list of files produced by auxiliary programs. They can all be
|
||||
regenerated from the files in the distribution.
|
||||
@@ -355,22 +375,22 @@ uudecode.exe
|
||||
|
||||
DEVEL:
|
||||
(files for people developing changes to NetHack)
|
||||
DOTGIT code_style.txt nhgitset.pl
|
||||
Developer.txt git_recipes.txt
|
||||
code_features.txt hooksdir
|
||||
code_features.txt code_style.txt Developer.txt git_recipes.txt
|
||||
nhgitset.pl
|
||||
|
||||
DEVEL/DOTGIT:
|
||||
TARGET
|
||||
|
||||
DEVEL/hooksdir:
|
||||
NHadd nhsub pre-auto-gc
|
||||
NHgithook.pm post-applypatch pre-commit
|
||||
NHsubst post-checkout pre-push
|
||||
NHtext post-commit pre-rebase
|
||||
TARGET post-merge prepare-commit-msg
|
||||
applypatch-msg post-rewrite
|
||||
commit-msg pre-applypatch
|
||||
applypatch-msg commit-msg NHadd NHgithook.pm
|
||||
nhsub NHsubst NHtext post-applypatch
|
||||
post-checkout post-commit post-merge post-rewrite
|
||||
pre-applypatch pre-auto-gc pre-commit pre-push
|
||||
pre-rebase prepare-commit-msg TARGET
|
||||
|
||||
.:
|
||||
(files for win32 that are moved into . at compile time)
|
||||
nethack.dsw
|
||||
NetHack.dsw
|
||||
|
||||
NOTE: If your binaries were compiled with the data librarian (DLB) option,
|
||||
your playground will not contain all of the files listed here. All
|
||||
|
||||
2
README
2
README
@@ -61,7 +61,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code.
|
||||
on:
|
||||
|
||||
Intel Pentium or better (or clone) running Linux, BSDI, or
|
||||
Windows (XP through 10)
|
||||
Windows (7 through 10)
|
||||
Intel 80386 or greater (or clone) boxes running Linux, or BSDI
|
||||
Mac OS X 10.9
|
||||
OpenVMS (aka VMS) V8.4 on Alpha and on Integrity/Itanium/IA64
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 global.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.44 $ */
|
||||
/* NetHack 3.6 global.h $NHDT-Date: 1449116298 2015/12/03 04:18:18 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.46 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define BETA /* development or beta testing [MRS] */
|
||||
/* #define BETA */ /* development or beta testing [MRS] */
|
||||
|
||||
#define DEBUG
|
||||
/* #define DEBUG */
|
||||
|
||||
/*
|
||||
* Files expected to exist in the playground directory.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 lint.h $NHDT-Date: 1430897871 2015/05/06 07:37:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.0 $ */
|
||||
/* NetHack 3.6 lint.h $NHDT-Date: 1449269910 2015/12/04 22:58:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.3 $ */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
@@ -36,19 +36,21 @@ extern unsigned nhUse_dummy;
|
||||
#ifdef DEBUG
|
||||
#define showdebug(file) debugcore(file, TRUE)
|
||||
#define explicitdebug(file) debugcore(file, FALSE)
|
||||
#define ifdebug(stmt) \
|
||||
do { \
|
||||
if (showdebug(__FILE__)) \
|
||||
stmt; \
|
||||
#define ifdebug(stmt) \
|
||||
do { \
|
||||
if (showdebug(__FILE__)) { \
|
||||
stmt; \
|
||||
} \
|
||||
} while (0)
|
||||
#ifdef _MSC_VER
|
||||
/* if we have microsoft's C runtime we can use these instead */
|
||||
#include <crtdbg.h>
|
||||
#define crtdebug(stmt) \
|
||||
do { \
|
||||
if (showdebug(__FILE__)) \
|
||||
stmt; \
|
||||
_RPT0(_CRT_WARN, "\n"); \
|
||||
#define crtdebug(stmt) \
|
||||
do { \
|
||||
if (showdebug(__FILE__)) { \
|
||||
stmt; \
|
||||
} \
|
||||
_RPT0(_CRT_WARN, "\n"); \
|
||||
} while (0)
|
||||
#define debugpline0(str) crtdebug(_RPT0(_CRT_WARN, str))
|
||||
#define debugpline1(fmt, arg) crtdebug(_RPT1(_CRT_WARN, fmt, arg))
|
||||
|
||||
@@ -36,8 +36,12 @@
|
||||
/* Version 3.6.x */
|
||||
|
||||
/*
|
||||
* NetHack 3.6.0, June NN, NNNN
|
||||
* NetHack 3.6.0, December 7, 2015
|
||||
*
|
||||
* Hundreds of bug fixes.
|
||||
* Some code reorganization.
|
||||
* Some new features.
|
||||
* Variations of some community patches rolled in.
|
||||
*/
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 sys.h $NHDT-Date: 1448241778 2015/11/23 01:22:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.26 $ */
|
||||
/* NetHack 3.6 sys.h $NHDT-Date: 1449296291 2015/12/05 06:18:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */
|
||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -20,23 +20,21 @@ struct sysopt {
|
||||
* -1: getenv() didn't find a value for DEBUGFILES.
|
||||
*/
|
||||
int maxplayers;
|
||||
int seduce;
|
||||
int check_save_uid; /* restoring savefile checks UID? */
|
||||
|
||||
/* record file */
|
||||
int persmax;
|
||||
int pers_is_uid;
|
||||
int entrymax;
|
||||
int pointsmin;
|
||||
int tt_oname_maxrank;
|
||||
#ifdef PANICTRACE
|
||||
|
||||
/* panic options */
|
||||
char *gdbpath;
|
||||
char *greppath;
|
||||
int panictrace_gdb;
|
||||
#ifdef PANICTRACE_LIBC
|
||||
int panictrace_libc;
|
||||
#endif
|
||||
#endif
|
||||
int seduce;
|
||||
int check_save_uid; /* restoring savefile checks UID? */
|
||||
};
|
||||
|
||||
extern struct sysopt sysopt;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 system.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
|
||||
/* NetHack 3.6 system.h $NHDT-Date: 1449269772 2015/12/04 22:56:12 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -514,8 +514,9 @@ E char *FDECL(tgetstr, (const char *, char **));
|
||||
E char *FDECL(tgoto, (const char *, int, int));
|
||||
#endif
|
||||
|
||||
#ifdef ALLOC_C
|
||||
#if defined(ALLOC_C) || defined(MAKEDEFS_C)
|
||||
E genericptr_t FDECL(malloc, (size_t));
|
||||
E genericptr_t FDECL(realloc, (genericptr_t, size_t));
|
||||
#endif
|
||||
|
||||
/* time functions */
|
||||
|
||||
10
src/attrib.c
10
src/attrib.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 attrib.c $NHDT-Date: 1446975460 2015/11/08 09:37:40 $ $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */
|
||||
/* NetHack 3.6 attrib.c $NHDT-Date: 1449269911 2015/12/04 22:58:31 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.51 $ */
|
||||
/* Copyright 1988, 1989, 1990, 1992, M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -470,8 +470,9 @@ exerchk()
|
||||
/* Check out the periodic accumulations */
|
||||
exerper();
|
||||
|
||||
if (moves >= context.next_attrib_check)
|
||||
if (moves >= context.next_attrib_check) {
|
||||
debugpline1("exerchk: ready to test. multi = %d.", multi);
|
||||
}
|
||||
/* Are we ready for a test? */
|
||||
if (moves >= context.next_attrib_check && !multi) {
|
||||
debugpline0("exerchk: testing.");
|
||||
@@ -515,8 +516,9 @@ exerchk()
|
||||
? "Dex"
|
||||
: (i == A_CON)
|
||||
? "Con"
|
||||
: (i == A_CHA) ? "Cha?"
|
||||
: "???",
|
||||
: (i == A_CHA)
|
||||
? "Cha?"
|
||||
: "???",
|
||||
ax);
|
||||
/*
|
||||
* Law of diminishing returns (Part III):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 bones.c $NHDT-Date: 1446369463 2015/11/01 09:17:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.65 $ */
|
||||
/* NetHack 3.6 bones.c $NHDT-Date: 1449269914 2015/12/04 22:58:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.66 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -608,9 +608,10 @@ getbones()
|
||||
if (has_mname(mtmp))
|
||||
sanitize_name(MNAME(mtmp));
|
||||
if (mtmp->mhpmax == DEFUNCT_MONSTER) {
|
||||
if (wizard)
|
||||
if (wizard) {
|
||||
debugpline1("Removing defunct monster %s from bones.",
|
||||
mtmp->data->mname);
|
||||
}
|
||||
mongone(mtmp);
|
||||
} else
|
||||
/* to correctly reset named artifacts on the level */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 dbridge.c $NHDT-Date: 1446955279 2015/11/08 04:01:19 $ $NHDT-Branch: master $:$NHDT-Revision: 1.33 $ */
|
||||
/* NetHack 3.6 dbridge.c $NHDT-Date: 1449269914 2015/12/04 22:58:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.35 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -509,8 +509,9 @@ boolean chunks;
|
||||
{
|
||||
int misses;
|
||||
|
||||
if (chunks)
|
||||
if (chunks) {
|
||||
debugpline0("Do chunks miss?");
|
||||
}
|
||||
if (automiss(etmp))
|
||||
return TRUE;
|
||||
|
||||
@@ -590,13 +591,14 @@ struct entity *etmp;
|
||||
return;
|
||||
}
|
||||
if (e_missed(etmp, FALSE)) {
|
||||
if (at_portcullis)
|
||||
if (at_portcullis) {
|
||||
pline_The("portcullis misses %s!", e_nam(etmp));
|
||||
else
|
||||
} else {
|
||||
debugpline1("The drawbridge misses %s!", e_nam(etmp));
|
||||
if (e_survives_at(etmp, oldx, oldy))
|
||||
}
|
||||
if (e_survives_at(etmp, oldx, oldy)) {
|
||||
return;
|
||||
else {
|
||||
} else {
|
||||
debugpline0("Mon can't survive here");
|
||||
if (at_portcullis)
|
||||
must_jump = TRUE;
|
||||
@@ -978,10 +980,11 @@ int x, y;
|
||||
pline("%s hit by a huge chunk of metal!",
|
||||
E_phrase(etmp1, "are"));
|
||||
} else {
|
||||
if (!Deaf && !is_u(etmp1) && !is_pool(x, y))
|
||||
if (!Deaf && !is_u(etmp1) && !is_pool(x, y)) {
|
||||
You_hear("a crushing sound.");
|
||||
else
|
||||
} else {
|
||||
debugpline1("%s from shrapnel", E_phrase(etmp1, "die"));
|
||||
}
|
||||
}
|
||||
killer.format = KILLED_BY_AN;
|
||||
Strcpy(killer.name, "collapsing drawbridge");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 dig.c $NHDT-Date: 1446369465 2015/11/01 09:17:45 $ $NHDT-Branch: master $:$NHDT-Revision: 1.99 $ */
|
||||
/* NetHack 3.6 dig.c $NHDT-Date: 1449269915 2015/12/04 22:58:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.103 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1864,8 +1864,9 @@ int x, y;
|
||||
{
|
||||
struct obj *otmp, *otmp2;
|
||||
|
||||
if (level.objects[x][y] != (struct obj *) 0)
|
||||
if (level.objects[x][y] != (struct obj *) 0) {
|
||||
debugpline2("bury_objs: at <%d,%d>", x, y);
|
||||
}
|
||||
for (otmp = level.objects[x][y]; otmp; otmp = otmp2)
|
||||
otmp2 = bury_an_obj(otmp, (boolean *) 0);
|
||||
|
||||
|
||||
39
src/eat.c
39
src/eat.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 eat.c $NHDT-Date: 1446854226 2015/11/06 23:57:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.152 $ */
|
||||
/* NetHack 3.6 eat.c $NHDT-Date: 1449269916 2015/12/04 22:58:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.154 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -728,56 +728,57 @@ register struct permonst *ptr;
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
#define ifdebugresist(Msg) \
|
||||
do { \
|
||||
if (res) \
|
||||
debugpline0(Msg); \
|
||||
} while (0)
|
||||
#else
|
||||
#define ifdebugresist(Msg) /*empty*/
|
||||
#endif
|
||||
switch (type) {
|
||||
case FIRE_RES:
|
||||
res = (ptr->mconveys & MR_FIRE) != 0;
|
||||
if (res)
|
||||
debugpline0("can get fire resistance");
|
||||
ifdebugresist("can get fire resistance");
|
||||
break;
|
||||
case SLEEP_RES:
|
||||
res = (ptr->mconveys & MR_SLEEP) != 0;
|
||||
if (res)
|
||||
debugpline0("can get sleep resistance");
|
||||
ifdebugresist("can get sleep resistance");
|
||||
break;
|
||||
case COLD_RES:
|
||||
res = (ptr->mconveys & MR_COLD) != 0;
|
||||
if (res)
|
||||
debugpline0("can get cold resistance");
|
||||
ifdebugresist("can get cold resistance");
|
||||
break;
|
||||
case DISINT_RES:
|
||||
res = (ptr->mconveys & MR_DISINT) != 0;
|
||||
if (res)
|
||||
debugpline0("can get disintegration resistance");
|
||||
ifdebugresist("can get disintegration resistance");
|
||||
break;
|
||||
case SHOCK_RES: /* shock (electricity) resistance */
|
||||
res = (ptr->mconveys & MR_ELEC) != 0;
|
||||
if (res)
|
||||
debugpline0("can get shock resistance");
|
||||
ifdebugresist("can get shock resistance");
|
||||
break;
|
||||
case POISON_RES:
|
||||
res = (ptr->mconveys & MR_POISON) != 0;
|
||||
if (res)
|
||||
debugpline0("can get poison resistance");
|
||||
ifdebugresist("can get poison resistance");
|
||||
break;
|
||||
case TELEPORT:
|
||||
res = can_teleport(ptr);
|
||||
if (res)
|
||||
debugpline0("can get teleport");
|
||||
ifdebugresist("can get teleport");
|
||||
break;
|
||||
case TELEPORT_CONTROL:
|
||||
res = control_teleport(ptr);
|
||||
if (res)
|
||||
debugpline0("can get teleport control");
|
||||
ifdebugresist("can get teleport control");
|
||||
break;
|
||||
case TELEPAT:
|
||||
res = telepathic(ptr);
|
||||
if (res)
|
||||
debugpline0("can get telepathy");
|
||||
ifdebugresist("can get telepathy");
|
||||
break;
|
||||
default:
|
||||
/* res stays 0 */
|
||||
break;
|
||||
}
|
||||
#undef ifdebugresist
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
36
src/files.c
36
src/files.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 files.c $NHDT-Date: 1448323244 2015/11/24 00:00:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.190 $ */
|
||||
/* NetHack 3.6 files.c $NHDT-Date: 1449296293 2015/12/05 06:18:13 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.192 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2224,6 +2224,7 @@ int src;
|
||||
(void) strncpy(dogname, bufp, PL_PSIZ - 1);
|
||||
} else if (match_varname(buf, "CATNAME", 3)) {
|
||||
(void) strncpy(catname, bufp, PL_PSIZ - 1);
|
||||
|
||||
#ifdef SYSCF
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "WIZARDS", 7)) {
|
||||
if (sysopt.wizards)
|
||||
@@ -2249,7 +2250,7 @@ int src;
|
||||
/* if showdebug() has already been called (perhaps we've added
|
||||
some debugpline() calls to option processing) and has found
|
||||
a value for getenv("DEBUGFILES"), don't override that */
|
||||
if (sysopt.env_dbgfl == 0) {
|
||||
if (sysopt.env_dbgfl <= 0) {
|
||||
if (sysopt.debugfiles)
|
||||
free((genericptr_t) sysopt.debugfiles);
|
||||
sysopt.debugfiles = dupstr(bufp);
|
||||
@@ -2320,47 +2321,50 @@ int src;
|
||||
return 0;
|
||||
}
|
||||
sysopt.tt_oname_maxrank = n;
|
||||
#ifdef PANICTRACE
|
||||
|
||||
/* SYSCF PANICTRACE options */
|
||||
} else if (src == SET_IN_SYS
|
||||
&& match_varname(buf, "PANICTRACE_LIBC", 15)) {
|
||||
#ifdef PANICTRACE_LIBC
|
||||
n = atoi(bufp);
|
||||
#if defined(PANICTRACE) && defined(PANICTRACE_LIBC)
|
||||
if (n < 0 || n > 2) {
|
||||
raw_printf("Illegal value in PANICTRACE_LIBC (not 0,1,2).");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
sysopt.panictrace_libc = n;
|
||||
#endif /* PANICTRACE_LIBC */
|
||||
} else if (src == SET_IN_SYS
|
||||
&& match_varname(buf, "PANICTRACE_GDB", 14)) {
|
||||
n = atoi(bufp);
|
||||
#if defined(PANICTRACE)
|
||||
if (n < 0 || n > 2) {
|
||||
raw_printf("Illegal value in PANICTRACE_GDB (not 0,1,2).");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
sysopt.panictrace_gdb = n;
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "GDBPATH", 7)) {
|
||||
#ifndef VMS /* VMS panictrace support doesn't use gdb or grep */
|
||||
#if defined(PANICTRACE) && !defined(VMS)
|
||||
if (!file_exists(bufp)) {
|
||||
raw_printf("File specified in GDBPATH does not exist.");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if (sysopt.gdbpath)
|
||||
free((genericptr_t) sysopt.gdbpath);
|
||||
sysopt.gdbpath = dupstr(bufp);
|
||||
#endif
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "GREPPATH", 7)) {
|
||||
#ifndef VMS /* VMS panictrace support doesn't use gdb or grep */
|
||||
#if defined(PANICTRACE) && !defined(VMS)
|
||||
if (!file_exists(bufp)) {
|
||||
raw_printf("File specified in GREPPATH does not exist.");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if (sysopt.greppath)
|
||||
free((genericptr_t) sysopt.greppath);
|
||||
sysopt.greppath = dupstr(bufp);
|
||||
#endif /* !VMS */
|
||||
#endif /* PANICTRACE */
|
||||
#endif /* SYSCF */
|
||||
|
||||
} else if (match_varname(buf, "BOULDER", 3)) {
|
||||
(void) get_uchars(fp, buf, bufp, &iflags.bouldersym, TRUE, 1,
|
||||
"BOULDER");
|
||||
@@ -2559,7 +2563,7 @@ read_config_file(filename, src)
|
||||
const char *filename;
|
||||
int src;
|
||||
{
|
||||
char buf[4 * BUFSZ];
|
||||
char buf[4 * BUFSZ], *p;
|
||||
FILE *fp;
|
||||
boolean rv = TRUE; /* assume successful parse */
|
||||
|
||||
@@ -2577,8 +2581,16 @@ line at this level.
|
||||
OR: Forbid multiline stuff for alternate config sources.
|
||||
*/
|
||||
#endif
|
||||
if ((p = index(buf, '\n')) != 0)
|
||||
*p = '\0';
|
||||
if (!parse_config_line(fp, buf, src)) {
|
||||
raw_printf("Bad option line: \"%.50s\"", buf);
|
||||
static const char badoptionline[] = "Bad option line: \"%s\"";
|
||||
|
||||
/* truncate buffer if it's long; this is actually conservative */
|
||||
if (strlen(buf) > BUFSZ - sizeof badoptionline)
|
||||
buf[BUFSZ - sizeof badoptionline] = '\0';
|
||||
|
||||
raw_printf(badoptionline, buf);
|
||||
wait_synch();
|
||||
rv = FALSE;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 makemon.c $NHDT-Date: 1449052582 2015/12/02 10:36:22 $ $NHDT-Branch: master $:$NHDT-Revision: 1.104 $ */
|
||||
/* NetHack 3.6 makemon.c $NHDT-Date: 1449269917 2015/12/04 22:58:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.105 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -857,9 +857,10 @@ boolean ghostly;
|
||||
mvitals[mndx].born++;
|
||||
if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN)
|
||||
&& !(mvitals[mndx].mvflags & G_EXTINCT)) {
|
||||
if (wizard)
|
||||
if (wizard) {
|
||||
debugpline1("Automatically extinguished %s.",
|
||||
makeplural(mons[mndx].mname));
|
||||
}
|
||||
mvitals[mndx].mvflags |= G_EXTINCT;
|
||||
reset_rndmonst(mndx);
|
||||
}
|
||||
@@ -1072,9 +1073,10 @@ int mmflags;
|
||||
already been genocided, return */
|
||||
if (mvitals[mndx].mvflags & G_GENOD)
|
||||
return (struct monst *) 0;
|
||||
if (wizard && (mvitals[mndx].mvflags & G_EXTINCT))
|
||||
if (wizard && (mvitals[mndx].mvflags & G_EXTINCT)) {
|
||||
debugpline1("Explicitly creating extinct monster %s.",
|
||||
mons[mndx].mname);
|
||||
}
|
||||
} else {
|
||||
/* make a random (common) monster that can survive here.
|
||||
* (the special levels ask for random monsters at specific
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mkmaze.c $NHDT-Date: 1448013594 2015/11/20 09:59:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.41 $ */
|
||||
/* NetHack 3.6 mkmaze.c $NHDT-Date: 1449269918 2015/12/04 22:58:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.42 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -616,9 +616,10 @@ register const char *s;
|
||||
y_range = y_maze_max - y_maze_min - 2 * INVPOS_Y_MARGIN - 1;
|
||||
|
||||
if (x_range <= INVPOS_X_MARGIN || y_range <= INVPOS_Y_MARGIN
|
||||
|| (x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE))
|
||||
debugpline2("inv_pos: maze is too small! (%d x %d)", x_maze_max,
|
||||
y_maze_max);
|
||||
|| (x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE)) {
|
||||
debugpline2("inv_pos: maze is too small! (%d x %d)",
|
||||
x_maze_max, y_maze_max);
|
||||
}
|
||||
inv_pos.x = inv_pos.y = 0; /*{occupied() => invocation_pos()}*/
|
||||
do {
|
||||
x = rn1(x_range, x_maze_min + INVPOS_X_MARGIN + 1);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1447475944 2015/11/14 04:39:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.196 $ */
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1449269918 2015/12/04 22:58:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.199 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1470,7 +1470,7 @@ struct monst *mtmp, *mtmp2;
|
||||
/* transfer the monster's inventory */
|
||||
for (otmp = mtmp2->minvent; otmp; otmp = otmp->nobj) {
|
||||
if (otmp->where != OBJ_MINVENT || otmp->ocarry != mtmp)
|
||||
debugpline0("replmon: minvent inconsistency");
|
||||
impossible("replmon: minvent inconsistency");
|
||||
otmp->ocarry = mtmp2;
|
||||
}
|
||||
mtmp->minvent = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1449051497 2015/12/02 10:18:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.76 $ */
|
||||
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1449269920 2015/12/04 22:58:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.77 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1033,8 +1033,9 @@ chk:
|
||||
lev = &levl[x][y];
|
||||
for (; y <= ymax; y++) {
|
||||
if (lev++->typ) {
|
||||
if (!vault)
|
||||
if (!vault) {
|
||||
debugpline2("strange area [%d,%d] in check_room.", x, y);
|
||||
}
|
||||
if (!rn2(3))
|
||||
return FALSE;
|
||||
if (x < *lowx)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 version.c $NHDT-Date: 1446887538 2015/11/07 09:12:18 $ $NHDT-Branch: master $:$NHDT-Revision: 1.40 $ */
|
||||
/* NetHack 3.6 version.c $NHDT-Date: 1449328116 2015/12/05 15:08:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.41 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "patchlevel.h"
|
||||
#endif
|
||||
|
||||
#define BETA_INFO "Beta5"
|
||||
#define BETA_INFO ""
|
||||
|
||||
STATIC_DCL void FDECL(insert_rtoptions, (winid,char *,const char *));
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@
|
||||
#define yyerrok (yyerrflag=0)
|
||||
#define YYRECOVERING (yyerrflag!=0)
|
||||
#define YYPREFIX "yy"
|
||||
/* NetHack 3.6 dgn_comp.y $NHDT-Date: 1449188840 2015/12/04 00:27:20 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
|
||||
/* NetHack 3.6 dgn_comp.y $NHDT-Date: 1449233106 2015/12/04 12:45:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.11 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* Copyright (c) 1990 by M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@
|
||||
#define yyerrok (yyerrflag=0)
|
||||
#define YYRECOVERING (yyerrflag!=0)
|
||||
#define YYPREFIX "yy"
|
||||
/* NetHack 3.6 lev_comp.y $NHDT-Date: 1449188841 2015/12/04 00:27:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.19 $ */
|
||||
/* NetHack 3.6 lev_comp.y $NHDT-Date: 1449233826 2015/12/04 12:57:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.19 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 pcmain.c $NHDT-Date: 1449116934 2015/12/03 04:28:54 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.66 $ */
|
||||
/* NetHack 3.6 pcmain.c $NHDT-Date: 1449116336 2015/12/03 04:18:56 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.66 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Makefile for NetHack's utility programs.
|
||||
# NetHack 3.6 Makefile.utl $NHDT-Date: 1448711183 2015/11/28 11:46:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.26 $
|
||||
# NetHack 3.6 Makefile.utl $NHDT-Date: 1449386560 2015/12/06 07:22:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $
|
||||
|
||||
# Root of source tree:
|
||||
NHSROOT=..
|
||||
@@ -235,13 +235,19 @@ lev_lex.o: lev_lex.c $(HACK_H) ../include/lev_comp.h ../include/sp_lev.h
|
||||
|
||||
lev_yacc.c: lev_comp.y
|
||||
$(YACC) $(YACCDIST) -d lev_comp.y
|
||||
sed -e 's#"$(YTABC)"#"$@"#' $(YTABC) > $@ && rm $(YTABC)
|
||||
sed -e 's#"$(YTABC)"#"$@"#' -e 's#$(YTABC):#$@:#' $(YTABC) > $@ \
|
||||
&& rm $(YTABC)
|
||||
sed -e 's#"$(YTABH)"#"lev_comp.h"#' $(YTABH) > ../include/lev_comp.h \
|
||||
&& rm $(YTABH)
|
||||
|
||||
lev_lex.c: lev_comp.l
|
||||
$(LEX) $(FLEXDIST) lev_comp.l
|
||||
sed -e 's#"$(LEXYYC)"#"$@"#' $(LEXYYC) > $@ && rm $(LEXYYC)
|
||||
sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' $(LEXYYC) > $@ \
|
||||
&& rm $(LEXYYC)
|
||||
# note: flex code construction using m4 macros results in some trailing
|
||||
# spaces; <space><space><star> is basic RE substitute for <space><plus>
|
||||
# and we don't bother stripping trailing tabs because that gets messy;
|
||||
# make expands <dollar><dollar> into <dollar> which is RE end-of-line.
|
||||
|
||||
# with all of extern.h's functions to complain about, we drown in
|
||||
# 'defined but not used' without -u
|
||||
@@ -267,13 +273,16 @@ dgn_lex.o: dgn_lex.c $(CONFIG_H) ../include/dgn_comp.h ../include/dgn_file.h
|
||||
|
||||
dgn_yacc.c: dgn_comp.y
|
||||
$(YACC) $(YACCDIST) -d dgn_comp.y
|
||||
sed -e 's#"$(YTABC)"#"$@"#' $(YTABC) > $@ && rm $(YTABC)
|
||||
sed -e 's#"$(YTABC)"#"$@"#' -e 's#$(YTABC):#$@:#' $(YTABC) > $@ \
|
||||
&& rm $(YTABC)
|
||||
sed -e 's#"$(YTABH)"#"dgn_comp.h"#' $(YTABH) > ../include/dgn_comp.h \
|
||||
&& rm $(YTABH)
|
||||
|
||||
dgn_lex.c: dgn_comp.l
|
||||
$(LEX) $(FLEXDIST) dgn_comp.l
|
||||
sed -e 's#"$(LEXYYC)"#"$@"#' $(LEXYYC) > $@ && rm $(LEXYYC)
|
||||
sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' $(LEXYYC) > $@ \
|
||||
&& rm $(LEXYYC)
|
||||
# note: <space><space><star> is basic RE substitute for <space><plus>
|
||||
|
||||
# with all of extern.h's functions to complain about, we drown in
|
||||
# 'defined but not used' without -u
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%{
|
||||
/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1448710672 2015/11/28 11:37:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
|
||||
/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1449385184 2015/12/06 06:59:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* Copyright (c) 1990 by M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -61,20 +61,20 @@ int FDECL(yyoutput, (int));
|
||||
#define YY_NO_UNPUT
|
||||
#endif
|
||||
|
||||
#ifdef FLEX_SCANNER
|
||||
#define YY_MALLOC_DECL \
|
||||
genericptr_t FDECL(malloc, (size_t)); \
|
||||
genericptr_t FDECL(realloc, (genericptr_t,size_t));
|
||||
#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
|
||||
/* older flex wants this */
|
||||
#define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \
|
||||
genericptr_t FDECL(realloc, (genericptr_t, size_t));
|
||||
/* newer flex assumes <stdlib.h> so needs this in case it's been suppressed */
|
||||
YY_MALLOC_DECL
|
||||
#endif
|
||||
|
||||
|
||||
void FDECL(init_yyin, (FILE *));
|
||||
void FDECL(init_yyout, (FILE *));
|
||||
|
||||
/* this doesn't always get put in dgn_comp.h
|
||||
* (esp. when using older versions of bison)
|
||||
*/
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
int nh_line_number = 1;
|
||||
@@ -131,6 +131,7 @@ FILE *input_f;
|
||||
#endif
|
||||
yyin = input_f;
|
||||
}
|
||||
|
||||
/* analogous routine (for completeness) */
|
||||
void
|
||||
init_yyout( output_f )
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%{
|
||||
/* NetHack 3.6 lev_comp.l $NHDT-Date: 1448710678 2015/11/28 11:37:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.21 $ */
|
||||
/* NetHack 3.6 lev_comp.l $NHDT-Date: 1449385191 2015/12/06 06:59:51 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -59,10 +59,12 @@ int FDECL(yyoutput, (int));
|
||||
#define YY_NO_UNPUT
|
||||
#endif
|
||||
|
||||
#ifdef FLEX_SCANNER
|
||||
#define YY_MALLOC_DECL \
|
||||
genericptr_t FDECL(malloc, (size_t)); \
|
||||
genericptr_t FDECL(realloc, (genericptr_t,size_t));
|
||||
#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
|
||||
/* older flex wants this */
|
||||
#define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \
|
||||
genericptr_t FDECL(realloc, (genericptr_t, size_t));
|
||||
/* newer flex assumes <stdlib.h> so needs this in case it's been suppressed */
|
||||
YY_MALLOC_DECL
|
||||
#endif
|
||||
|
||||
void FDECL(init_yyin, (FILE *));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mswproc.c $NHDT-Date: 1449116947 2015/12/03 04:29:07 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.93 $ */
|
||||
/* NetHack 3.6 mswproc.c $NHDT-Date: 1449116670 2015/12/03 04:24:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.94 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user