Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-06-11 16:36:27 -04:00
42 changed files with 641 additions and 335 deletions

2
.gitattributes vendored
View File

@@ -13,3 +13,5 @@ README NHSUBST
*.uu NH_header=no
*.xpm NH_header=no
.git* NH_header=no
* NH_filestag=(file%s_in_top_directory)
NetHack.dsw NH_filestag=(file%s_for_win32_that_are_moved_into_._at_compile_time)

View File

@@ -4,3 +4,4 @@ hooksdir/* NHSUBST
* text=auto
DOTGIT/TARGET NH_header=no
hooksdir/TARGET NH_header=no
* NH_filestag=(file%s_for_people_developing_changes_to_NetHack)

584
Files
View File

@@ -3,424 +3,440 @@ in their standard manner on a UNIX system. It indicates which files are
necessary for which versions, so that you can tell which files may be deleted
from or not transferred to your system if you wish.
(Note: we ignore various dot files related to git.)
.:
(files in top directory)
Files Porting README
.clang-format Files Porting README
DEVEL:
(files for people developing changes to NetHack)
Developer.txt code_features.txt code_style.txt git_recipes.txt
gitinfo.pl nhgitset.pl
DEVEL/DOTGIT:
(file for people developing changes to NetHack)
TARGET
DEVEL/hooksdir:
(files for people developing changes to NetHack)
NHadd NHgithook.pm NHsubst
NHtext TARGET applypatch-msg
commit-msg nhsub post-applypatch
post-checkout post-commit post-merge
post-rewrite pre-applypatch pre-auto-gc
pre-commit pre-push pre-rebase
prepare-commit-msg
dat:
(files for all versions)
Arch.des Barb.des Caveman.des Healer.des Knight.des
Monk.des Priest.des Ranger.des Rogue.des Samurai.des
Tourist.des Valkyrie.des Wizard.des bigroom.des bogusmon.txt
castle.des cmdhelp data.base dungeon.def endgame.des
engrave.txt epitaph.txt gehennom.des help hh
history keyhelp knox.des license medusa.des
mines.des opthelp oracle.des oracles.txt quest.txt
rumors.fal rumors.tru sokoban.des symbols tower.des
tribute wizhelp yendor.des
Arch.des Barb.des Caveman.des Healer.des Knight.des
Monk.des Priest.des Ranger.des Rogue.des Samurai.des
Tourist.des Valkyrie.des Wizard.des bigroom.des bogusmon.txt
castle.des cmdhelp data.base dungeon.def endgame.des
engrave.txt epitaph.txt gehennom.des help hh
history keyhelp knox.des license medusa.des
mines.des opthelp oracle.des oracles.txt quest.txt
rumors.fal rumors.tru sokoban.des symbols tower.des
tribute wizhelp yendor.des
doc:
(files for all versions)
config.nh 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 fixes35.0 fixes36.0
fixes36.1 lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt
nethack.6 nethack.txt recover.6 recover.txt tmac.n
window.doc
Guidebook.mn Guidebook.tex Guidebook.txt config.nh 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 fixes35.0 fixes36.0
fixes36.1 fixes36.2 lev_comp.6 lev_comp.txt makedefs.6
makedefs.txt nethack.6 nethack.txt recover.6 recover.txt
tmac.n window.doc
include:
(files for all versions)
align.h amiconf.h artifact.h artilist.h attrib.h
beconf.h botl.h color.h config.h config1.h
context.h coord.h decl.h def_os2.h dgn_file.h
display.h dlb.h dungeon.h engrave.h extern.h
flag.h func_tab.h global.h hack.h integer.h
lev.h lint.h mail.h mextra.h mfndpos.h
micro.h 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 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)
tile2x11.h winX.h xwindow.h xwindowp.h
(files for Qt versions)
qt_clust.h qt_kde0.h qt_win.h qt_xpms.h qttableview.h
(files for Gem versions)
bitmfile.h gem_rsc.h load_img.h wingem.h
(files for GEM versions)
bitmfile.h gem_rsc.h load_img.h wingem.h
(file for GNOME versions)
winGnome.h
winGnome.h
(files for Qt versions)
qt_clust.h qt_kde0.h qt_win.h qt_xpms.h qttableview.h
(files for X versions)
tile2x11.h winX.h xwindow.h xwindowp.h
(files for all versions)
align.h amiconf.h artifact.h artilist.h attrib.h
beconf.h botl.h color.h config.h config1.h
context.h coord.h decl.h def_os2.h dgn_file.h
display.h dlb.h dungeon.h engrave.h extern.h
flag.h func_tab.h global.h hack.h integer.h
lev.h lint.h mail.h mextra.h mfndpos.h
micro.h 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 sys.h system.h
tcap.h tileset.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 various Macintosh versions)
mac-carbon.h mac-qt.h mac-term.h macconf.h macpopup.h
mactty.h macwin.h mttypriv.h
mac-carbon.h mac-qt.h mac-term.h macconf.h macpopup.h
mactty.h macwin.h mttypriv.h
src:
(files for all versions)
allmain.c alloc.c apply.c artifact.c attrib.c
ball.c bones.c botl.c cmd.c dbridge.c
decl.c detect.c dig.c display.c dlb.c
do.c do_name.c do_wear.c dog.c dogmove.c
dokick.c dothrow.c drawing.c dungeon.c eat.c
end.c engrave.c exper.c explode.c extralev.c
files.c fountain.c hack.c hacklib.c invent.c
light.c lock.c mail.c makemon.c mapglyph.c
mcastu.c mhitm.c mhitu.c minion.c mklev.c
mkmap.c mkmaze.c mkobj.c mkroom.c mon.c
mondata.c monmove.c monst.c mplayer.c mthrowu.c
muse.c music.c o_init.c objects.c objnam.c
options.c pager.c pickup.c pline.c polyself.c
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 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
allmain.c alloc.c apply.c artifact.c attrib.c ball.c
bones.c botl.c cmd.c dbridge.c decl.c detect.c
dig.c display.c dlb.c do.c do_name.c do_wear.c
dog.c dogmove.c dokick.c dothrow.c drawing.c dungeon.c
eat.c end.c engrave.c exper.c explode.c extralev.c
files.c fountain.c hack.c hacklib.c invent.c light.c
lock.c mail.c makemon.c mapglyph.c mcastu.c mhitm.c
mhitu.c minion.c mklev.c mkmap.c mkmaze.c mkobj.c
mkroom.c mon.c mondata.c monmove.c monst.c mplayer.c
mthrowu.c muse.c music.c o_init.c objects.c objnam.c
options.c pager.c pickup.c pline.c polyself.c 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 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.2)
Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf
amidos.c amidos.p amifont.uu amifont8.uu amigst.c
amii.hlp amimenu.c amirip.c amisnd.c amistack.c
amitty.c amiwind.c amiwind.p clipwin.c colorwin.c
cvtsnd.c grave16.xpm ifchange mkdmake txt2iff.c
winami.c winami.p winchar.c windefs.h winext.h
winfuncs.c winkey.c winmenu.c winproto.h winreq.c
winstr.c xpm2iff.c
Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf
amidos.c amidos.p amifont.uu amifont8.uu amigst.c
amii.hlp amimenu.c amirip.c amisnd.c amistack.c
amitty.c amiwind.c amiwind.p clipwin.c colorwin.c
cvtsnd.c grave16.xpm ifchange mkdmake txt2iff.c
winami.c winami.p winchar.c windefs.h winext.h
winfuncs.c winkey.c winmenu.c winproto.h winreq.c
winstr.c xpm2iff.c
sys/atari:
(files for Atari version - untested for 3.6.2)
Install.tos atarifnt.uue nethack.mnu setup.g tos.c
unx2atar.sed
Install.tos atarifnt.uue nethack.mnu setup.g tos.c
unx2atar.sed
sys/be:
(files for BeOS version - untested for 3.6.2)
README bemain.c
README bemain.c
sys/mac:
(files for 68K Macintosh versions)
Files.r Install.mw MacHelp NHDeflts NHrsrc.hqx
NHsound.hqx News README carbon.plist dprintf.c
maccurs.c macerrs.c macfile.c machelp.hqx macmain.c
macmenu.c macsnd.c mactopl.c mactty.c macunix.c
macwin.c mgetline.c mmodal.c mrecover.c mrecover.hqx
mttymain.c
Files.r Install.mw MacHelp NHDeflts NHrsrc.hqx
NHsound.hqx News README carbon.plist dprintf.c
maccurs.c macerrs.c macfile.c machelp.hqx macmain.c
macmenu.c macsnd.c mactopl.c mactty.c macunix.c
macwin.c mgetline.c mmodal.c mrecover.c mrecover.hqx
mttymain.c
sys/msdos:
(files for MSDOS version - untested for 3.6.2)
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 SCHEMA35.MSC setup.bat sound.c tile2bin.c
vesa.h video.c vidtxt.c vidvesa.c vidvga.c
Install.dos Makefile.BC Makefile.GCC Makefile.MSC SCHEMA35.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
vesa.h video.c vidtxt.c vidvesa.c vidvga.c
(files for running MSDOS binary under Windows)
nhico.uu nhpif.uu
nhico.uu nhpif.uu
sys/os2:
(files for OS/2 version - untested for 3.6.2)
Install.os2 Makefile.os2 nhpmico.uu os2.c
Install.os2 Makefile.os2 nhpmico.uu os2.c
sys/share:
(files for MSDOS and OS/2 versions - untested for 3.6.2)
Makefile.lib termcap.uu
(file for MSDOS, OS/2, NT, Amiga, and Atari versions - untested for 3.6.2)
pcmain.c
(files for MSDOS, OS/2, NT, and Atari versions - untested for 3.6.2)
pcsys.c pcunix.c
(file for MSDOS, OS/2, and Atari versions - untested for 3.6.2)
NetHack.cnf pctty.c
(files for UNIX and Be versions)
ioctl.c unixtty.c
(file for NT version)
nhlan.c
(Berkeley random number file, which may be included in any version)
random.c
random.c
(Berkeley uudecode file, which may be used in build process of any version)
uudecode.c
(file for VMS version)
tclib.c
uudecode.c
(file for MSDOS, OS/2, NT, Amiga, and Atari versions - untested for 3.6.2)
pcmain.c
(file for MSDOS, OS/2, and Atari versions - untested for 3.6.2)
NetHack.cnf pctty.c
(file for MSDOS, OS/2, and VMS versions)
termcap
termcap
(file for NT version)
nhlan.c
(file for VMS version)
tclib.c
(files for MSDOS and OS/2 versions - untested for 3.6.2)
Makefile.lib termcap.uu
(files for MSDOS, OS/2, NT, and Atari versions - untested for 3.6.2)
pcsys.c pcunix.c
(files for UNIX and Be versions)
ioctl.c unixtty.c
(lex/yacc output for special level and dungeon compilers)
dgn_comp.h dgn_lex.c dgn_yacc.c lev_comp.h lev_lex.c
lev_yacc.c
dgn_comp.h dgn_lex.c dgn_yacc.c lev_comp.h lev_lex.c lev_yacc.c
(posix regex for versions that include regex in their C library)
posixregex.c
posixregex.c
(c++ regex code for versions that can build a C++ module and link it in)
cppregex.cpp
cppregex.cpp
(pmatch regex for other versions)
pmatchregex.c
pmatchregex.c
sys/share/sounds:
(files for Amiga and Macintosh versions)
README bell.uu bugle.uu erthdrum.uu firehorn.uu
frsthorn.uu lethdrum.uu mgcflute.uu mgcharp.uu toolhorn.uu
wdnflute.uu wdnharp.uu
README bell.uu bugle.uu erthdrum.uu firehorn.uu frsthorn.uu
lethdrum.uu mgcflute.uu mgcharp.uu toolhorn.uu wdnflute.uu wdnharp.uu
sys/unix:
(files for UNIX versions)
Install.unx Makefile.dat Makefile.doc Makefile.src Makefile.top
Makefile.utl README.linux depend.awk gitinfo.sh mkmkfile.sh
nethack.sh NewInstall.unx setup.sh sysconf unixmain.c
unixres.c unixunix.c
Install.unx Makefile.dat Makefile.doc Makefile.src
Makefile.top Makefile.utl NewInstall.unx README.linux
depend.awk gitinfo.sh mkmkfile.sh nethack.sh
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
cpp1.shr cpp2.shr cpp3.shr
(file for sound driver for 386 UNIX)
snd86unx.shr
snd86unx.shr
sys/unix/hints:
(files for configuring UNIX NetHack versions)
linux linux-chroot linux-qt4 linux-x11 macosx
macosx10.5 macosx10.7 macosx10.8 macosx10.10 macosx.sh
unix
linux linux-chroot linux-qt4 linux-x11 macosx
macosx.sh macosx10.10 macosx10.5 macosx10.7 macosx10.8
unix
sys/vms:
(files for VMS version)
Install.vms Makefile.dat Makefile.doc Makefile.src Makefile.top
Makefile.utl install.com lev_lex.h nethack.com oldcrtl.c
spec_lev.com sysconf vmsbuild.com vmsfiles.c vmsmail.c
vmsmain.c vmsmisc.c vmstty.c vmsunix.c
Install.vms Makefile.dat Makefile.doc Makefile.src Makefile.top
Makefile.utl install.com lev_lex.h nethack.com oldcrtl.c
spec_lev.com sysconf vmsbuild.com vmsfiles.c vmsmail.c
vmsmain.c vmsmisc.c vmstty.c vmsunix.c
sys/wince:
(files for Windows CE and PocketPC - untested for 3.6.2)
Install.ce bootstrp.mak celib.c cesetup.bat cesound.c
defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h
mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c
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 nhico.uu
resource.h winMS.h winhack.c winhack.rc winhcksp.rc
winmain.c
Install.ce bootstrp.mak celib.c cesetup.bat cesound.c
defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h
mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c
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 nhico.uu
resource.h winMS.h winhack.c winhack.rc winhcksp.rc
winmain.c
sys/wince/ceinc:
(header files for Windows CE and PocketPC - untested for 3.6.2)
assert.h errno.h fcntl.h
assert.h errno.h fcntl.h
sys/wince/ceinc/sys:
(sys/stat.h for Windows CE and PocketPC - untested for 3.6.2)
stat.h
stat.h
sys/winnt:
(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 stubs.c
sysconf win32api.h winnt.c
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 stubs.c
sysconf win32api.h winnt.c
util:
(files for all versions)
dgn_main.c dlb_main.c lev_main.c makedefs.c mdgrep.h
mdgrep.pl 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
dgn_comp.l dgn_comp.y lev_comp.l lev_comp.y
win/Qt:
(files for the Qt 3 widget library - X11, Windows, Mac OS X, or Qtopia)
Info.plist Install.Qt knethack.lnk knh-mini.xpm knh.xpm
nhicns.uu nhsplash.xpm qt_clust.cpp qt_win.cpp qttableview.cpp
tileedit.cpp tileedit.h qpe-nethack.control
Info.plist Install.Qt knethack.lnk
knh-mini.xpm knh.xpm nhicns.uu
nhsplash.xpm qpe-nethack.control qt_clust.cpp
qt_win.cpp qttableview.cpp tileedit.cpp
tileedit.h
win/Qt4:
(files for the Qt 4 widget library - X11, Windows, Mac OS X)
qt4bind.cpp qt4bind.h qt4click.cpp qt4click.h qt4clust.cpp
qt4clust.h qt4delay.cpp qt4delay.h qt4glyph.cpp qt4glyph.h
qt4icon.cpp qt4icon.h qt4inv.cpp qt4inv.h qt4kde0.h
qt4key.cpp qt4key.h qt4line.cpp qt4line.h qt4main.cpp
qt4main.h qt4map.cpp qt4map.h qt4menu.cpp qt4menu.h
qt4msg.cpp qt4msg.h qt4plsel.cpp qt4plsel.h qt4rip.cpp
qt4rip.h qt4set.cpp qt4set.h qt4stat.cpp qt4stat.h
qt4str.cpp qt4streq.cpp qt4streq.h qt4str.h qt4svsel.cpp
qt4svsel.h qt4win.cpp qt4win.h qt4xcmd.cpp qt4xcmd.h
qt4yndlg.cpp qt4yndlg.h
qt4bind.cpp qt4bind.h qt4click.cpp qt4click.h qt4clust.cpp
qt4clust.h qt4delay.cpp qt4delay.h qt4glyph.cpp qt4glyph.h
qt4icon.cpp qt4icon.h qt4inv.cpp qt4inv.h qt4kde0.h
qt4key.cpp qt4key.h qt4line.cpp qt4line.h qt4main.cpp
qt4main.h qt4map.cpp qt4map.h qt4menu.cpp qt4menu.h
qt4msg.cpp qt4msg.h qt4plsel.cpp qt4plsel.h qt4rip.cpp
qt4rip.h qt4set.cpp qt4set.h qt4stat.cpp qt4stat.h
qt4str.cpp qt4str.h qt4streq.cpp qt4streq.h qt4svsel.cpp
qt4svsel.h qt4win.cpp qt4win.h qt4xcmd.cpp qt4xcmd.h
qt4yndlg.cpp qt4yndlg.h
win/X11:
(files for X versions)
Install.X11 NetHack.ad Window.c dialogs.c ibm.bdf
nethack.rc nh10.bdf nh32icon nh56icon nh72icon
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
Install.X11 NetHack.ad Window.c dialogs.c ibm.bdf
nethack.rc nh10.bdf nh32icon nh56icon nh72icon
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 stacking window systems)
wc_chainin.c wc_chainout.c wc_trace.c
wc_chainin.c wc_chainout.c wc_trace.c
win/gem:
(files for GEM versions - untested for 3.6.2)
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
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 - untested for 3.6.2)
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
gnmesg.h gnomeprv.h gnopts.c gnopts.h gnplayer.c
gnplayer.h gnsignal.c gnsignal.h gnstatus.c gnstatus.h
gntext.c gntext.h gnworn.c gnworn.h gnyesno.c
gnyesno.h mapbg.xpm
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 gnmesg.h gnomeprv.h gnopts.c
gnopts.h gnplayer.c 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
NetHackGuidebook.applescript NetHackRecover.applescript
NetHackTerm.applescript recover.pl
win/share:
(files for versions using optional tiles)
gifread.c giftiles.c monsters.txt objects.txt other.txt
ppmwrite.c renumtiles.pl thintile.c tile.doc tile.h
tile2bmp.c tilemap.c tiletext.c
bmptiles.c gifread.c giftiles.c monsters.txt objects.txt
other.txt ppmwrite.c renumtiles.pl thintile.c tile.doc
tile.h tile2bmp.c tilemap.c tileset.c tiletext.c
win/tty:
(files for tty versions)
getline.c termcap.c topl.c wintty.c
getline.c termcap.c topl.c wintty.c
win/win32:
(files for Windows versions - tested up to Windows 10)
mhaskyn.c mhaskyn.h mhdlg.c 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 mhsplash.c
mhsplash.h mhstatus.c mhstatus.h mhtext.c mhtext.h
mnsel.uu mnselcnt.uu mnunsel.uu mswproc.c petmark.uu
pilemark.uu record.uu resource.h rip.uu splash.uu
tiles.mak winMS.h winhack.c winhack.rc
dgnstuff.mak levstuff.mak mhaskyn.c mhaskyn.h mhdlg.c
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 mhsplash.c mhsplash.h mhstatus.c mhstatus.h
mhtext.c mhtext.h mnsel.uu mnselcnt.uu mnunsel.uu
mswproc.c nethack.rc nhresource.h petmark.uu pilemark.uu
record.uu resource.h rip.uu splash.uu tiles.mak
winMS.h winhack.c winhack.rc
win/win32/vs2015:
(files for Visual Studio 2015 Express Edition builds)
afterdgncomp.proj afterdlb.proj afterlevcomp.proj aftermakedefs.proj
afternethack.proj afterrecover.proj aftertile2bmp.proj aftertilemap.proj
afteruudecode.proj build.bat common.props config.props
console.props default.props default_dll.props dgncomp.vcxproj
dirs.props dlb.vcxproj dll.props files.props
levcomp.vcxproj makedefs.vcxproj NetHack.sln NetHack.vcxproj
NetHackW.vcxproj nh340key.def nh340key.vcxproj nhdefkey.def
nhdefkey.vcxproj nhraykey.def nhraykey.vcxproj notes.txt
recover.vcxproj tile2bmp.vcxproj tilemap.vcxproj tiles.vcxproj
uudecode.vcxproj
(files for Windows versions - tested up to Windows 10)
NetHack.sln NetHack.vcxproj NetHackW.vcxproj
afterdgncomp.proj afterdlb.proj afterlevcomp.proj
aftermakedefs.proj afternethack.proj afterrecover.proj
aftertile2bmp.proj aftertilemap.proj afteruudecode.proj
build.bat common.props config.props
console.props default.props default_dll.props
dgncomp.vcxproj dirs.props dlb.vcxproj
dll.props files.props levcomp.vcxproj
makedefs.vcxproj nh340key.def nh340key.vcxproj
nhdefkey.def nhdefkey.vcxproj nhraykey.def
nhraykey.vcxproj notes.txt recover.vcxproj
tile2bmp.vcxproj tilemap.vcxproj tiles.vcxproj
uudecode.vcxproj
win/win32/vs2017:
(files for Visual Studio 2017 Community Edition builds)
afterdgncomp.proj afterdlb.proj afterlevcomp.proj aftermakedefs.proj
afternethack.proj afterrecover.proj aftertile2bmp.proj aftertilemap.proj
afteruudecode.proj build.bat common.props config.props
console.props default.props default_dll.props dgncomp.vcxproj
dirs.props dlb.vcxproj dll.props files.props
levcomp.vcxproj makedefs.vcxproj NetHack.sln NetHack.vcxproj
NetHackW.vcxproj nh340key.def nh340key.vcxproj nhdefkey.def
nhdefkey.vcxproj nhraykey.def nhraykey.vcxproj recover.vcxproj
tile2bmp.vcxproj tilemap.vcxproj tiles.vcxproj uudecode.vcxproj
NetHack.sln NetHack.vcxproj NetHackW.vcxproj
afterdgncomp.proj afterdlb.proj afterlevcomp.proj
aftermakedefs.proj afternethack.proj afterrecover.proj
aftertile2bmp.proj aftertilemap.proj afteruudecode.proj
build.bat common.props config.props
console.props default.props default_dll.props
dgncomp.vcxproj dirs.props dlb.vcxproj
dll.props files.props levcomp.vcxproj
makedefs.vcxproj nh340key.def nh340key.vcxproj
nhdefkey.def nhdefkey.vcxproj nhraykey.def
nhraykey.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.
dat:
(files generated by makedefs at playground creation time)
data dungeon.pdf options oracles quest.dat
rumors
(file generated by dgn_comp at playground creation time)
dungeon
(files generated by lev_comp at playground creation time)
Arc-fila.lev Arc-filb.lev Arc-goal.lev Arc-loca.lev Arc-strt.lev
Bar-fila.lev Bar-filb.lev Bar-goal.lev Bar-loca.lev Bar-strt.lev
Cav-fila.lev Cav-filb.lev Cav-goal.lev Cav-loca.lev Cav-strt.lev
Hea-fila.lev Hea-filb.lev Hea-goal.lev Hea-loca.lev Hea-strt.lev
Kni-fila.lev Kni-filb.lev Kni-goal.lev Kni-loca.lev Kni-strt.lev
Mon-fila.lev Mon-filb.lev Mon-goal.lev Mon-loca.lev Mon-strt.lev
Pri-fila.lev Pri-filb.lev Pri-goal.lev Pri-loca.lev Pri-strt.lev
Ran-fila.lev Ran-filb.lev Ran-goal.lev Ran-loca.lev Ran-strt.lev
Rog-fila.lev Rog-filb.lev Rog-goal.lev Rog-loca.lev Rog-strt.lev
Sam-fila.lev Sam-filb.lev Sam-goal.lev Sam-loca.lev Sam-strt.lev
Tou-fila.lev Tou-filb.lev Tou-goal.lev Tou-loca.lev Tou-strt.lev
Val-fila.lev Val-filb.lev Val-goal.lev Val-loca.lev Val-strt.lev
Wiz-fila.lev Wiz-filb.lev Wiz-goal.lev Wiz-loca.lev Wiz-strt.lev
air.lev asmodeus.lev astral.lev baalz.lev bigrm-1.lev
bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev castle.lev
earth.lev fakewiz1.lev fakewiz2.lev fire.lev juiblex.lev
knox.lev medusa-1.lev medusa-2.lev minefill.lev minend-1.lev
minend-2.lev minend-3.lev minetn-1.lev minetn-2.lev minetn-3.lev
minetn-4.lev minetn-5.lev minetn-6.lev minetn-7.lev oracle.lev
orcus.lev sanctum.lev soko1-1.lev soko1-2.lev soko2-1.lev
soko2-2.lev soko3-1.lev soko3-2.lev soko4-1.lev soko4-2.lev
tower1.lev tower2.lev tower3.lev valley.lev water.lev
wizard1.lev wizard2.lev wizard3.lev
(tile files optionally generated for X ports at playground creation time)
pet_mark.xbm rip.xpm x11tiles
dungeon
(files generated by makedefs at playground creation time)
data dungeon.pdf options oracles quest.dat rumors
(files generated for Qt interface on Mac OS X)
nethack.icns Info.plist
Info.plist nethack.icns
(files generated for win32 at compile time)
porthelp dlb.lst
(files generated for win32 tty at compile time)
ttyoptions
dlb.lst porthelp
(files generated for win32 gui at compile time)
guioptions
guioptions
(files generated for win32 tty at compile time)
ttyoptions
(tile files optionally generated for X ports at playground creation time)
pet_mark.xbm rip.xpm x11tiles
include:
(files generated by makedefs at compile time)
date.h onames.h pm.h vis_tab.h
(files generated by yacc (or copied from sys/share) at compile time)
dgn_comp.h lev_comp.h
(file for tiles support copied from win/share at compile time)
tile.h
(files for win32 that are moved into include at compile time)
win32api.h
tile.h
(file for win32 that are moved into include at compile time)
win32api.h
(files generated by makedefs at compile time)
date.h onames.h pm.h vis_tab.h
(files generated by yacc (or copied from sys/share) at compile time)
dgn_comp.h lev_comp.h
src:
(files generated by makedefs at compile time)
monstr.c vis_tab.c
(file optionally generated by tilemap at compile time)
tile.c
(files generated by 'moc' for Qt interface at compile time)
qt_kde0.moc qt_win.moc qttableview.moc
(files for win32 that are moved into src at compile time)
Makefile Makefile.bcc Makefile.gcc
Makefile Makefile.bcc Makefile.gcc
(files generated by 'moc' for Qt interface at compile time)
qt_kde0.moc qt_win.moc qttableview.moc
(files generated by makedefs at compile time)
monstr.c vis_tab.c
(file optionally generated by tilemap at compile time)
tile.c
sys/winnt:
(files generated by uudecode at compile time)
nethack.ico
(file generated by uudecode at compile time)
nethack.ico
util:
(files generated by lex and yacc (or copied from sys/share) at compile time)
dgn_lex.c dgn_yacc.c lev_lex.c lev_yacc.c
dgn_lex.c dgn_yacc.c lev_lex.c lev_yacc.c
(file generated for unix at compile time if various tiles utilities are built)
tiletxt.c
(files generated for win32 at compile time)
uudecode.exe
tiletxt.c
DEVEL:
(files for people developing changes to NetHack)
code_features.txt code_style.txt Developer.txt git_recipes.txt
nhgitset.pl
DEVEL/DOTGIT:
TARGET
DEVEL/hooksdir:
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
(file generated for win32 at compile time)
uudecode.exe
NOTE: If your binaries were compiled with the data librarian (DLB) option,
your playground will not contain all of the files listed here. All
of the files listed as being required for the playground must still
have been built by your compiler, but the DLB code will roll them up
into another file (or files).

2
dat/.gitattributes vendored
View File

@@ -4,3 +4,5 @@
data.base NHSUBST
symbols NHSUBST
tribute NHSUBST
* NH_filestag=(file%s_for_all_versions)
..files NH_filegenprog

1
doc/.gitattributes vendored
View File

@@ -7,3 +7,4 @@ Guidebook.txt NH_header=no
tmac.n NH_header=no
fixes* NH_header=no
*.txt NH_header=no
* NH_filestag=(file%s_for_all_versions)

View File

@@ -30,6 +30,12 @@ using 'O' to set up a hilite_status rule for string comparison, the menu for
when finishing using 'O' to examine or set hilite_status rules, if the
'statushilites' option is 0 and there is at least one rule, give a
reminder about setting it to non-zero to activate highlighting
end of game disclosure was exercising Wisdom when revealing inventory and
also repeatedly updating persistent inventory window if enabled
internals for 'sortloot' option have been changed to not reorder the actual
list of objects, so changing it to 'n'one will get the original order
back and having a persistent inventory window open when performing
full-pack identify won't result in possibly skipping some items
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository

43
include/.gitattributes vendored Normal file
View File

@@ -0,0 +1,43 @@
* NH_filestag=(file%s_for_all_versions)
..files NH_filegenerated=win32api.h,tile.h,dgn_comp.h,lev_comp.h,date.h,onames.h,pm.h,vis_tab.h
win32api.h NH_filesgentag=(file%s_for_win32_that_are_moved_into_include_at_compile_time)
tile.h NH_filesgentag=(file%s_for_tiles_support_copied_from_win/share_at_compile_time)
dgn_comp.h NH_filesgentag=(file%s_generated_by_yacc_(or_copied_from_sys/share)_at_compile_time)
lev_comp.h NH_filesgentag=>dgn_comp.h
date.h NH_filesgentag=(file%s_generated_by_makedefs_at_compile_time)
onames.h NH_filesgentag=>date.h
pm.h NH_filesgentag=>date.h
vis_tab.h NH_filesgentag=>date.h
wintty.h NH_filestag=(file%s_for_tty_versions)
tile2x11.h NH_filestag=(file%s_for_X_versions)
winX.h NH_filestag=>tile2x11.h
xwindow.h NH_filestag=>tile2x11.h
xwindowp.h NH_filestag=>tile2x11.h
qt_clust.h NH_filestag=(file%s_for_Qt_versions)
qt_kde0.h NH_filestag=>qt_clust.h
qt_win.h NH_filestag=>qt_clust.h
qt_xpms.h NH_filestag=>qt_clust.h
qttableview.h NH_filestag=>qt_clust.h
bitmfile.h NH_filestag=(file%s_for_GEM_versions)
gem_rsc.h NH_filestag=>bitmfile.h
load_img.h NH_filestag=>bitmfile.h
wingem.h NH_filestag=>bitmfile.h
winGnome.h NH_filestag=(file%s_for_GNOME_versions)
mac-carbon.h NH_filestag=(file%s_for_various_Macintosh_versions)
mac-qt.h NH_filestag=>mac-carbon.h
mac-term.h NH_filestag=>mac-carbon.h
macconf.h NH_filestag=>mac-carbon.h
macpopup.h NH_filestag=>mac-carbon.h
mactty.h NH_filestag=>mac-carbon.h
macwin.h NH_filestag=>mac-carbon.h
mttypriv.h NH_filestag=>mac-carbon.h

View File

@@ -934,7 +934,9 @@ E void FDECL(strbuf_nl_to_crlf, (strbuf_t *));
/* ### invent.c ### */
E void FDECL(sortloot, (struct obj **, unsigned, BOOLEAN_P));
E Loot *FDECL(sortloot, (struct obj **, unsigned, BOOLEAN_P,
boolean (*)(OBJ_P)));
E void FDECL(unsortloot, (Loot **));
E void FDECL(assigninvlet, (struct obj *));
E struct obj *FDECL(merge_choice, (struct obj *, struct obj *));
E int FDECL(merged, (struct obj **, struct obj **));
@@ -2844,6 +2846,7 @@ E void FDECL(bypass_obj, (struct obj *));
E void NDECL(clear_bypasses);
E void FDECL(bypass_objlist, (struct obj *, BOOLEAN_P));
E struct obj *FDECL(nxt_unbypassed_obj, (struct obj *));
E struct obj *FDECL(nxt_unbypassed_loot, (Loot *, struct obj *));
E int FDECL(racial_exception, (struct monst *, struct obj *));
/* ### write.c ### */

