From 9858f69fa8822ce1d4be4e190742d19c27187fe4 Mon Sep 17 00:00:00 2001 From: keni Date: Tue, 29 May 2018 19:28:26 -0400 Subject: [PATCH 1/7] update .gitattributes files for auto-generation of Files --- .gitattributes | 2 ++ DEVEL/.gitattributes | 1 + dat/.gitattributes | 2 ++ doc/.gitattributes | 1 + include/.gitattributes | 43 ++++++++++++++++++++++++++++++ src/.gitattributes | 14 ++++++++++ sys/amiga/.gitattributes | 1 + sys/atari/.gitattributes | 1 + sys/be/.gitattributes | 1 + sys/mac/.gitattributes | 1 + sys/msdos/.gitattributes | 3 +++ sys/os2/.gitattributes | 1 + sys/share/.gitattributes | 38 ++++++++++++++++++++++++++ sys/share/sounds/.gitattributes | 1 + sys/unix/.gitattributes | 3 +++ sys/unix/hints/.gitattributes | 1 + sys/vms/.gitattributes | 1 + sys/wince/.gitattributes | 1 + sys/wince/ceinc/.gitattributes | 1 + sys/wince/ceinc/sys/.gitattributes | 1 + sys/winnt/.gitattributes | 3 +++ util/.gitattributes | 12 +++++++++ win/Qt/.gitattributes | 1 + win/Qt4/.gitattributes | 1 + win/X11/.gitattributes | 1 + win/chain/.gitattributes | 1 + win/gem/.gitattributes | 1 + win/gnome/.gitattributes | 1 + win/macosx/.gitattributes | 1 + win/share/.gitattributes | 1 + win/tty/.gitattributes | 1 + win/win32/.gitattributes | 1 + win/win32/vs2017/.gitattributes | 1 + 33 files changed, 144 insertions(+) create mode 100644 include/.gitattributes create mode 100644 src/.gitattributes create mode 100644 sys/atari/.gitattributes create mode 100644 sys/be/.gitattributes create mode 100644 sys/share/sounds/.gitattributes create mode 100644 sys/wince/ceinc/.gitattributes create mode 100644 sys/wince/ceinc/sys/.gitattributes create mode 100644 win/Qt4/.gitattributes create mode 100644 win/chain/.gitattributes create mode 100644 win/gem/.gitattributes create mode 100644 win/gnome/.gitattributes create mode 100644 win/tty/.gitattributes create mode 100644 win/win32/vs2017/.gitattributes diff --git a/.gitattributes b/.gitattributes index d2c180284..9a775af52 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,3 +13,5 @@ README NHSUBST *.uu NH_header=no *.xpm NH_header=no .git* NH_header=no +* NH_filestag=(files_in_top_directory) +NetHack.dsw NH_filestag=(files_for_win32_that_are_moved_into_._at_compile_time) diff --git a/DEVEL/.gitattributes b/DEVEL/.gitattributes index 2e9843c2f..6945d7204 100644 --- a/DEVEL/.gitattributes +++ b/DEVEL/.gitattributes @@ -4,3 +4,4 @@ hooksdir/* NHSUBST * text=auto DOTGIT/TARGET NH_header=no hooksdir/TARGET NH_header=no +* NH_filestag=(files_for_people_developing_changes_to_NetHack) diff --git a/dat/.gitattributes b/dat/.gitattributes index ea45e32a3..35fea13b9 100644 --- a/dat/.gitattributes +++ b/dat/.gitattributes @@ -4,3 +4,5 @@ data.base NHSUBST symbols NHSUBST tribute NHSUBST +* NH_filestag=(files_for_all_versions) +..files NH_filegenprog diff --git a/doc/.gitattributes b/doc/.gitattributes index 41a7f6ff5..44f1b4b8e 100644 --- a/doc/.gitattributes +++ b/doc/.gitattributes @@ -7,3 +7,4 @@ Guidebook.txt NH_header=no tmac.n NH_header=no fixes* NH_header=no *.txt NH_header=no +* NH_filestag=(files_for_all_versions) diff --git a/include/.gitattributes b/include/.gitattributes new file mode 100644 index 000000000..e7576d56e --- /dev/null +++ b/include/.gitattributes @@ -0,0 +1,43 @@ +* NH_filestag=(files_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=(files_for_win32_that_are_moved_into_include_at_compile_time) + +tile.h NH_filesgentag=(file_for_tiles_support_copied_from_win/share_at_compile_time) + +dgn_comp.h NH_filesgentag=(files_generated_by_yacc_(or_copied_from_sys/share)_at_compile_time) +lev_comp.h NH_filesgentag=>dgn_comp.h + +date.h NH_filesgentag=(files_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_for_tty_versions) + +tile2x11.h NH_filestag=(files_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=(files_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=(files_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_for_GNOME_versions) + +mac-carbon.h NH_filestag=(files_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 diff --git a/src/.gitattributes b/src/.gitattributes new file mode 100644 index 000000000..3a899201c --- /dev/null +++ b/src/.gitattributes @@ -0,0 +1,14 @@ +* NH_filestag=(files_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=(files_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=(files_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_optionally_generated_by_tilemap_at_compile_time) + +monstr.c NH_filesgentag=(files_generated_by_makedefs_at_compile_time) +vis_tab.c NH_filesgentag=>monstr.c diff --git a/sys/amiga/.gitattributes b/sys/amiga/.gitattributes index 7735c64ea..6a18c5a22 100644 --- a/sys/amiga/.gitattributes +++ b/sys/amiga/.gitattributes @@ -1 +1,2 @@ *.p NHSUBST +* NH_filestag=(files_for_Amiga_versions_-_untested_for_3.6.2) diff --git a/sys/atari/.gitattributes b/sys/atari/.gitattributes new file mode 100644 index 000000000..a29cd9375 --- /dev/null +++ b/sys/atari/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_Atari_version_-_untested_for_3.6.2) diff --git a/sys/be/.gitattributes b/sys/be/.gitattributes new file mode 100644 index 000000000..dfb5c452b --- /dev/null +++ b/sys/be/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_BeOS_version_-_untested_for_3.6.2) diff --git a/sys/mac/.gitattributes b/sys/mac/.gitattributes index 8f8defc69..40f2cee6c 100644 --- a/sys/mac/.gitattributes +++ b/sys/mac/.gitattributes @@ -1 +1,2 @@ NHDeflts NHSUBST +* NH_filestag=(files_for_68K_Macintosh_versions) diff --git a/sys/msdos/.gitattributes b/sys/msdos/.gitattributes index 304a2432d..f2ae83ab5 100644 --- a/sys/msdos/.gitattributes +++ b/sys/msdos/.gitattributes @@ -4,3 +4,6 @@ Makefile.* NHSUBST Install.* NHSUBST moveinit.pat NH_header=no vesa.h NH_header=no +* NH_filestag=(files_for_MSDOS_version_-_untested_for_3.6.2) +nhico.uu NH_filestag=(files_for_running_MSDOS_binary_under_Windows) +nhpif.uu NH_filestag=>nhico.uu diff --git a/sys/os2/.gitattributes b/sys/os2/.gitattributes index 31e18fe84..ed1fcb8bd 100644 --- a/sys/os2/.gitattributes +++ b/sys/os2/.gitattributes @@ -1 +1,2 @@ Makefile.* NHSUBST +* NH_filestag=(files_for_OS/2_version_-_untested_for_3.6.2) diff --git a/sys/share/.gitattributes b/sys/share/.gitattributes index 4eede48ab..64fc95751 100644 --- a/sys/share/.gitattributes +++ b/sys/share/.gitattributes @@ -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=(files_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2) +#termcap.uu NH_filestag=(files_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=(files_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=(files_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=(posix_regex_for_versions_that_include_regex_in_their_C_library) + +cppregex.cpp NH_filestag=(c++_regex_code_for_versions_that_can_build_a_C++_module_and_link_it_in) + +pmatchregex.c NH_filestag=(pmatch_regex_for_other_versions) diff --git a/sys/share/sounds/.gitattributes b/sys/share/sounds/.gitattributes new file mode 100644 index 000000000..8ae5b8426 --- /dev/null +++ b/sys/share/sounds/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_Amiga_and_Macintosh_versions) diff --git a/sys/unix/.gitattributes b/sys/unix/.gitattributes index 277998292..9a3ac99da 100644 --- a/sys/unix/.gitattributes +++ b/sys/unix/.gitattributes @@ -5,3 +5,6 @@ README.linux NHSUBST depend.awk NHSUBST sysconf NHSUBST *shr NH_header=no +* NH_filestag=(files_for_UNIX_versions) +cpp?.shr NH_filestag=(files_for_replacement_cpp,_only_needed_by_some_ancient_UNIX_systems) +snd86unx.shr NH_filestag=(file_for_sound_driver_for_386_UNIX) diff --git a/sys/unix/hints/.gitattributes b/sys/unix/hints/.gitattributes index db77844f7..439ff0cf5 100644 --- a/sys/unix/hints/.gitattributes +++ b/sys/unix/hints/.gitattributes @@ -1 +1,2 @@ * NHSUBST +* NH_filestag=(files_for_configuring_UNIX_NetHack_versions) diff --git a/sys/vms/.gitattributes b/sys/vms/.gitattributes index fe31b9c25..741f784a4 100644 --- a/sys/vms/.gitattributes +++ b/sys/vms/.gitattributes @@ -2,3 +2,4 @@ Makefile.* NHSUBST *.com NHSUBST Install.vms NHSUBST sysconf NHSUBST +* NH_filestag=(files_for_VMS_version) diff --git a/sys/wince/.gitattributes b/sys/wince/.gitattributes index fbe75bcd4..e4c3c0414 100644 --- a/sys/wince/.gitattributes +++ b/sys/wince/.gitattributes @@ -1,3 +1,4 @@ *.ce NHSUBST *.mak NHSUBST *.bat NHSUBST +* NH_filestag=(files_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) diff --git a/sys/wince/ceinc/.gitattributes b/sys/wince/ceinc/.gitattributes new file mode 100644 index 000000000..84ca17085 --- /dev/null +++ b/sys/wince/ceinc/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(header_files_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) diff --git a/sys/wince/ceinc/sys/.gitattributes b/sys/wince/ceinc/sys/.gitattributes new file mode 100644 index 000000000..ba88adb8a --- /dev/null +++ b/sys/wince/ceinc/sys/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(sys/stat.h_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) diff --git a/sys/winnt/.gitattributes b/sys/winnt/.gitattributes index a13efc66c..4820d9830 100644 --- a/sys/winnt/.gitattributes +++ b/sys/winnt/.gitattributes @@ -5,3 +5,6 @@ sysconf NHSUBST *.rc NHSUBST *.bat NHSUBST *.def NH_header=no +* NH_filestag=(files_for_Windows_7/8.x/10_version) +..files NH_filegenerated=nethack.ico +nethack.ico NH_filesgentag=(files_generated_by_uudecode_at_compile_time) diff --git a/util/.gitattributes b/util/.gitattributes index 8b2657e61..6faf9258f 100644 --- a/util/.gitattributes +++ b/util/.gitattributes @@ -1,2 +1,14 @@ *.pl NHSUBST *.[ly] NHSUBST +* NH_filestag=(files_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=(files_generated_for_win32_at_compile_time) +tiletxt.c NH_filesgentag=(file_generated_for_unix_at_compile_time_if_various_tiles_utilities_are_built) + +dgn_lex.c NH_filesgentag=(files_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 + diff --git a/win/Qt/.gitattributes b/win/Qt/.gitattributes index 2d4096a92..a29f23c7c 100644 --- a/win/Qt/.gitattributes +++ b/win/Qt/.gitattributes @@ -1,3 +1,4 @@ Install.Qt NHSUBST qpe-nethack.control NH_header=no knethack.lnk NH_header=no +* NH_filestag=(files_for_the_Qt_3_widget_library_-_X11,_Windows,_Mac_OS_X,_or_Qtopia) diff --git a/win/Qt4/.gitattributes b/win/Qt4/.gitattributes new file mode 100644 index 000000000..278f7fff3 --- /dev/null +++ b/win/Qt4/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_the_Qt_4_widget_library_-_X11,_Windows,_Mac_OS_X) diff --git a/win/X11/.gitattributes b/win/X11/.gitattributes index eabdbfd44..60296c63f 100644 --- a/win/X11/.gitattributes +++ b/win/X11/.gitattributes @@ -4,3 +4,4 @@ Install.X11 NHSUBST nethack.rc NHSUBST *.bdf NH_header=no *.xbm NH_header=no +* NH_filestag=(files_for_X_versions) diff --git a/win/chain/.gitattributes b/win/chain/.gitattributes new file mode 100644 index 000000000..f04f3fd5c --- /dev/null +++ b/win/chain/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_stacking_window_systems) diff --git a/win/gem/.gitattributes b/win/gem/.gitattributes new file mode 100644 index 000000000..6f069c7ac --- /dev/null +++ b/win/gem/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_GEM_versions_-_untested_for_3.6.2) diff --git a/win/gnome/.gitattributes b/win/gnome/.gitattributes new file mode 100644 index 000000000..89e0d5508 --- /dev/null +++ b/win/gnome/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_GNOME_versions_-_untested_for_3.6.2) diff --git a/win/macosx/.gitattributes b/win/macosx/.gitattributes index a4bf76e47..5dbef9854 100644 --- a/win/macosx/.gitattributes +++ b/win/macosx/.gitattributes @@ -1 +1,2 @@ *.applescript NHSUBST +* NH_filestag=(files_for_macosx_versions) diff --git a/win/share/.gitattributes b/win/share/.gitattributes index 09f9406f6..9f6413f47 100644 --- a/win/share/.gitattributes +++ b/win/share/.gitattributes @@ -1 +1,2 @@ tile.doc NHSUBST +* NH_filestag=(files_for_versions_using_optional_tiles) diff --git a/win/tty/.gitattributes b/win/tty/.gitattributes new file mode 100644 index 000000000..66425e23c --- /dev/null +++ b/win/tty/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_tty_versions) diff --git a/win/win32/.gitattributes b/win/win32/.gitattributes index 19106e2bb..56edfff89 100644 --- a/win/win32/.gitattributes +++ b/win/win32/.gitattributes @@ -8,3 +8,4 @@ *.props NH_header=no resource.h NH_header=no nhresource.h NH_header=no +* NH_filestag=(files_for_Windows_versions_-_tested_up_to_Windows_10) diff --git a/win/win32/vs2017/.gitattributes b/win/win32/vs2017/.gitattributes new file mode 100644 index 000000000..03688768a --- /dev/null +++ b/win/win32/vs2017/.gitattributes @@ -0,0 +1 @@ +* NH_filestag=(files_for_Visual_Studio_2017_Community_Edition_builds) From 13db5d2db8258116519cf6c66ae3e7e49fd5972e Mon Sep 17 00:00:00 2001 From: keni Date: Tue, 29 May 2018 19:31:40 -0400 Subject: [PATCH 2/7] add autogenerated Files --- Files | 590 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 303 insertions(+), 287 deletions(-) diff --git a/Files b/Files index 732c5575c..3e8cdfbfd 100644 --- a/Files +++ b/Files @@ -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 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: +(files 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 (file for GNOME versions) -winGnome.h +winGnome.h + +(file for tty versions) +wintty.h + +(files for GEM versions) +bitmfile.h gem_rsc.h load_img.h wingem.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 + (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 -(file for MSDOS, OS/2, and VMS versions) -termcap -(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 -(posix regex for versions that include regex in their C library) -posixregex.c +uudecode.c + (c++ regex code for versions that can build a C++ module and link it in) -cppregex.cpp +cppregex.cpp + +(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 + +(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 + (pmatch regex for other versions) -pmatchregex.c +pmatchregex.c + +(posix regex for versions that include regex in their C library) +posixregex.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 -(files for replacement cpp, only needed by some ancient UNIX systems) -cpp1.shr cpp2.shr cpp3.shr (file for sound driver for 386 UNIX) -snd86unx.shr +snd86unx.shr + +(files for UNIX versions) +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 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 +tile.h + (files for win32 that are moved into include at compile time) -win32api.h +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 +tile.c + (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 sys/winnt: (files generated by uudecode at compile time) -nethack.ico +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 (file generated for unix at compile time if various tiles utilities are built) -tiletxt.c +tiletxt.c + +(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 + (files generated for win32 at compile time) -uudecode.exe - -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 +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). + From a1b19734e902ad2df7835e4d37e59c1f5c0c2574 Mon Sep 17 00:00:00 2001 From: keni Date: Tue, 29 May 2018 19:33:33 -0400 Subject: [PATCH 3/7] update autogenerated Files file --- Files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Files b/Files index 3e8cdfbfd..79730a854 100644 --- a/Files +++ b/Files @@ -7,7 +7,7 @@ from or not transferred to your system if you wish. .: (files in top directory) -.clang-format Porting README +.clang-format Files Porting README DEVEL: (files for people developing changes to NetHack) From 0e51afc7cd140d342800cca43c5baefe3e1eeeb2 Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 31 May 2018 21:42:06 -0400 Subject: [PATCH 4/7] update Files attributes with priorities and %s substitution --- .gitattributes | 4 +-- DEVEL/.gitattributes | 2 +- Files | 50 ++++++++++++++++----------------- dat/.gitattributes | 2 +- doc/.gitattributes | 2 +- include/.gitattributes | 22 +++++++-------- src/.gitattributes | 10 +++---- sys/amiga/.gitattributes | 2 +- sys/atari/.gitattributes | 2 +- sys/be/.gitattributes | 2 +- sys/mac/.gitattributes | 2 +- sys/msdos/.gitattributes | 4 +-- sys/os2/.gitattributes | 2 +- sys/share/.gitattributes | 14 ++++----- sys/share/sounds/.gitattributes | 2 +- sys/unix/.gitattributes | 6 ++-- sys/unix/hints/.gitattributes | 2 +- sys/vms/.gitattributes | 2 +- sys/wince/.gitattributes | 2 +- sys/wince/ceinc/.gitattributes | 2 +- sys/winnt/.gitattributes | 4 +-- util/.gitattributes | 8 +++--- win/Qt/.gitattributes | 2 +- win/Qt4/.gitattributes | 2 +- win/X11/.gitattributes | 2 +- win/chain/.gitattributes | 2 +- win/gem/.gitattributes | 2 +- win/gnome/.gitattributes | 2 +- win/macosx/.gitattributes | 2 +- win/share/.gitattributes | 2 +- win/tty/.gitattributes | 2 +- win/win32/.gitattributes | 2 +- win/win32/vs2017/.gitattributes | 2 +- 33 files changed, 85 insertions(+), 85 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9a775af52..4abc1c90b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,5 +13,5 @@ README NHSUBST *.uu NH_header=no *.xpm NH_header=no .git* NH_header=no -* NH_filestag=(files_in_top_directory) -NetHack.dsw NH_filestag=(files_for_win32_that_are_moved_into_._at_compile_time) +* NH_filestag=(file%s_in_top_directory) +NetHack.dsw NH_filestag=(file%s_for_win32_that_are_moved_into_._at_compile_time) diff --git a/DEVEL/.gitattributes b/DEVEL/.gitattributes index 6945d7204..835917d71 100644 --- a/DEVEL/.gitattributes +++ b/DEVEL/.gitattributes @@ -4,4 +4,4 @@ hooksdir/* NHSUBST * text=auto DOTGIT/TARGET NH_header=no hooksdir/TARGET NH_header=no -* NH_filestag=(files_for_people_developing_changes_to_NetHack) +* NH_filestag=(file%s_for_people_developing_changes_to_NetHack) diff --git a/Files b/Files index 79730a854..796b9c5bf 100644 --- a/Files +++ b/Files @@ -15,7 +15,7 @@ Developer.txt code_features.txt code_style.txt git_recipes.txt gitinfo.pl nhgitset.pl DEVEL/DOTGIT: -(files for people developing changes to NetHack) +(file for people developing changes to NetHack) TARGET DEVEL/hooksdir: @@ -52,15 +52,12 @@ makedefs.txt nethack.6 nethack.txt recover.6 recover.txt tmac.n window.doc include: -(file for GNOME versions) -winGnome.h - -(file for tty versions) -wintty.h - (files for GEM versions) bitmfile.h gem_rsc.h load_img.h wingem.h +(file for GNOME versions) +winGnome.h + (files for Qt versions) qt_clust.h qt_kde0.h qt_win.h qt_xpms.h qttableview.h @@ -84,6 +81,9 @@ 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 @@ -160,9 +160,6 @@ random.c (Berkeley uudecode file, which may be used in build process of any version) uudecode.c -(c++ regex code for versions that can build a C++ module and link it in) -cppregex.cpp - (file for MSDOS, OS/2, NT, Amiga, and Atari versions - untested for 3.6.2) pcmain.c @@ -190,21 +187,21 @@ 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 -(pmatch regex for other versions) -pmatchregex.c - (posix regex for versions that include regex in their C library) posixregex.c +(c++ regex code for versions that can build a C++ module and link it in) +cppregex.cpp + +(pmatch regex for other versions) +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 sys/unix: -(file for sound driver for 386 UNIX) -snd86unx.shr - (files for UNIX versions) Install.unx Makefile.dat Makefile.doc Makefile.src Makefile.top Makefile.utl NewInstall.unx README.linux @@ -215,6 +212,9 @@ 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) +snd86unx.shr + sys/unix/hints: (files for configuring UNIX NetHack versions) linux linux-chroot linux-qt4 linux-x11 macosx @@ -398,7 +398,7 @@ include: (file for tiles support copied from win/share at compile time) tile.h -(files for win32 that are moved into include at compile time) +(file for win32 that are moved into include at compile time) win32api.h (files generated by makedefs at compile time) @@ -408,9 +408,6 @@ date.h onames.h pm.h vis_tab.h dgn_comp.h lev_comp.h src: -(file optionally generated by tilemap at compile time) -tile.c - (files for win32 that are moved into src at compile time) Makefile Makefile.bcc Makefile.gcc @@ -420,18 +417,21 @@ 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) +(file generated by uudecode at compile time) nethack.ico util: -(file generated for unix at compile time if various tiles utilities are built) -tiletxt.c - (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 -(files generated for win32 at compile time) +(file generated for unix at compile time if various tiles utilities are built) +tiletxt.c + +(file generated for win32 at compile time) uudecode.exe NOTE: If your binaries were compiled with the data librarian (DLB) option, diff --git a/dat/.gitattributes b/dat/.gitattributes index 35fea13b9..782b4d01e 100644 --- a/dat/.gitattributes +++ b/dat/.gitattributes @@ -4,5 +4,5 @@ data.base NHSUBST symbols NHSUBST tribute NHSUBST -* NH_filestag=(files_for_all_versions) +* NH_filestag=(file%s_for_all_versions) ..files NH_filegenprog diff --git a/doc/.gitattributes b/doc/.gitattributes index 44f1b4b8e..91b0cde0c 100644 --- a/doc/.gitattributes +++ b/doc/.gitattributes @@ -7,4 +7,4 @@ Guidebook.txt NH_header=no tmac.n NH_header=no fixes* NH_header=no *.txt NH_header=no -* NH_filestag=(files_for_all_versions) +* NH_filestag=(file%s_for_all_versions) diff --git a/include/.gitattributes b/include/.gitattributes index e7576d56e..7294b8b43 100644 --- a/include/.gitattributes +++ b/include/.gitattributes @@ -1,39 +1,39 @@ -* NH_filestag=(files_for_all_versions) +* 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=(files_for_win32_that_are_moved_into_include_at_compile_time) +win32api.h NH_filesgentag=(file%s_for_win32_that_are_moved_into_include_at_compile_time) -tile.h NH_filesgentag=(file_for_tiles_support_copied_from_win/share_at_compile_time) +tile.h NH_filesgentag=(file%s_for_tiles_support_copied_from_win/share_at_compile_time) -dgn_comp.h NH_filesgentag=(files_generated_by_yacc_(or_copied_from_sys/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=(files_generated_by_makedefs_at_compile_time) +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_for_tty_versions) +wintty.h NH_filestag=(file%s_for_tty_versions) -tile2x11.h NH_filestag=(files_for_X_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=(files_for_Qt_versions) +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=(files_for_GEM_versions) +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_for_GNOME_versions) +winGnome.h NH_filestag=(file%s_for_GNOME_versions) -mac-carbon.h NH_filestag=(files_for_various_Macintosh_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 diff --git a/src/.gitattributes b/src/.gitattributes index 3a899201c..793c4bdb8 100644 --- a/src/.gitattributes +++ b/src/.gitattributes @@ -1,14 +1,14 @@ -* NH_filestag=(files_for_all_versions) +* 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=(files_for_win32_that_are_moved_into_src_at_compile_time) +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=(files_generated_by_'moc'_for_Qt_interface_at_compile_time) +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_optionally_generated_by_tilemap_at_compile_time) +tile.c NH_filesgentag=(file%s_optionally_generated_by_tilemap_at_compile_time) -monstr.c NH_filesgentag=(files_generated_by_makedefs_at_compile_time) +monstr.c NH_filesgentag=(file%s_generated_by_makedefs_at_compile_time) vis_tab.c NH_filesgentag=>monstr.c diff --git a/sys/amiga/.gitattributes b/sys/amiga/.gitattributes index 6a18c5a22..732c6177e 100644 --- a/sys/amiga/.gitattributes +++ b/sys/amiga/.gitattributes @@ -1,2 +1,2 @@ *.p NHSUBST -* NH_filestag=(files_for_Amiga_versions_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.2) diff --git a/sys/atari/.gitattributes b/sys/atari/.gitattributes index a29cd9375..dea950a06 100644 --- a/sys/atari/.gitattributes +++ b/sys/atari/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_Atari_version_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.2) diff --git a/sys/be/.gitattributes b/sys/be/.gitattributes index dfb5c452b..76f62f434 100644 --- a/sys/be/.gitattributes +++ b/sys/be/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_BeOS_version_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.2) diff --git a/sys/mac/.gitattributes b/sys/mac/.gitattributes index 40f2cee6c..ffe91d74f 100644 --- a/sys/mac/.gitattributes +++ b/sys/mac/.gitattributes @@ -1,2 +1,2 @@ NHDeflts NHSUBST -* NH_filestag=(files_for_68K_Macintosh_versions) +* NH_filestag=(file%s_for_68K_Macintosh_versions) diff --git a/sys/msdos/.gitattributes b/sys/msdos/.gitattributes index f2ae83ab5..f24897760 100644 --- a/sys/msdos/.gitattributes +++ b/sys/msdos/.gitattributes @@ -4,6 +4,6 @@ Makefile.* NHSUBST Install.* NHSUBST moveinit.pat NH_header=no vesa.h NH_header=no -* NH_filestag=(files_for_MSDOS_version_-_untested_for_3.6.2) -nhico.uu NH_filestag=(files_for_running_MSDOS_binary_under_Windows) +* 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 diff --git a/sys/os2/.gitattributes b/sys/os2/.gitattributes index ed1fcb8bd..9a0ea4eb3 100644 --- a/sys/os2/.gitattributes +++ b/sys/os2/.gitattributes @@ -1,2 +1,2 @@ Makefile.* NHSUBST -* NH_filestag=(files_for_OS/2_version_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.2) diff --git a/sys/share/.gitattributes b/sys/share/.gitattributes index 64fc95751..ec28e65db 100644 --- a/sys/share/.gitattributes +++ b/sys/share/.gitattributes @@ -5,19 +5,19 @@ dgn_comp.h NH_header=no lev_comp.h NH_header=no Makefile.lib NH_header=no -Makefile.lib NH_filestag=(files_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2) -#termcap.uu NH_filestag=(files_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2) +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=(files_for_MSDOS,_OS/2,_NT,_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=(files_for_UNIX_and_Be_versions) +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) @@ -37,8 +37,8 @@ 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=(posix_regex_for_versions_that_include_regex_in_their_C_library) +posixregex.c NH_filestag=60(posix_regex_for_versions_that_include_regex_in_their_C_library) -cppregex.cpp NH_filestag=(c++_regex_code_for_versions_that_can_build_a_C++_module_and_link_it_in) +cppregex.cpp NH_filestag=61(c++_regex_code_for_versions_that_can_build_a_C++_module_and_link_it_in) -pmatchregex.c NH_filestag=(pmatch_regex_for_other_versions) +pmatchregex.c NH_filestag=62(pmatch_regex_for_other_versions) diff --git a/sys/share/sounds/.gitattributes b/sys/share/sounds/.gitattributes index 8ae5b8426..763caf51d 100644 --- a/sys/share/sounds/.gitattributes +++ b/sys/share/sounds/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_Amiga_and_Macintosh_versions) +* NH_filestag=(file%s_for_Amiga_and_Macintosh_versions) diff --git a/sys/unix/.gitattributes b/sys/unix/.gitattributes index 9a3ac99da..92805b57b 100644 --- a/sys/unix/.gitattributes +++ b/sys/unix/.gitattributes @@ -5,6 +5,6 @@ README.linux NHSUBST depend.awk NHSUBST sysconf NHSUBST *shr NH_header=no -* NH_filestag=(files_for_UNIX_versions) -cpp?.shr NH_filestag=(files_for_replacement_cpp,_only_needed_by_some_ancient_UNIX_systems) -snd86unx.shr NH_filestag=(file_for_sound_driver_for_386_UNIX) +* 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) diff --git a/sys/unix/hints/.gitattributes b/sys/unix/hints/.gitattributes index 439ff0cf5..411307a35 100644 --- a/sys/unix/hints/.gitattributes +++ b/sys/unix/hints/.gitattributes @@ -1,2 +1,2 @@ * NHSUBST -* NH_filestag=(files_for_configuring_UNIX_NetHack_versions) +* NH_filestag=(file%s_for_configuring_UNIX_NetHack_versions) diff --git a/sys/vms/.gitattributes b/sys/vms/.gitattributes index 741f784a4..a0fc5cfd0 100644 --- a/sys/vms/.gitattributes +++ b/sys/vms/.gitattributes @@ -2,4 +2,4 @@ Makefile.* NHSUBST *.com NHSUBST Install.vms NHSUBST sysconf NHSUBST -* NH_filestag=(files_for_VMS_version) +* NH_filestag=(file%s_for_VMS_version) diff --git a/sys/wince/.gitattributes b/sys/wince/.gitattributes index e4c3c0414..b3d2a6646 100644 --- a/sys/wince/.gitattributes +++ b/sys/wince/.gitattributes @@ -1,4 +1,4 @@ *.ce NHSUBST *.mak NHSUBST *.bat NHSUBST -* NH_filestag=(files_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) diff --git a/sys/wince/ceinc/.gitattributes b/sys/wince/ceinc/.gitattributes index 84ca17085..1763a5005 100644 --- a/sys/wince/ceinc/.gitattributes +++ b/sys/wince/ceinc/.gitattributes @@ -1 +1 @@ -* NH_filestag=(header_files_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) +* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) diff --git a/sys/winnt/.gitattributes b/sys/winnt/.gitattributes index 4820d9830..d52abfcb5 100644 --- a/sys/winnt/.gitattributes +++ b/sys/winnt/.gitattributes @@ -5,6 +5,6 @@ sysconf NHSUBST *.rc NHSUBST *.bat NHSUBST *.def NH_header=no -* NH_filestag=(files_for_Windows_7/8.x/10_version) +* NH_filestag=(file%s_for_Windows_7/8.x/10_version) ..files NH_filegenerated=nethack.ico -nethack.ico NH_filesgentag=(files_generated_by_uudecode_at_compile_time) +nethack.ico NH_filesgentag=(file%s_generated_by_uudecode_at_compile_time) diff --git a/util/.gitattributes b/util/.gitattributes index 6faf9258f..9525258d3 100644 --- a/util/.gitattributes +++ b/util/.gitattributes @@ -1,13 +1,13 @@ *.pl NHSUBST *.[ly] NHSUBST -* NH_filestag=(files_for_all_versions) +* 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=(files_generated_for_win32_at_compile_time) -tiletxt.c NH_filesgentag=(file_generated_for_unix_at_compile_time_if_various_tiles_utilities_are_built) +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=(files_generated_by_lex_and_yacc_(or_copied_from_sys/share)_at_compile_time) +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 diff --git a/win/Qt/.gitattributes b/win/Qt/.gitattributes index a29f23c7c..7b924974c 100644 --- a/win/Qt/.gitattributes +++ b/win/Qt/.gitattributes @@ -1,4 +1,4 @@ Install.Qt NHSUBST qpe-nethack.control NH_header=no knethack.lnk NH_header=no -* NH_filestag=(files_for_the_Qt_3_widget_library_-_X11,_Windows,_Mac_OS_X,_or_Qtopia) +* NH_filestag=(file%s_for_the_Qt_3_widget_library_-_X11,_Windows,_Mac_OS_X,_or_Qtopia) diff --git a/win/Qt4/.gitattributes b/win/Qt4/.gitattributes index 278f7fff3..68792d904 100644 --- a/win/Qt4/.gitattributes +++ b/win/Qt4/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_the_Qt_4_widget_library_-_X11,_Windows,_Mac_OS_X) +* NH_filestag=(file%s_for_the_Qt_4_widget_library_-_X11,_Windows,_Mac_OS_X) diff --git a/win/X11/.gitattributes b/win/X11/.gitattributes index 60296c63f..c1452cec5 100644 --- a/win/X11/.gitattributes +++ b/win/X11/.gitattributes @@ -4,4 +4,4 @@ Install.X11 NHSUBST nethack.rc NHSUBST *.bdf NH_header=no *.xbm NH_header=no -* NH_filestag=(files_for_X_versions) +* NH_filestag=(file%s_for_X_versions) diff --git a/win/chain/.gitattributes b/win/chain/.gitattributes index f04f3fd5c..9e5051cc3 100644 --- a/win/chain/.gitattributes +++ b/win/chain/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_stacking_window_systems) +* NH_filestag=(file%s_for_stacking_window_systems) diff --git a/win/gem/.gitattributes b/win/gem/.gitattributes index 6f069c7ac..133df44a1 100644 --- a/win/gem/.gitattributes +++ b/win/gem/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_GEM_versions_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.2) diff --git a/win/gnome/.gitattributes b/win/gnome/.gitattributes index 89e0d5508..b1449f357 100644 --- a/win/gnome/.gitattributes +++ b/win/gnome/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_GNOME_versions_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.2) diff --git a/win/macosx/.gitattributes b/win/macosx/.gitattributes index 5dbef9854..ce60e3048 100644 --- a/win/macosx/.gitattributes +++ b/win/macosx/.gitattributes @@ -1,2 +1,2 @@ *.applescript NHSUBST -* NH_filestag=(files_for_macosx_versions) +* NH_filestag=(file%s_for_macosx_versions) diff --git a/win/share/.gitattributes b/win/share/.gitattributes index 9f6413f47..cb0ac5448 100644 --- a/win/share/.gitattributes +++ b/win/share/.gitattributes @@ -1,2 +1,2 @@ tile.doc NHSUBST -* NH_filestag=(files_for_versions_using_optional_tiles) +* NH_filestag=(file%s_for_versions_using_optional_tiles) diff --git a/win/tty/.gitattributes b/win/tty/.gitattributes index 66425e23c..6dcdec3b0 100644 --- a/win/tty/.gitattributes +++ b/win/tty/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_tty_versions) +* NH_filestag=(file%s_for_tty_versions) diff --git a/win/win32/.gitattributes b/win/win32/.gitattributes index 56edfff89..a5b91f10d 100644 --- a/win/win32/.gitattributes +++ b/win/win32/.gitattributes @@ -8,4 +8,4 @@ *.props NH_header=no resource.h NH_header=no nhresource.h NH_header=no -* NH_filestag=(files_for_Windows_versions_-_tested_up_to_Windows_10) +* NH_filestag=(file%s_for_Windows_versions_-_tested_up_to_Windows_10) diff --git a/win/win32/vs2017/.gitattributes b/win/win32/vs2017/.gitattributes index 03688768a..041653ea8 100644 --- a/win/win32/vs2017/.gitattributes +++ b/win/win32/vs2017/.gitattributes @@ -1 +1 @@ -* NH_filestag=(files_for_Visual_Studio_2017_Community_Edition_builds) +* NH_filestag=(file%s_for_Visual_Studio_2017_Community_Edition_builds) From fc2d38ed50ff79ba9875d2e17693689279c5773d Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 6 Jun 2018 17:45:44 -0700 Subject: [PATCH 5/7] makeknown() Noticed while investigating the report about sortloot interacting with persistent inventory window when identifying all of invent and possibly skipping some items. [This doesn't fix that.] End of game disclosure was using makeknown() on inventory. It is a jacket around discover_object() which passes the flag to exercise Wisdom. That's useless at end of game [now; conceivably wrong if disclosure of characteristics exercise ever got added], so call discover_object() directly to suppress exercise of Wisdom. discover_object() was also calling update_inventory() for every item being discovered. That's not useful when looping through inventory at end of game. --- doc/fixes36.2 | 2 ++ src/end.c | 10 +++++----- src/o_init.c | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 802ce2507..935394f98 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -30,6 +30,8 @@ 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 Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/end.c b/src/end.c index d0b51df53..ebb45187c 100644 --- a/src/end.c +++ b/src/end.c @@ -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)) @@ -1509,7 +1509,7 @@ boolean identified, all_containers, reportempty; putstr(tmpwin, 0, ""); for (obj = box->cobj; obj; obj = obj->nobj) { 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) diff --git a/src/o_init.c b/src/o_init.c index 3edadd811..b4fc440ee 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -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(); } } From c7f357e783387c820e5a384ee02bf6447d329939 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 9 Jun 2018 18:03:37 -0700 Subject: [PATCH 6/7] fix #H7205, #H7120, #H5216 - sortloot H7205 - full-pack identify might skip items if perm_invent is on because updating the inventory window might reorder 'invent' while the identify code is in the midst of traversing it; H7120 - pickup that doesn't pick anything up can change the glyph shown on the map because the pile might be reordered such that a different item is on top; H5216 - performing a sortloot operation on a pile and then switching back to sortloot:none doesn't restore pile's original order. The 'revamp' that changed the contributed sortloot feature to switch to simpler usage (object list itself was sorted rather than having a parallel array that needed to be constructed, sorted, traversed, and discarded) turns out to have too many problems. This reverts to a hybrid solution that constructs an array for traversal, leaving the linked list in its original order, but hides most of the details of that from sortloot() callers. The 'revamp' benefit of being able to use normal list traversal is lost, as is the potential to skip sorting when the list turns out to already be in the desired order. This could stand to have a lot more testing than it's had so far. --- doc/fixes36.2 | 4 ++ include/extern.h | 5 +- include/hack.h | 11 +++- src/end.c | 15 +++--- src/invent.c | 136 +++++++++++++++++++++++++++++++++++++++-------- src/pickup.c | 22 ++++---- src/worn.c | 24 +++++++++ 7 files changed, 176 insertions(+), 41 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 935394f98..bb35fa432 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -32,6 +32,10 @@ when finishing using 'O' to examine or set hilite_status rules, if the 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 diff --git a/include/extern.h b/include/extern.h index d570bc864..a7ed1fef6 100644 --- a/include/extern.h +++ b/include/extern.h @@ -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 **)); @@ -2841,6 +2843,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 ### */ diff --git a/include/hack.h b/include/hack.h index 7d493e962..3b670be1a 100644 --- a/include/hack.h +++ b/include/hack.h @@ -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 diff --git a/src/end.c b/src/end.c index ebb45187c..589733078 100644 --- a/src/end.c +++ b/src/end.c @@ -1498,16 +1498,18 @@ 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) { discover_object(obj->otyp, TRUE, FALSE); obj->known = obj->bknown = obj->dknown @@ -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) diff --git a/src/invent.c b/src/invent.c index 13951f104..1262fee1f 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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,95 @@ 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; + + 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); + + /* populate aliarray[0..n-1] */ + for (i = 0, o = *olist; o; ++i, o = by_nexthere ? o->nexthere : o->nobj) { + if (filterfunc && !(*filterfunc)(o)) + 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; + + /* 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 +333,7 @@ boolean by_nexthere; /* T: traverse via obj->nexthere, F: via obj->nobj */ } sortlootmode = 0; } +#endif /*0*/ void assigninvlet(otmp) @@ -1097,6 +1183,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 +1220,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 +1370,7 @@ register const char *let, *word; allowall = usegold = TRUE; } } + unsortloot(&sortedinvent); bp[foo] = 0; if (foo == 0 && bp > buf && bp[-1] == ' ') @@ -1763,16 +1849,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 +1874,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 +1900,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 +1988,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 +2285,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 +2360,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 +2389,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 +2423,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 diff --git a/src/pickup.c b/src/pickup.c index 78206230d..683395d55 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -849,6 +849,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 +878,13 @@ 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)); + sortedolist = sortloot(&olist, sortflags, + (qflags & BY_NEXTHERE) ? TRUE : FALSE, allow); win = create_nhwindow(NHW_MENU); start_menu(win); @@ -900,7 +899,7 @@ boolean FDECL((*allow), (OBJ_P)); /* allow function */ 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 +931,7 @@ boolean FDECL((*allow), (OBJ_P)); /* allow function */ } pack++; } while (sorted && *pack); + unsortloot(&sortedolist); if (engulfer) { char buf[BUFSZ]; diff --git a/src/worn.c b/src/worn.c index cf45277a9..a2819c4e3 100644 --- a/src/worn.c +++ b/src/worn.c @@ -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; From 0b52288154e83e1bb6d5ed77bc7591dc3e3a16c7 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 10 Jun 2018 18:02:20 -0700 Subject: [PATCH 7/7] more sortloot - picking up cockatrice corpses Yesterday's sortloot() overhaul didn't include some cockatrice corpse handling for pickup. If there's an object class filter in place and pickup has been told to care about cockatrice corpses, have sortloot() include them in the loot array even if food class isn't accepted by the filter. In the pre-sortloot days, and in 3.6.[01] which didn't attempt to deliver a filtered subset of loot, the check for such corpses was done before pickup checks the filter. They need to be in the loot array to retain the same behavior. --- include/hack.h | 1 + src/invent.c | 7 ++++++- src/pickup.c | 12 +++++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/hack.h b/include/hack.h index 3b670be1a..e94e43250 100644 --- a/include/hack.h +++ b/include/hack.h @@ -376,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] */ diff --git a/src/invent.c b/src/invent.c index 1262fee1f..5522d7b09 100644 --- a/src/invent.c +++ b/src/invent.c @@ -260,21 +260,26 @@ 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)) + 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 */ diff --git a/src/pickup.c b/src/pickup.c index 683395d55..fae1e2f03 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -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]; @@ -881,8 +882,9 @@ boolean FDECL((*allow), (OBJ_P)); /* allow function */ sortflags = (((flags.sortloot == 'f' || (flags.sortloot == 'l' && !(qflags & USE_INVLET))) ? SORTLOOT_LOOT - : (qflags & USE_INVLET) ? SORTLOOT_INVLET : 0) - | (flags.sortpack ? SORTLOOT_PACK : 0)); + : ((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); @@ -892,8 +894,8 @@ 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;