View File

@@ -190,6 +190,14 @@ enum hmon_atkmode_types {
HMON_DRAGGED /* attached iron ball, pulled into mon */
};
/* sortloot() return type; needed before extern.h */
struct sortloot_item {
struct obj *obj;
int indx; /* signed int, because sortloot()'s qsort comparison routine
assumes (a->indx - b->indx) might yield a negative result */
};
typedef struct sortloot_item Loot;
#define MATCH_WARN_OF_MON(mon) \
(Warn_of_mon && ((context.warntype.obj \
&& (context.warntype.obj & (mon)->data->mflags2)) \
@@ -215,8 +223,7 @@ enum hmon_atkmode_types {
#define SYM_OFF_X (SYM_OFF_W + WARNCOUNT)
#define SYM_MAX (SYM_OFF_X + MAXOTHER)
#ifdef USE_TRAMPOLI /* This doesn't belong here, but we have little choice \
*/
#ifdef USE_TRAMPOLI /* this doesn't belong here, but we have little choice */
#undef NDECL
#define NDECL(f) f()
#endif
@@ -369,6 +376,7 @@ enum explosion_types {
#define SORTLOOT_PACK 0x01
#define SORTLOOT_INVLET 0x02
#define SORTLOOT_LOOT 0x04
#define SORTLOOT_PETRIFY 0x20 /* override filter func for c-trice corpses */
/* flags for xkilled() [note: meaning of first bit used to be reversed,
1 to give message and 0 to suppress] */

14
src/.gitattributes vendored Normal file
View File

@@ -0,0 +1,14 @@
* NH_filestag=(file%s_for_all_versions)
..files NH_filegenerated=Makefile,Makefile.bcc,Makefile.gcc,qt_kde0.moc,qt_win.moc,qttableview.moc,tile.c,monstr.c,vis_tab.c
Makefile.bcc NH_filesgentag=(file%s_for_win32_that_are_moved_into_src_at_compile_time)
Makefile.gcc NH_filesgentag=>Makefile.bcc
Makefile NH_filesgentag=>Makefile.bcc
qt_kde0.moc NH_filesgentag=(file%s_generated_by_'moc'_for_Qt_interface_at_compile_time)
qt_win.moc NH_filesgentag=>qt_kde0.moc
qttableview.moc NH_filesgentag=>qt_kde0.moc
tile.c NH_filesgentag=(file%s_optionally_generated_by_tilemap_at_compile_time)
monstr.c NH_filesgentag=(file%s_generated_by_makedefs_at_compile_time)
vis_tab.c NH_filesgentag=>monstr.c

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 end.c $NHDT-Date: 1512803167 2017/12/09 07:06:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.137 $ */
/* NetHack 3.6 end.c $NHDT-Date: 1528332335 2018/06/07 00:45:35 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.141 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -985,7 +985,7 @@ winid endwin;
if (counting) {
nowrap_add(u.urexp, points);
} else {
makeknown(otmp->otyp);
discover_object(otmp->otyp, TRUE, FALSE);
otmp->known = otmp->dknown = otmp->bknown = otmp->rknown = 1;
/* assumes artifacts don't have quan > 1 */
Sprintf(pbuf, "%s%s (worth %ld %s and %ld points)",
@@ -1178,7 +1178,7 @@ int how;
* it in both of those places.
*/
for (obj = invent; obj; obj = obj->nobj) {
makeknown(obj->otyp);
discover_object(obj->otyp, TRUE, FALSE);
obj->known = obj->bknown = obj->dknown = obj->rknown = 1;
if (Is_container(obj) || obj->otyp == STATUE)
obj->cknown = obj->lknown = 1;
@@ -1400,7 +1400,7 @@ int how;
continue;
if (objects[typ].oc_class != GEM_CLASS || typ <= LAST_GEM) {
otmp = mksobj(typ, FALSE, FALSE);
makeknown(otmp->otyp);
discover_object(otmp->otyp, TRUE, FALSE);
otmp->known = 1; /* for fake amulets */
otmp->dknown = 1; /* seen it (blindness fix) */
if (has_oname(otmp))
@@ -1498,18 +1498,20 @@ boolean identified, all_containers, reportempty;
continue; /* wrong type of container */
} else if (box->cobj) {
winid tmpwin = create_nhwindow(NHW_MENU);
Loot *sortedcobj, *srtc;
unsigned sortflags;
sortloot(&box->cobj,
(((flags.sortloot == 'l' || flags.sortloot == 'f')
? SORTLOOT_LOOT : 0)
| (flags.sortpack ? SORTLOOT_PACK : 0)),
FALSE);
Sprintf(buf, "Contents of %s:", the(xname(box)));
putstr(tmpwin, 0, buf);
putstr(tmpwin, 0, "");
for (obj = box->cobj; obj; obj = obj->nobj) {
sortflags = (((flags.sortloot == 'l' || flags.sortloot == 'f')
? SORTLOOT_LOOT : 0)
| (flags.sortpack ? SORTLOOT_PACK : 0));
sortedcobj = sortloot(&box->cobj, sortflags, FALSE,
(boolean FDECL((*), (OBJ_P))) 0);
for (srtc = sortedcobj; ((obj = srtc->obj) != 0); ++srtc) {
if (identified) {
makeknown(obj->otyp);
discover_object(obj->otyp, TRUE, FALSE);
obj->known = obj->bknown = obj->dknown
= obj->rknown = 1;
if (Is_container(obj) || obj->otyp == STATUE)
@@ -1517,6 +1519,7 @@ boolean identified, all_containers, reportempty;
}
putstr(tmpwin, 0, doname(obj));
}
unsortloot(&sortedcobj);
if (cat)
putstr(tmpwin, 0, "Schroedinger's cat");
else if (deadcat)

View File

@@ -46,10 +46,6 @@ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */
*/
static char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */
struct sortloot_item {
struct obj *obj;
int indx;
};
unsigned sortlootmode = 0;
/* qsort comparison routine for sortloot() */
@@ -211,6 +207,100 @@ tiebreak:
return (sli1->indx - sli2->indx);
}
/*
* sortloot() - the story so far...
*
* The original implementation constructed and returned an array
* of pointers to objects in the requested order. Callers had to
* count the number of objects, allocate the array, pass one
* object at a time to the routine which populates it, traverse
* the objects via stepping through the array, then free the
* array. The ordering process used a basic insertion sort which
* is fine for short lists but inefficient for long ones.
*
* 3.6.0 (and continuing with 3.6.1) changed all that so that
* sortloot was self-contained as far as callers were concerned.
* It reordered the linked list into the requested order and then
* normal list traversal was used to process it. It also switched
* to qsort() on the assumption that the C library implementation
* put some effort into sorting efficiently. It also checked
* whether the list was already sorted as it got ready to do the
* sorting, so re-examining inventory or a pile of objects without
* having changed anything would gobble up less CPU than a full
* sort. But it had as least two problems (aside from the ordinary
* complement of bugs):
* 1) some players wanted to get the original order back when they
* changed the 'sortloot' option back to 'none', but the list
* reordering made that infeasible;
* 2) object identification giving the 'ID whole pack' result
* would call makeknown() on each newly ID'd object, that would
* call update_inventory() to update the persistent inventory
* window if one existed, the interface would call the inventory
* display routine which would call sortloot() which might change
* the order of the list being traversed by the identify code,
* possibly skipping the ID of some objects. That could have been
* avoided by suppressing 'perm_invent' during identification
* (fragile) or by avoiding sortloot() during inventory display
* (more robust).
*
* 3.6.2 reverts to the temporary array of ordered obj pointers
* but has sortloot() do the counting and allocation. Callers
* need to use array traversal instead of linked list traversal
* and need to free the temporary array when done. And the
* array contains 'struct sortloot_item' (aka 'Loot') entries
* instead of simple 'struct obj *' entries.
*/
Loot *
sortloot(olist, mode, by_nexthere, filterfunc)
struct obj **olist; /* previous version might have changed *olist, we don't */
unsigned mode; /* flags for sortloot_cmp() */
boolean by_nexthere; /* T: traverse via obj->nexthere, F: via obj->nobj */
boolean FDECL((*filterfunc), (OBJ_P));
{
Loot *sliarray;
struct obj *o;
unsigned n, i;
boolean augment_filter;
for (n = 0, o = *olist; o; o = by_nexthere ? o->nexthere : o->nobj)
++n;
/* note: if there is a filter function, this might overallocate */
sliarray = (Loot *) alloc((n + 1) * sizeof *sliarray);
augment_filter = (mode & SORTLOOT_PETRIFY) ? TRUE : FALSE;
/* populate aliarray[0..n-1] */
for (i = 0, o = *olist; o; ++i, o = by_nexthere ? o->nexthere : o->nobj) {
if (filterfunc && !(*filterfunc)(o)
&& (!augment_filter || o->otyp != CORPSE
|| !touch_petrifies(&mons[o->corpsenm])))
continue;
sliarray[i].obj = o, sliarray[i].indx = (int) i;
}
n = i;
/* add a terminator so that we don't have to pass 'n' back to caller */
sliarray[n].obj = (struct obj *) 0, sliarray[n].indx = -1;
mode &= ~SORTLOOT_PETRIFY;
/* do the sort; if no sorting is requested, we'll just return
a sortloot_item array reflecting the current ordering */
if (mode) {
sortlootmode = mode; /* extra input for sortloot_cmp() */
qsort((genericptr_t) sliarray, n, sizeof *sliarray, sortloot_cmp);
sortlootmode = 0; /* reset static mode flags */
}
return sliarray;
}
/* sortloot() callers should use this to free up memory it allocates */
void
unsortloot(loot_array_p)
Loot **loot_array_p;
{
if (*loot_array_p)
free((genericptr_t) *loot_array_p), *loot_array_p = (Loot *) 0;
}
#if 0 /* 3.6.0 'revamp' */
void
sortloot(olist, mode, by_nexthere)
struct obj **olist;
@@ -248,6 +338,7 @@ boolean by_nexthere; /* T: traverse via obj->nexthere, F: via obj->nobj */
}
sortlootmode = 0;
}
#endif /*0*/
void
assigninvlet(otmp)
@@ -1097,6 +1188,7 @@ register const char *let, *word;
boolean msggiven = FALSE;
boolean oneloop = FALSE;
long dummymask;
Loot *sortedinvent, *srtinv;
if (*let == ALLOW_COUNT)
let++, allowcnt = 1;
@@ -1133,15 +1225,13 @@ register const char *let, *word;
if (!flags.invlet_constant)
reassign();
else
/* in case invent is in packorder, force it to be in invlet
order before collecing candidate inventory letters;
if player responds with '?' or '*' it will be changed
back by display_pickinv(), but by then we'll have 'lets'
and so won't have to re-sort in the for(;;) loop below */
sortloot(&invent, SORTLOOT_INVLET, FALSE);
for (otmp = invent; otmp; otmp = otmp->nobj) {
/* force invent to be in invlet order before collecting candidate
inventory letters */
sortedinvent = sortloot(&invent, SORTLOOT_INVLET, FALSE,
(boolean FDECL((*), (OBJ_P))) 0);
for (srtinv = sortedinvent; (otmp = srtinv->obj) != 0; ++srtinv) {
if (&bp[foo] == &buf[sizeof buf - 1]
|| ap == &altlets[sizeof altlets - 1]) {
/* we must have a huge number of NOINVSYM items somehow */
@@ -1285,6 +1375,7 @@ register const char *let, *word;
allowall = usegold = TRUE;
}
}
unsortloot(&sortedinvent);
bp[foo] = 0;
if (foo == 0 && bp > buf && bp[-1] == ' ')
@@ -1763,16 +1854,17 @@ unsigned *resultflags;
*/
int
askchain(objchn, olets, allflag, fn, ckfn, mx, word)
struct obj **objchn;
struct obj **objchn; /* *objchn might change */
int allflag, mx;
const char *olets, *word; /* olets is an Obj Class char array */
int FDECL((*fn), (OBJ_P)), FDECL((*ckfn), (OBJ_P));
{
struct obj *otmp, *otmpo;
register char sym, ilet;
register int cnt = 0, dud = 0, tmp;
int cnt = 0, dud = 0, tmp;
boolean takeoff, nodot, ident, take_out, put_in, first, ininv, bycat;
char qbuf[QBUFSZ], qpfx[QBUFSZ];
Loot *sortedchn = 0;
takeoff = taking_off(word);
ident = !strcmp(word, "identify");
@@ -1787,7 +1879,8 @@ int FDECL((*fn), (OBJ_P)), FDECL((*ckfn), (OBJ_P));
/* someday maybe we'll sort by 'olets' too (temporarily replace
flags.packorder and pass SORTLOOT_PACK), but not yet... */
sortloot(objchn, SORTLOOT_INVLET, FALSE);
sortedchn = sortloot(objchn, SORTLOOT_INVLET, FALSE,
(boolean FDECL((*), (OBJ_P))) 0);
first = TRUE;
/*
@@ -1812,7 +1905,7 @@ nextclass:
* track of which list elements have already been processed.
*/
bypass_objlist(*objchn, FALSE); /* clear chain's bypass bits */
while ((otmp = nxt_unbypassed_obj(*objchn)) != 0) {
while ((otmp = nxt_unbypassed_loot(sortedchn, *objchn)) != 0) {
if (ilet == 'z')
ilet = 'A';
else if (ilet == 'Z')
@@ -1900,11 +1993,13 @@ nextclass:
}
if (olets && *olets && *++olets)
goto nextclass;
if (!takeoff && (dud || cnt))
pline("That was all.");
else if (!dud && !cnt)
pline("No applicable objects.");
ret:
unsortloot(&sortedchn);
bypass_objlist(*objchn, FALSE);
return cnt;
}
@@ -2195,6 +2290,8 @@ long *out_cnt;
winid win; /* windows being used */
anything any;
menu_item *selected;
unsigned sortflags;
Loot *sortedinvent, *srtinv;
if (lets && !*lets)
lets = 0; /* simplify tests: (lets) instead of (lets && *lets) */
@@ -2268,10 +2365,11 @@ long *out_cnt;
return ret;
}
sortloot(&invent,
(((flags.sortloot == 'f') ? SORTLOOT_LOOT : SORTLOOT_INVLET)
| (flags.sortpack ? SORTLOOT_PACK : 0)),
FALSE);
sortflags = (flags.sortloot == 'f') ? SORTLOOT_LOOT : SORTLOOT_INVLET;
if (flags.sortpack)
sortflags |= SORTLOOT_PACK;
sortedinvent = sortloot(&invent, sortflags, FALSE,
(boolean FDECL((*), (OBJ_P))) 0);
start_menu(win);
any = zeroany;
@@ -2296,7 +2394,7 @@ long *out_cnt;
}
nextclass:
classcount = 0;
for (otmp = invent; otmp; otmp = otmp->nobj) {
for (srtinv = sortedinvent; (otmp = srtinv->obj) != 0; ++srtinv) {
if (lets && !index(lets, otmp->invlet))
continue;
if (!flags.sortpack || otmp->oclass == *invlet) {
@@ -2330,6 +2428,7 @@ nextclass:
add_menu(win, NO_GLYPH, &any, '*', 0, ATR_NONE,
"(list everything)", MENU_UNSELECTED);
}
unsortloot(&sortedinvent);
/* for permanent inventory where we intend to show everything but
nothing has been listed (because there isn't anyhing to list;
recognized via any.a_char still being zero; the n==0 case above

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 o_init.c $NHDT-Date: 1450318588 2015/12/17 02:16:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ */
/* NetHack 3.6 o_init.c $NHDT-Date: 1528332336 2018/06/07 00:45:36 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.24 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -361,7 +361,8 @@ boolean credit_hero;
if (credit_hero)
exercise(A_WIS, TRUE);
}
if (moves > 1L)
/* moves==1L => initial inventory, gameover => final disclosure */
if (moves > 1L && !program_state.gameover)
update_inventory();
}
}

View File

@@ -577,7 +577,8 @@ int what; /* should be a long */
if (flags.menu_style != MENU_TRADITIONAL || iflags.menu_requested) {
/* use menus exclusively */
traverse_how |= AUTOSELECT_SINGLE | INVORDER_SORT;
traverse_how |= AUTOSELECT_SINGLE
| (flags.sortpack ? INVORDER_SORT : 0);
if (count) { /* looking for N of something */
char qbuf[QBUFSZ];
@@ -849,6 +850,8 @@ boolean FDECL((*allow), (OBJ_P)); /* allow function */
boolean printed_type_name, first,
sorted = (qflags & INVORDER_SORT) != 0,
engulfer = (qflags & INCLUDE_HERO) != 0;
unsigned sortflags;
Loot *sortedolist, *srtoli;
*pick_list = (menu_item *) 0;
if (!olist && !engulfer)
@@ -876,16 +879,14 @@ boolean FDECL((*allow), (OBJ_P)); /* allow function */
return 1;
}
if (sorted || flags.sortloot != 'n') {
sortloot(&olist,
(((flags.sortloot == 'f'
|| (flags.sortloot == 'l' && !(qflags & USE_INVLET)))
? SORTLOOT_LOOT
: (qflags & USE_INVLET) ? SORTLOOT_INVLET : 0)
| (flags.sortpack ? SORTLOOT_PACK : 0)),
(qflags & BY_NEXTHERE) ? TRUE : FALSE);
*olist_p = olist;
}
sortflags = (((flags.sortloot == 'f'
|| (flags.sortloot == 'l' && !(qflags & USE_INVLET)))
? SORTLOOT_LOOT
: ((qflags & USE_INVLET) ? SORTLOOT_INVLET : 0))
| (flags.sortpack ? SORTLOOT_PACK : 0)
| ((qflags & FEEL_COCKATRICE) ? SORTLOOT_PETRIFY : 0));
sortedolist = sortloot(&olist, sortflags,
(qflags & BY_NEXTHERE) ? TRUE : FALSE, allow);
win = create_nhwindow(NHW_MENU);
start_menu(win);
@@ -893,14 +894,14 @@ boolean FDECL((*allow), (OBJ_P)); /* allow function */
/*
* Run through the list and add the objects to the menu. If
* INVORDER_SORT is set, we'll run through the list once for
* each type so we can group them. The allow function will only
* be called once per object in the list.
* each type so we can group them. The allow function was
* called by sortloot() and will be called once per item here.
*/
pack = flags.inv_order;
first = TRUE;
do {
printed_type_name = FALSE;
for (curr = olist; curr; curr = FOLLOW(curr, qflags)) {
for (srtoli = sortedolist; ((curr = srtoli->obj) != 0); ++srtoli) {
if (sorted && curr->oclass != *pack)
continue;
if ((qflags & FEEL_COCKATRICE) && curr->otyp == CORPSE
@@ -932,6 +933,7 @@ boolean FDECL((*allow), (OBJ_P)); /* allow function */
}
pack++;
} while (sorted && *pack);
unsortloot(&sortedolist);
if (engulfer) {
char buf[BUFSZ];

View File

@@ -777,6 +777,30 @@ struct obj *objchain;
return objchain;
}
/* like nxt_unbypassed_obj() but operates on sortloot_item array rather
than an object linked list; the array contains obj==Null terminator;
there's an added complication that the array may have stale pointers
for deleted objects (see Multiple-Drop case in askchain(invent.c)) */
struct obj *
nxt_unbypassed_loot(lootarray, listhead)
Loot *lootarray;
struct obj *listhead;
{
struct obj *o, *obj;
while ((obj = lootarray->obj) != 0) {
for (o = listhead; o; o = o->nobj)
if (o == obj)
break;
if (o && !obj->bypass) {
bypass_obj(obj);
break;
}
++lootarray;
}
return obj;
}
void
mon_break_armor(mon, polyspot)
struct monst *mon;

View File

@@ -1 +1,2 @@
*.p NHSUBST
* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.2)

1
sys/atari/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.2)

1
sys/be/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.2)

View File

@@ -1 +1,2 @@
NHDeflts NHSUBST
* NH_filestag=(file%s_for_68K_Macintosh_versions)

View File

@@ -4,3 +4,6 @@ Makefile.* NHSUBST
Install.* NHSUBST
moveinit.pat NH_header=no
vesa.h NH_header=no
* NH_filestag=(file%s_for_MSDOS_version_-_untested_for_3.6.2)
nhico.uu NH_filestag=(file%s_for_running_MSDOS_binary_under_Windows)
nhpif.uu NH_filestag=>nhico.uu

View File

@@ -1 +1,2 @@
Makefile.* NHSUBST
* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.2)

View File

@@ -4,3 +4,41 @@ termcap NH_header=no
dgn_comp.h NH_header=no
lev_comp.h NH_header=no
Makefile.lib NH_header=no
Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2)
#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2)
termcap.uu NH_filestag=>Makefile.lib
pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_NT,_Amiga,_and_Atari_versions_-_untested_for_3.6.2)
pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2,_NT,_and_Atari_versions_-_untested_for_3.6.2)
pcunix.c NH_filestag=>pcsys.c
NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.2)
pctty.c NH_filestag=>NetHack.cnf
ioctl.c NH_filestag=(file%s_for_UNIX_and_Be_versions)
unixtty.c NH_filestag=>ioctl.c
nhlan.c NH_filestag=(file_for_NT_version)
random.c NH_filestag=(Berkeley_random_number_file,_which_may_be_included_in_any_version)
uudecode.c NH_filestag=(Berkeley_uudecode_file,_which_may_be_used_in_build_process_of_any_version)
tclib.c NH_filestag=(file_for_VMS_version)
termcap NH_filestag=(file_for_MSDOS,_OS/2,_and_VMS_versions)
dgn_comp.h NH_filestag=(lex/yacc_output_for_special_level_and_dungeon_compilers)
dgn_lex.c NH_filestag=>dgn_comp.h
dgn_yacc.c NH_filestag=>dgn_comp.h
lev_comp.h NH_filestag=>dgn_comp.h
lev_lex.c NH_filestag=>dgn_comp.h
lev_yacc.c NH_filestag=>dgn_comp.h
posixregex.c NH_filestag=60(posix_regex_for_versions_that_include_regex_in_their_C_library)
cppregex.cpp NH_filestag=61(c++_regex_code_for_versions_that_can_build_a_C++_module_and_link_it_in)
pmatchregex.c NH_filestag=62(pmatch_regex_for_other_versions)

1
sys/share/sounds/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_Amiga_and_Macintosh_versions)

View File

@@ -5,3 +5,6 @@ README.linux NHSUBST
depend.awk NHSUBST
sysconf NHSUBST
*shr NH_header=no
* NH_filestag=(file%s_for_UNIX_versions)
cpp?.shr NH_filestag=(file%s_for_replacement_cpp,_only_needed_by_some_ancient_UNIX_systems)
snd86unx.shr NH_filestag=(file%s_for_sound_driver_for_386_UNIX)

View File

@@ -1 +1,2 @@
* NHSUBST
* NH_filestag=(file%s_for_configuring_UNIX_NetHack_versions)

View File

@@ -2,3 +2,4 @@ Makefile.* NHSUBST
*.com NHSUBST
Install.vms NHSUBST
sysconf NHSUBST
* NH_filestag=(file%s_for_VMS_version)

View File

@@ -1,3 +1,4 @@
*.ce NHSUBST
*.mak NHSUBST
*.bat NHSUBST
* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2)

1
sys/wince/ceinc/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2)

1
sys/wince/ceinc/sys/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(sys/stat.h_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2)

View File

@@ -5,3 +5,6 @@ sysconf NHSUBST
*.rc NHSUBST
*.bat NHSUBST
*.def NH_header=no
* NH_filestag=(file%s_for_Windows_7/8.x/10_version)
..files NH_filegenerated=nethack.ico
nethack.ico NH_filesgentag=(file%s_generated_by_uudecode_at_compile_time)

12
util/.gitattributes vendored
View File

@@ -1,2 +1,14 @@
*.pl NHSUBST
*.[ly] NHSUBST
* NH_filestag=(file%s_for_all_versions)
*.[ly] NH_filestag=(lex/yacc_input_for_special_level_and_dungeon_compilers)
..files NH_filegenerated=uudecode.exe,tiletxt.c,dgn_lex.c,dgn_yacc.c,lev_lex.c,lev_yacc.c
uudecode.exe NH_filesgentag=(file%s_generated_for_win32_at_compile_time)
tiletxt.c NH_filesgentag=(file%s_generated_for_unix_at_compile_time_if_various_tiles_utilities_are_built)
dgn_lex.c NH_filesgentag=(file%s_generated_by_lex_and_yacc_(or_copied_from_sys/share)_at_compile_time)
dgn_yacc.c NH_filesgentag=>dgn_lex.c
lev_lex.c NH_filesgentag=>dgn_lex.c
lev_yacc.c NH_filesgentag=>dgn_lex.c

View File

@@ -1,3 +1,4 @@
Install.Qt NHSUBST
qpe-nethack.control NH_header=no
knethack.lnk NH_header=no
* NH_filestag=(file%s_for_the_Qt_3_widget_library_-_X11,_Windows,_Mac_OS_X,_or_Qtopia)

1
win/Qt4/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_the_Qt_4_widget_library_-_X11,_Windows,_Mac_OS_X)

View File

@@ -4,3 +4,4 @@ Install.X11 NHSUBST
nethack.rc NHSUBST
*.bdf NH_header=no
*.xbm NH_header=no
* NH_filestag=(file%s_for_X_versions)

1
win/chain/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_stacking_window_systems)

1
win/gem/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.2)

1
win/gnome/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.2)

View File

@@ -1 +1,2 @@
*.applescript NHSUBST
* NH_filestag=(file%s_for_macosx_versions)

View File

@@ -1 +1,2 @@
tile.doc NHSUBST
* NH_filestag=(file%s_for_versions_using_optional_tiles)

1
win/tty/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_tty_versions)

View File

@@ -8,3 +8,4 @@
*.props NH_header=no
resource.h NH_header=no
nhresource.h NH_header=no
* NH_filestag=(file%s_for_Windows_versions_-_tested_up_to_Windows_10)

1
win/win32/vs2017/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_Visual_Studio_2017_Community_Edition_builds)