debian/0000755000000000000000000000000011765605745007206 5ustar debian/nethack.xpm0000644000000000000000000000274711765144123011347 0ustar /* XPM */ static char *nethack[] = { /* columns rows colors chars-per-pixel */ "32 32 18 1", " c black", ". c #191919", "X c gray20", "o c #007f00", "O c #007f7f", "+ c #7f7f00", "@ c #4c4c4c", "# c #666667", "$ c gray50", "% c blue", "& c cyan", "* c yellow", "= c gray60", "- c #b2b2b2", "; c gray80", ": c gray90", "> c white", ", c None", /* pixels */ ",,,, , , , . , , ., ,,,,,", ",,,,, , , . , ,, , ,, , ,,,,,", " , ,#X, , =$=$$=$., ,.#, , ,", ", , .,-: ,$:>>>>:::;=,,=-,. , ,,", " ,.X ,=>-#>>::::;;*::$+:-, .X, ,", " ,=>#.=>>>>>>:>:;;;;;;;;=.@;-, ,", ".,=>>$=::>>:>>::;::;;;;;=+::-, ,", " ,O-$@->=-=-=$-=+=$#+=$;- .## .,", " ,#-#O;>--===-OOO$####@;- .## ,", " ,=>>-->=====O-$$O#OOO#;=@::- ,", " ,=>-$;>==-=-===#######;-.@;; .,", " ,.X =>-====$==$Oo#O#o--. .. ,", ", , . =>====$$-O#$O###O;- , ", " , , =>-==-=OO$O$O##O@;- , ,", ", , .,=>======O$O#####@;-.. , , ", ",, , ,=>--====-O$##OO#@;- , ,,", ",,,, ,$>-====$$=#$O#O##-=.. , ,,", ",,,,, ,::====$=OO$O##@-: , ,,,", ",,, , ,@:--==$=$#####$;# , ,,", ",, , :;--O=O=O#O#o=:. , , ,", ", , .,->->-OO==O$$#@$:X--. , ,", " =>>O::==--=$OO$:@ -:-. , ", ", ,,->;-;$;:$O$$##$:XX$=-:-. , ,", " ,->:O$>= ::O=#O=:@ #:=$$:-., ", " ,=>=-$O;+..;>>;;:@ @:$#$o:- , ", ".,=>$OO$:=. .;>:;@ . @:+O=#-;. ,", " ,=>;;-:;. X#@+ .-----;@ ,", " ,.;>>:;X , , , , .,$:;:;; , ", ", ,.;;--. , ,=---X , ,", " , , ,,, , , ,,,,,,,,,,, , , ", ", , , ,,,,,, , . , ,", ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,," }; debian/nethackrc.tty0000644000000000000000000000133211765144123011675 0ustar # # System-wide NetHack configuration file for tty-based NetHack. # OPTIONS=windowtype:tty,toptenwin,hilite_pet,hpmon OPTIONS=fixinv,safe_pet,sortpack,tombstone,color OPTIONS=verbose,news,fruit:potato OPTIONS=dogname:Slinky OPTIONS=catname:Rex OPTIONS=pickup_types:$ OPTIONS=nomail # Enable this if you want to see your inventory sorted in alphabetical # order by item instead of by index letter: # OPTIONS=sortloot:full # or if you just want containers sorted: # OPTIONS=sortloot:loot # # Some sane menucolor defaults # OPTIONS=menucolors MENUCOLOR=" blessed "=green MENUCOLOR=" holy "=green MENUCOLOR=" uncursed "=yellow MENUCOLOR=" cursed "=red MENUCOLOR=" unholy "=red MENUCOLOR=" cursed .* (being worn)"=orange&underline debian/rules0000755000000000000000000001230611765605745010270 0ustar #!/usr/bin/make -f ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif DEB_CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall DEB_CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) DEB_LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) # upstream Makefile only has CFLAGS (missing CPPFLAGS) # and does not give CFLAGS to linking calls, so add them. # also needs some stuff so the Makefile can be overriden: CFLAGS = $(DEB_CPPFLAGS) $(DEB_CFLAGS) -I../include -g -Wall -DGCC_WARN LFLAGS = $(DEB_CFLAGS) $(DEB_LDFLAGS) build-arch: build-arch-stamp build-arch-stamp: Makefile if dpkg-buildflags --status >/dev/null 2>&1 ; then dpkg-buildflags --status ; fi +$(call build_target,console) +$(call build_target,x11) +$(call build_target,lisp) touch src/nethack.dummy ; sleep 2 $(MAKE) -j1 LFLAGS='$(LFLAGS)' CFLAGS='$(CFLAGS) -DUSE_XPM' \ GAME=src/nethack.dummy \ VARDATND="x11tiles pet_mark.xbm rip.xpm mapbg.xpm" \ Guidebook data oracles options quest.dat rumors dungeon spec_levs \ check-dlb x11tiles pet_mark.xbm rip.xpm mapbg.xpm $(MAKE) -C util LFLAGS='$(LFLAGS)' CFLAGS='$(CFLAGS)' recover touch $@ TARGETS = console lisp x11 define build_target $(MAKE) clean touch include/config.h sleep 2 $(MAKE) LFLAGS='$(LFLAGS)' CFLAGS='$(CFLAGS) $(EXTRACPP_$1)' \ WINSRC='$(SRC_$1)' WINOBJ='$(OBJ_$1)' WINLIB='$(LIB_$1)' \ $(EXTRA_$1) GAME='nethack.$1' \ -C src 'nethack.$1' endef SRC_console = $$(WINTTYSRC) OBJ_console = $$(WINTTYOBJ) LIB_console = -lncurses EXTRACPP_console = SRC_x11 = $$(WINTTYSRC) $$(WINX11SRC) OBJ_x11 = $$(WINTTYOBJ) $$(WINX11OBJ) LIB_x11 = -lncurses -lXaw -Wl,--as-needed -lXmu -lXext -Wl,--no-as-needed -lXt -lXpm -lX11 -Wl,--as-needed -lm -Wl,--no-as-needed EXTRACPP_x11 = -DX11_GRAPHICS SRC_lisp = $$(WINLISPSRC) OBJ_lisp = $$(WINLISPOBJ) LIB_lisp = $$(WINLISPLIB) EXTRACPP_lisp = -DLISP_GRAPHICS -DDEFAULT_WINDOW_SYS=\"lisp\" Makefile: # setup.sh makes the symlinks for the Makefiles. Giving it any # (in this case, 1) tells it to make symlinks. sh sys/unix/setup.sh 1 clean: dh_testdir dh_testroot rm -f build-arch-stamp rm -f nh10.pcf* rm -f $(patsubst %,src/nethack.%,$(TARGETS) dummy) if [ -f Makefile ] ; then $(MAKE) spotless ; fi find . -name Makefile -print0 | xargs -r -0 --no-run-if-empty rm dh_clean build-indep: binary-indep: # Ye olde no-op. binary-arch: build-arch-stamp dh_testdir dh_testroot dh_prep dh_installdirs dh_installinit --no-start -pnethack-common -- 'start 18 2 3 4 5 .' dh_link chgrp games debian/nethack-common/usr/lib/games/nethack chgrp -R games debian/nethack-common/var/games/nethack chmod -R 2775 debian/nethack-common/var/games/nethack install -m 0755 -o root -g root debian/recover-helper \ debian/nethack-common/usr/lib/games/nethack/recover-helper install -m 0644 -o root -g root dat/nhdat \ debian/nethack-common/usr/lib/games/nethack/nhdat install -m 0644 -o root -g root dat/hh \ debian/nethack-common/usr/lib/games/nethack/hh install -m 0644 -o root -g root debian/nethackrc.tty \ debian/nethack-common/etc/nethack/nethackrc.tty install -m 0644 -o root -g root debian/nethack.xpm \ debian/nethack-common/usr/share/pixmaps install -m 644 debian/x11/NetHack.ad \ debian/nethack-x11/etc/X11/app-defaults/NetHack /usr/bin/bdftopcf -o nh10.pcf win/X11/nh10.bdf gzip -9f nh10.pcf install -m 644 nh10.pcf.gz debian/nethack-x11/usr/share/fonts/X11/misc # all graphics data needed by the graphical front ends for file in x11tiles pet_mark.xbm rip.xpm mapbg.xpm; do \ install -m 0644 -o root -g root dat/$$file \ debian/nethack-common/usr/share/pixmaps/nethack/; \ done # install all utilities for prg in dgn_comp lev_comp dlb; do \ install -m 0755 -o root -g root util/$$prg \ debian/nethack-common/usr/lib/games/nethack/$$prg; \ done # may become setgid games install -m 0755 -o root -g games util/recover \ debian/nethack-common/usr/lib/games/nethack/recover; \ # all shell scripts, nethack binaries, and nethackrcs for flavor in $(TARGETS); do \ install -m 0755 -o root -g root debian/$$flavor/nethack.sh \ debian/nethack-$$flavor/usr/lib/games/nethack/nethack-$$flavor.sh; \ if [ -f "debian/$$flavor/nethack-tty.sh" ]; then \ install -m 0755 -o root -g root debian/$$flavor/nethack-tty.sh \ debian/nethack-$$flavor/usr/lib/games/nethack/nethack-$$flavor-tty.sh; \ fi; \ install -m 0644 -o root -g root debian/$$flavor/nethackrc \ debian/nethack-$$flavor/etc/nethack/nethackrc.$$flavor; \ install -m 2755 -o root -g games src/nethack.$$flavor \ debian/nethack-$$flavor/usr/lib/games/nethack/nethack-$$flavor; \ done dh_installdocs -a -A README.menucolor dh_installdocs -pnethack-common debian/README.patches dh_install dh_installmenu -a dh_installdebconf -pnethack-common dh_installexamples -pnethack-x11 debian/x11/NetHack.ad dh_installman -a dh_installchangelogs -a dh_installxfonts -a dh_lintian -a dh_strip -a dh_compress -a dh_fixperms -a -Xnethack dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch build: build-arch build-indep .PHONY: build build-arch build-indep clean binary-indep binary-arch binary debian/nethack-lisp.links0000644000000000000000000000020211765144123012610 0ustar usr/lib/games/nethack/nethack-lisp.sh usr/games/nethack-lisp usr/share/man/man6/nethack.6.gz usr/share/man/man6/nethack-lisp.6.gz debian/nethack-lisp.copyright0000644000000000000000000001502511765144123013511 0ustar This package was created by Ben Gertzfield on Sun, 12 Dec 1999 14:23:01 -0800. It was originally Debianized by Paul Haggart . Nethack's home site is: http://www.nethack.org/ This archive was downloaded from: http://us.dl.sourceforge.net/sourceforge/nethack/nethack-342.tgz Copyright: NETHACK GENERAL PUBLIC LICENSE (Copyright 1989 M. Stephenson) . (Based on the BISON general public license, copyright 1988 Richard M. Stallman) Everyone is permitted to copy and distribute verbatim copies of this license, but changing it is not allowed. You can also use this wording to make the terms for other programs. The license agreements of most software companies keep you at the mercy of those companies. By contrast, our general public license is intended to give everyone the right to share NetHack. To make sure that you get the rights we want you to have, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. Hence this license agreement. Specifically, we want to make sure that you have the right to give away copies of NetHack, that you receive source code or else can get it if you want it, that you can change NetHack or use pieces of it in new free programs, and that you know you can do these things. To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of NetHack, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. Also, for our own protection, we must make certain that everyone finds out that there is no warranty for NetHack. If NetHack is modified by someone else and passed on, we want its recipients to know that what they have is not what we distributed. Therefore we (Mike Stephenson and other holders of NetHack copyrights) make the following terms which say what you must do to be allowed to distribute or change NetHack. COPYING POLICIES 1. You may copy and distribute verbatim copies of NetHack source code as you receive it, in any medium, provided that you keep intact the notices on all files that refer to copyrights, to this License Agreement, and to the absence of any warranty; and give any other recipients of the NetHack program a copy of this License Agreement along with the program. 2. You may modify your copy or copies of NetHack or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above (including distributing this License Agreement), provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains or is a derivative of NetHack or any part thereof, to be licensed at no charge to all third parties on terms identical to those contained in this License Agreement (except that you may choose to grant more extensive warranty protection to some or all third parties, at your option) c) You may charge a distribution fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 3. You may copy and distribute NetHack (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with full information as to how to obtain the complete machine-readable source code from an appropriate archive site. (This alternative is allowed only for noncommercial distribution.) For these purposes, complete source code means either the full source distribution as originally released over Usenet or updated copies of the files in this distribution used to create the object code or executable. 4. You may not copy, sublicense, distribute or transfer NetHack except as expressly provided under this License Agreement. Any attempt otherwise to copy, sublicense, distribute or transfer NetHack is void and your rights to use the program under this License agreement shall be automatically terminated. However, parties who have received computer software programs from you with this License Agreement will not have their licenses terminated so long as such parties remain in full compliance. Stated plainly: You are permitted to modify NetHack, or otherwise use parts of NetHack, provided that you comply with the conditions specified above; in particular, your modified NetHack or program containing parts of NetHack must remain freely available as provided in this License Agreement. In other words, go ahead and share NetHack, but don't try to stop anyone else from sharing it farther. The lisp-window patch used to build this package comes with the following license: Copyright (c) Shawn Betts, Ryan Yeske, 2001 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/nethack-common.manpages0000644000000000000000000000010411765144123013605 0ustar doc/nethack.6 doc/recover.6 doc/lev_comp.6 doc/dgn_comp.6 doc/dlb.6 debian/nethack-lisp.dirs0000644000000000000000000000007711765144123012443 0ustar etc/nethack usr/games usr/lib/games/nethack usr/share/man/man6 debian/source/0000755000000000000000000000000011765144123010472 5ustar debian/source/format0000644000000000000000000000001411765144123011700 0ustar 3.0 (quilt) debian/nethack-common.links0000644000000000000000000000010511765144123013133 0ustar usr/share/doc/nethack-common/copyright usr/lib/games/nethack/license debian/nethack-common.docs0000644000000000000000000000002211765144123012741 0ustar doc/Guidebook.txt debian/nethack-console.prerm0000644000000000000000000000015711765144123013321 0ustar #!/bin/sh set -e update-alternatives --remove nethack /usr/lib/games/nethack/nethack-console.sh #DEBHELPER# debian/README.patches0000644000000000000000000000223311765144123011500 0ustar Patches included in the Debian package of NetHack ================================================= 90_enh_hpmon - by Ralph Churchill Enables color HP monitor for textmode NetHack. URL: http://www.netsonic.fi/~walker/nh/hpmon.diff 91_enh_menucolors - by Pasi Kallinen Pasi Kallinen's patch to add customizable colors to inventory items. URL: http://www.cs.joensuu.fi/~pkalli/code/nh343-menucolor.diff 92_enh_paranoid_hit - mostly by me: Joshua Kwan Option to change logistics for hitting peacefuls, where you have to type 'yes' instead of 'y' to confirm the hit. Old logic made it easy to hold down 'y' because you were going up and left, and accidentally hit someone. 93_enh_dump - by Tom Friedetzky, Jukka Lahtinen, Darshan Shaligram Saves a snapshot of your inventory, skills, enlightenment, death conditions into a file when you die, as a text file. URL: http://www.netsonic.fi/~walker/nh/dump-343.diff 94_enh_sortloot - by Jeroen Demeyer and Jukka Lahtinen Sort item lists (container readouts, etc.) alphabetically. URL: http://www.netsonic.fi/~walker/nh/sortloot-343.diff debian/nethack-console.menu0000644000000000000000000000034111765144123013133 0ustar ?package(nethack-console):needs="text" \ command="/usr/games/nethack-console" \ hints="Roguelike,Maze,Dungeon" \ section="Games/Adventure" \ title="NetHack (No GUI)" \ icon="/usr/share/pixmaps/nethack.xpm" debian/lisp/0000755000000000000000000000000011765144123010141 5ustar debian/lisp/nethackrc0000644000000000000000000000076311765144123012034 0ustar # # System-wide NetHack configuration file for lisp-window NetHack. # OPTIONS=windowtype:lisp,toptenwin,hilite_pet,!number_pad OPTIONS=fixinv,safe_pet,sortpack,tombstone,color OPTIONS=verbose,news,fruit:potato OPTIONS=dogname:Slinky OPTIONS=catname:Rex OPTIONS=pickup_types:$ OPTIONS=nomail # Enable this if you want to see your inventory sorted in alphabetical # order by item instead of by index letter: # OPTIONS=sortloot:full # or if you just want containers sorted: # OPTIONS=sortloot:loot debian/lisp/nethack.sh0000644000000000000000000000075211765144123012116 0ustar #!/bin/sh set -e HACKSTYLE=lisp if [ -z "$NETHACKOPTIONS" ]; then if [ -e $HOME/.nethackrc ]; then NETHACKOPTIONS=$HOME/.nethackrc export NETHACKOPTIONS elif [ -e $HOME/.nethackrc.$HACKSTYLE ]; then NETHACKOPTIONS=$HOME/.nethackrc.$HACKSTYLE export NETHACKOPTIONS else NETHACKOPTIONS=/etc/nethack/nethackrc.$HACKSTYLE export NETHACKOPTIONS fi fi HACKDIR=/usr/lib/games/nethack export HACKDIR HACK=$HACKDIR/nethack-$HACKSTYLE cd $HACKDIR exec $HACK "$@" debian/nethack-console.links0000644000000000000000000000021311765144123013305 0ustar usr/lib/games/nethack/nethack-console.sh usr/games/nethack-console usr/share/man/man6/nethack.6.gz usr/share/man/man6/nethack-console.6.gz debian/po/0000755000000000000000000000000011765144123007610 5ustar debian/po/de.po0000644000000000000000000001421011765144123010536 0ustar # Translation of nethack debconf templates to German # Copyright (C) Helge Kreutzmann , 2006, 2009. # This file is distributed under the same license as the nethack package. # msgid "" msgstr "" "Project-Id-Version: nethack 3.4.3-10.7\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-06 19:23+0200\n" "Last-Translator: Helge Kreutzmann \n" "Language-Team: de \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Setgid-Bit für NetHacks »recover«-Hilfswerkzeug verwenden?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Das Programm »recover« im Paket nethack-common wird traditionell mit " "gesetztem »setgid«-Bit installiert, so dass es alle Benutzer (mit den " "Privilegien der Gruppe »games«) für die Wiederherstellung ihrer eigenen, " "gespeicherten Dateien nach einem Absturz verwenden können. Dies ist eine " "mögliche Quelle für Sicherheitsprobleme." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Dieses Paket enthält ein Skript, das während des Systemstarts läuft und " "»recover« auf jede gefundene defekte Speicherdatei anwendet. Dies reduziert " "die Wahrscheinlichkeit, dass Benutzer selbst »recover« ausführen müssen, " "daher wird »recover« standardmäßig ohne die hierzu notwendigen besonderen " "Rechte-Bits installiert." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Falls Sie diese Option auswählen, können nicht-privilegierte Benutzer " "»recover« ausführen." #~ msgid "abort, backup, purge, ignore" #~ msgstr "Abbrechen, Sichern, vollständig Löschen, Ignorieren" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "" #~ "Soll NetHack Ihre alten, inkompatiblen gespeicherten Spielstände sichern?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Sie führen ein Upgrade von einer Version von NetHack durch, dessen " #~ "gespeicherten Spielstände nicht kompatibel zu der Version sind, auf die " #~ "Sie das Upgrade durchführen. Sie können die Dateien entweder in /tmp " #~ "sichern, sie vollständig löschen, das Problem ignorieren lassen oder Sie " #~ "können diese Installation abbrechen und die gespeicherten Spielstände von " #~ "NetHack manuell bearbeiten. Ihre Dateien mit den Punkteständen sind " #~ "verloren, falls Sie »vollständig löschen« wählen." #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "Falls Sie auswählen, zu sichern, werden die Dateien in ein gzip-" #~ "komprimiertes Tar-Archiv in /tmp mit einem Zufallsnamen, der mit »nethk« " #~ "beginnt und auf ».tar.gz« endet, gesichert." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "Alte NetHack Speicherdateien können in /var/games/nethack gefunden werden " #~ "(oder in /var/lib/games/nethack bei Versionen vor 3.4.0)." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "" #~ "Möchten Sie, dass NetHacks Wiederherstellungshilfwerkzeug »recover« unter " #~ "der Gruppen-ID games laufen wird (setgid games)?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "Das »recover«-Programm wird als Teil des nethack-common-Pakets " #~ "installiert und existiert, um dem Administrator zu helfen, beschädigte " #~ "Speicherdateien usw. zu retten." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "Traditionell wird »recover« so installiert, dass es unter der Gruppen-ID " #~ "games läuft (setgid games), obwohl dies in der Debian NetHack-" #~ "Installation nicht nötig ist, denn es wird beim Systemstart automatisch " #~ "als Root ausgeführt. Es ist nur hilfreich, um Spielern als normalen " #~ "Benutzern auf dem System zu erlauben, ihre Speicherdateien zu retten, " #~ "falls NetHack abstürzen oder ihre Verbindung mitten im Spiel verloren " #~ "gehen sollte." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Falls Sie »Nein« antworten, müssen Sie »recover« als Root aufrufen oder " #~ "als jemand in der Gruppe games, um Speicherdateien nach einem Absturz " #~ "oder einer Verbindungsunterbrechung zu retten." debian/po/cs.po0000644000000000000000000001404211765144123010556 0ustar # # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans # # Developers do not need to manually edit POT or PO files. # msgid "" msgstr "" "Project-Id-Version: nethack\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-09-13 12:11+0200\n" "Last-Translator: Jan Outrata \n" "Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Nastavit SGID bit u nástroje recover hry NetHack?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Program \"recover\" v balíčku nethack-common je tradičně instalován s " "nastaveným SGID bitem, aby jej mohli po pádu NetHacku použít pro obnovu " "svých uložených souborů všichni uživatelé (s právy skupiny \"games\"). Je to " "ale potenciální zdroj bezpečnostních problémů." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Tento balíček obsahuje skript pro obnovu všech poškozených uložených " "souborů, který se spouští při startu systému. To snižuje pravděpodobnost " "toho, že jej uživatelé budou muset spouštět sami, takže výchozí je " "instalovat program recover bez pro to potřebných speciálních práv." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Pokud tuto možnost zvolíte, neprivilegovaní uživatelé budou moci \"recover\" " "spouštět." #~ msgid "abort, backup, purge, ignore" #~ msgstr "zrušit, zálohovat, smazat, ignorovat" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "Má NetHack zálohovat vaše staré, nekompatibilní ukládací soubory?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Aktualizujete z verze NetHack, jejíž ukládací soubory nejsou kompatibilní " #~ "s verzí, na kterou aktualizujete. Můžete je buď zálohovat do /tmp, " #~ "smazat, zcela tento problém ignorovat, nebo tuto instalaci zrušit a " #~ "nakládat s ukládacími soubory hry NetHack manuálně. Vaše soubory s " #~ "výsledky budou ztraceny, pokud zvolíte smazání." #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "Pokud zvolíte zálohovat, soubory budou zálohovány do archivu programu tar " #~ "komprimovaném programem gzip v /tmp s náhodným jménem začínajícím na " #~ "'nethk' a končícím s '.tar.gz'." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "Staré ukládací soubory hry NetHack lze nalézt v /var/games/nethack (nebo /" #~ "var/lib/games/nethack, pro verze před 3.4.0)." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "" #~ "Chcete nastavit SGID bit pro skupinu games u nástroje recover hry NetHack?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "Program 'recover' je instalován jako součást balíčku nethack-common a " #~ "pomáhá správci obnovit poškozené ukládací soubory, atd." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "Recover je tradičně instalován s nastaveným SGID bitem pro skupinu games, " #~ "i když u Debianní instalace hry NetHack nemusí být, protože je " #~ "automaticky spouštěn při startu systému pod uživatelem root. S nastaveným " #~ "SGID bitem je užitečný jenom pro umožnění hráčům jako obyčejným " #~ "uživatelům systému obnovit si jejich ukládací soubory, když NetHack " #~ "spadne nebo se přeruší spojení uprostřed hry." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Pokud odpovíte ne, budete muset pro obnovu ukládacích souborů po pádu " #~ "nebo přerušení spojení spustit recover pod uživatelem root nebo někým ve " #~ "skupině games." debian/po/it.po0000644000000000000000000001376611765144123010601 0ustar # ITALIAN TRANSLATION OF NETHACK'S.PO-DEBCONF FILE # Copyright (C) 2008 THE NETHACK'S COPYRIGHT HOLDER # This file is distributed under the same license as the NetHack package. # # Vincenzo Campanella , 2008. msgid "" msgstr "" "Project-Id-Version: NetHack 3.4.3-10.7\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2008-10-23 08:48+0200\n" "Last-Translator: Vincenzo Campanella \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Usare setgid con l'utilità di ripristino di NetHack?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Normalmente il programma di ripristino nel pacchetto nethack-common viene " "installato con l'opzione «setgid», in modo che tutti gli utenti possano " "usarlo per recuperare tutti i propri file salvati dopo un crash (con i " "privilegi del gruppo «games»). Questo però è una fonte di potenziali " "problemi di sicurezza." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Questo pacchetto include uno script che viene eseguito all'avvio del sistema " "e che ripristina qualsiasi file salvato danneggiato trovato. Questo rende " "più improbabile che gli utenti necessitino di usare tale opzione, per cui in " "modalità predefinita viene installata l'utilità di ripristino senza i " "permessi speciali richiesti." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Se si sceglie questa opzione, gli utenti senza privilegi potranno eseguire " "l'utilità di ripristino." #~ msgid "abort, backup, purge, ignore" #~ msgstr "" #~ "abort (annullare), backup (salvare), purge (eliminare), ignore (ignorare)" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "NetHack deve mantenere i vecchi file non compatibili salvati?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Si sta aggiornando da una versione di NetHack i cui file salvati non sono " #~ "compatibili con la versione a cui si sta eseguendo l'aggiornamento. È " #~ "possibile salvarli nella directory «/tmp», eliminarli, ignorare " #~ "completamente questo problema o annullare questa installazione e " #~ "manipolare manualmente i file salvati. Se si sceglie di eliminare i file, " #~ "i punteggi andranno persi." #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "Se si sceglie di salvarli, i file saranno salvati in un archivio " #~ "compresso gzip in «/tmp» con un nome a caso che inizia per «nethk» e " #~ "finisce in «.tar.gz»." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "I vecchi file salvati di NetHack possono essere trovati in «/var/games/" #~ "nethack»; per le versioni antecedenti la 3.4.0, si trovano in «/var/lib/" #~ "games/nethack»." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "" #~ "Si desidera che l'utilità di ripristino di NetHack sia installata in " #~ "modalità «setgid games»?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "Il programma «recover» è installato come parte del pacchetto nethack-" #~ "common; il suo scopo è di aiutare l'amministratore a recuperare file " #~ "salvati corrotti, ecc." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "Normalmente recover è installato in modalità «setgid games» (quantunque " #~ "questo non sia necessario nell'installazione Debian, in quanto viene " #~ "eseguito automaticamente all'avvio del sistema come root). Tale modalità " #~ "è utile per consentire ai giocatori, come utenti normali, di recuperare i " #~ "propri file salvati, qualora NetHack vada in crash o la connessione " #~ "dovesse interrompere il gioco." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Se si risponde negativamente, sarà necessario autenticarsi come root o " #~ "come utente appartenente al gruppo «games» per recuperare i file salvati " #~ "dopo un crash o dopo un'interruzione della connessione." debian/po/da.po0000644000000000000000000000467211765144123010545 0ustar # Danish translation nethack. # Copyright (C) 2011 nethack & nedenstående oversættere. # This file is distributed under the same license as the nethack package. # Joe Hansen (joedalton2@yahoo.dk), 2011. # Korrekturlæst Ask Hjorth Larsen, 2011. # msgid "" msgstr "" "Project-Id-Version: nethack\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2011-05-12 18:30+01:00\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Brug setgid bit med NetHacks gendannelsesredskab?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Gendannelsesprogrammet i pakken nethack-common er traditionelt installeret " "med »setgid«-bitten slået til, så alle brugere kan bruge den til at gendanne " "deres egne save-filer efter et nedbrud (med privilegier til »games«-" "gruppen). Dette er en potentiel kilde til sikkerhedsproblemer." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Denne pakke inkluderer et skript, som kører under systemopstart, og som " "starter gendannelse af alle ødelagte save-filer, den finder. Dette gør det " "mindre sandsynligt at brugere selv vil køre dem, så standarden er at " "installere gendannelse uden de specielle tilladelsesbit krævet for dette." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Hvis du vælger denne indstilling vil upriviligerede brugere kunne køre " "gendannelse (»recover«)." debian/po/templates.pot0000644000000000000000000000315111765144123012332 0ustar # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" debian/po/eu.po0000644000000000000000000000520311765144123010561 0ustar # translation of nethack_3.4.3-10.7_eu.po to Basque # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # xabier bilbao , 2008. # Iñaki Larrañaga Murgoitio , 2009. msgid "" msgstr "" "Project-Id-Version: nethack_3.4.3-10.7_eu\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-01 15:12+0200\n" "Last-Translator: Iñaki Larrañaga Murgoitio \n" "Language-Team: Basque \n" "Language: eu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Erabili setgid bit-a NetHack-en berreskuratze tresnarekin?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Nethack-common paketeko \"recover\" (berreskuratu) programa \"setgid\" bit-a " "ezarrita duela instalatu ohi da, horrela erabiltzaile guztiek programa hau " "erabil dezakete kraskadura baten ostean beraien gordetako fitxategiak " "berreskuratzeko (\"games\" taldeko pribilegioekin). Honek segurtasuneko " "arazoak sor ditzake." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Pakete honek script bat dauka sistema abiatzean exekutatzen dena, aurkitzen " "duen gordetako fitxategi hondatu bakoitzean \"recover\"-i deituz. Honela, " "erabiltzaileek ez daukate zer exekutatu beharrik beraien kasa, eta ondorioz, " "lehenespenez \"recover\" baimen bereziko bit-ik gabe instalatzen da." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Aukera hau hautatzen baduzu, pribilegiorik gabeko erabiltzaileek \"recover" "\" (berreskuratu) exekutatu ahal izango dute." debian/po/zh_TW.po0000644000000000000000000000442711765144123011212 0ustar # nethack po-debconf translation # Copyright (C) 2008 Joshua Kwan # This file is distributed under the same license as the nethack package. # Kanru Chen , 2008, 2009 # msgid "" msgstr "" "Project-Id-Version: 3.4.3-10.5\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-09-07 21:33+0800\n" "Last-Translator: Kanru Chen \n" "Language-Team: Debian-user in Chinese [Big5] \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "替 NetHack 的修復工具設定 setgid bit?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "包含於 nethack-common 套件中的 \"recover\" 程式許傳統上是安裝成有 \"setgid\" " "位元的,這樣所有屬於 \"games\" 群組的使用者都可以在程式崩潰後用它來修復自己的" "存檔。而這可能帶來潛在的安全問題。" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "此套件包含了一個腳本,於系統啟動時執行 recover 修復找到的破損存檔。因此使用者" "很少需要自已執行 recover 程式,也不需要替 recover 設定特殊權限。" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "如果您選擇此選項,無特殊權限的使用者也可以執行 \"recover\" 程式。" debian/po/ja.po0000644000000000000000000000522311765144123010544 0ustar # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: nethack\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-03 18:59+0900\n" "Last-Translator: Kenshi Muto \n" "Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "NetHack の recover ユーティリティに setgid ビットを適用しますか?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "nethack-common パッケージの \"recover\" プログラムは、慣習的に (\"games\" グ" "ループ権限付きの) \"setgid\" ビットをセットしてインストールされます。これによ" "り、すべてのユーザが自身のセーブファイルをクラッシュ後に復旧するのに利用でき" "ます。これは、セキュリティ問題の潜在的原因となり得ます。" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "このパッケージは、システム起動中に、何らかのセーブファイルを発見したときにそ" "の復旧を実行するスクリプトを含んでいます。これにより、ユーザが自身でそれを実" "行する必要性はあまりなくなるので、デフォルトでは recover はその実行に必要な特" "権ビットはなしでインストールされます。" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "この選択肢で「はい」と答えると、権限のないユーザも \"recover\" を実行できるよ" "うになります。" debian/po/es.po0000644000000000000000000001674011765144123010567 0ustar # nethack 3.4.3-10.2 translation to spanish # Copyright (C) 2007 Software in the Public Interest, SPI Inc. # This file is distributed under the same license as the nethack package. # # Changes: # - Initial translation # Rafael Ernesto Rivas, 2007 # - Reviewed by: # Fernando C. Estrada, Carlos Galisteo, Alvaro Herrera, # Javier Fernandez-Sanguino # - Review # Javier Fernandez-Sanguino, 2008 # # # Traductores, si no conoce el formato PO, merece la pena leer la # documentación de gettext, especialmente las secciones dedicadas a este # formato, por ejemplo ejecutando: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Equipo de traducción al español, por favor lean antes de traducir # los siguientes documentos: # # - El proyecto de traducción de Debian al español # http://www.debian.org/intl/spanish/ # especialmente las notas y normas de traducción en # http://www.debian.org/intl/spanish/notas # # - La guía de traducción de po's de debconf: # /usr/share/doc/po-debconf/README-trans # o http://www.debian.org/intl/l10n/po-debconf/README-trans # # Si tiene dudas o consultas sobre esta traducción consulte con el último # traductor (campo Last-Translator) y ponga en copia a la lista de # traducción de Debian al español () # msgid "" msgstr "" "Project-Id-Version: nethack 3.4.3-10.2\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-02 08:51+0200\n" "Last-Translator: Javier Fernández-Sanguino \n" "Language-Team: Debian Spanish \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-POFile-SpellExtra: tmp lib tar nethk nethack gz games common\n" "X-POFile-SpellExtra: setgid var recover NetHack\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "¿Desea utilizar el bit setgid para la herramienta «recover»?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "El programa «recover» del paquete «nethack-common» se instala habitualmente " "con el bit «setgid» fijado. De esta forma todos los usuarios pueden " "utilizarlo para recuperar sus propias partidas después de un error (con los " "privilegios del grupo «games»). Esto puede ser, sin embargo, una fuente " "potencial de problemas de seguridad." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Este paquete incluye un programa que se ejecuta en el arranque del sistema y " "que ejecuta «recover» sobre cualquier partida dañada que encuentre. Esto " "hace más improbable que los usuarios tengan que ejecutarlos ellos mismos, " "por lo que por omisión la herramienta «recover» se instala sin los permisos " "especiales necesarios para hacer lo anterior." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Los usuarios no privilegiados podrán ejecutar «recover» si escoge esta " "opción." #~ msgid "abort, backup, purge, ignore" #~ msgstr "interrumpir, hacer una copia, eliminar, ignorar" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "" #~ "¿Desea que NetHack guarde sus partidas antiguas (incompatibles con esta " #~ "versión)?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Está actualizando desde una versión de NetHack cuyas partidas no son " #~ "compatibles con la versión a la que está actualizando. Puede guardar una " #~ "copia de seguridad de las partidas en «/tmp», eliminarlas, ignorar este " #~ "problema, o interrumpir la instalación y gestionar de forma manual las " #~ "partidas salvadas. Se perderán sus archivos de puntuación si elige " #~ "eliminarlas." #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "La copia de seguridad, si decide hacerla, se hará en un archivo " #~ "comprimido de formato «tar» en la carpeta «/tmp». Se utilizará un nombre " #~ "de fichero aleatorio que comienza por «nethk» y termina en «.tar.gz»." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "Encontrará los ficheros de partidas antiguas de NetHack en «/var/games/" #~ "nethack» (o «/var/lib/games/nethack» si la versión es anterior a la " #~ "3.4.0)." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "" #~ "¿Desea que la herramienta «recover» de NetHack tenga permisos del grupo " #~ "«games»?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "El paquete «nethack-common» instala el programa «recover». Este programa " #~ "se proporciona para que el usuario administrador pueda, por ejemplo, " #~ "recuperar archivos de partidas dañados." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "La herramienta «recover» se instala normalmente con el bit «setgid» y " #~ "asociado al grupo «games», si bien no es necesario para la instalación de " #~ "NetHack en Debian ya que se ejecuta automáticamente en el arranque del " #~ "sistema como superusuario. La única razón de que el binario se configure " #~ "«setgid» es permitir a los usuarios normales utilizar la herramienta " #~ "«recover» para recuperar sus partidas guardadas en el caso de que NetHack " #~ "se interrumpa o su conexión remota falle en el transcurso de una partida." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Si su respuesta es no, deberá de ejecutar la herramienta «recover» como " #~ "superusuario o con los permisos de un miembro del grupo «games» cuando " #~ "desee recuperar los ficheros de las partidas en caso de un fallo del " #~ "programa o pérdida de conexión." debian/po/ru.po0000644000000000000000000000640711765144123010605 0ustar # translation of ru.po to Russian # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Yuri Kozlov , 2008. # Sergey Alyoshin , 2009. # Yuri Kozlov , 2009. msgid "" msgstr "" "Project-Id-Version: nethack 3.4.3-10.7\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-02 21:08+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Включить на файле recover из NetHack бит setgid?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Программа 'recover' находится в пакете nethack-common и, обычно, " "устанавливается с включённым битом \"setgid\" (с привилегиями группы \"games" "\") для того, чтобы все пользователи могли восстанавливать свои файлы " "сохранённых игр после падения. Но это потенциальный источник проблем с " "безопасностью." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "В этом пакете есть сценарий, выполняемый при включении компьютера; он " "вызывает recover и восстанавливает все испорченные файлы сохранения игры, " "которые найдёт. При этом отпадает необходимость самостоятельного запуска " "пользователями утилиты восстановления, поэтому по умолчанию recover " "устанавливается без специальных битов, повышающих права." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Если вы ответите утвердительно, то все бесправные пользователи смогут " "запускать \"recover\"." debian/po/pt_BR.po0000644000000000000000000001316711765144123011166 0ustar # # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans # # Developers do not need to manually edit POT or PO files. # # Felipe Augusto van de Wiel (faw) , 2006. # Licensed under the same terms of the nethack package. # msgid "" msgstr "" "Project-Id-Version: nethack (20061112)\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2006-11-12 14:12-0200\n" "Last-Translator: Felipe Augusto van de Wiel (faw) \n" "Language-Team: l10n portuguese \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "pt_BR utf-8\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" #~ msgid "abort, backup, purge, ignore" #~ msgstr "abortar, backup, expurgar (\"purge\"), ignorar" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "" #~ "NetHack deveria fazer backup dos seus antigos e incompatíveis arquivos " #~ "salvos?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Você está atualizando a partir de uma versão do NetHack cujos arquivos " #~ "salvos não são compatíveis com a versão para a qual você está " #~ "atualizando. Você pode fazer o backup deles no /tmp, expurgá-los, ignorar " #~ "este problema completamente ou abortar esta instalação e manualmente " #~ "manusear os arquivos salvos do NetHack. Seus arquivos de pontuação serão " #~ "perdidos se você escolher expurgar." #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "Se você optar pelo backup, os arquivos serão salvos num arquivo tar " #~ "compactado com gzip no /tmp com um nome aleatório começando com 'nethk' e " #~ "terminando com '.tar.gz'." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "Antigos arquivos salvos NetHack podem ser encontrados em /var/games/" #~ "nethack (ou /var/lib/games/nethack, para versões anteriores a 3.4.0)." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "" #~ "Você gostaria que o utilitário de recuperação do NetHack fosse " #~ "configurado com setgid games?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "O programa 'recover' é instalado como parte do pacote nethack-common e " #~ "existe para ajudar administradores a recuperar arquivos salvos quebrados, " #~ "etc." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "\"Recover\" é tradicionalmente instalado com setgid games, no entanto " #~ "isto não é necessário na instalação do NetHack no Debian, pois ele é " #~ "automaticamente executado na inicialização como root. Sua única utilidade " #~ "como binário setgid é permitir que jogadores como usuários normais do " #~ "sistema possam recuperar seus arquivos salvos, caso o NetHack falhe " #~ "(\"crash\") ou suas conexões caiam no meio do jogo." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Se você responder não, você terá que executar a recuperação como root ou " #~ "como alguém que esteja no grupo games para recuperar os arquivos salvos " #~ "após uma falha (\"crash\") ou uma queda de conexão." debian/po/POTFILES.in0000644000000000000000000000006311765144123011364 0ustar [type: gettext/rfc822deb] nethack-common.templates debian/po/pl.po0000644000000000000000000000504411765144123010566 0ustar # Copyright (C) 2009 # This file is distributed under the same license as the nethack package. # # Michał Kułach , 2012. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2012-01-26 14:20+0100\n" "Last-Translator: Michał Kułach \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.2\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Ustawić atrybut setgid dla narzędzia odzyskiwania NetHack?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Program \"recover\" w pakiecie nethack-common jest tradycyjnie instalowany z " "ustawionym atrybutem \"setgid\", co pozwala wszystkim użytkownikom na " "odzyskanie ich własnych plików zapisu po awarii (z uprawnieniami grupy " "\"games\"). Jest to potencjalne źródło problemów z bezpieczeństwem." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Pakiet zawiera skrypt, który jest jest wykonywany podczas uruchamiania " "systemu i odzyskuje wszystkie uszkodzone pliki zapisu jakie znajdzie. " "Powoduje to, że jest mniej prawdopodobne, aby użytkownik musiał go uruchomić " "samodzielnie, dlatego domyślną opcją jest zainstalowanie programu " "odzyskującego bez specjalnych uprawnień." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Jeśli ta opcja zostanie wybrana, nieuprzywilejowani użytkownicy będą mogli " "uruchomić program \"recover\"." debian/po/sv.po0000644000000000000000000001407611765144123010610 0ustar # # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans # # Developers do not need to manually edit POT or PO files. # msgid "" msgstr "" "Project-Id-Version: nethack 3.4.3-8\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-07 19:35+0100\n" "Last-Translator: Martin Bagge \n" "Language-Team: Swedish \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Ska setgid användas för NetHacks återställningsmekanism?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Återställningsprogrammet i paketet nethack-common installeras vanligen med " "\"setgid\" så att alla användare kan använda det för att återställa sina " "egna spelfiler (som ägs av gruppen \"games\") efter en krasch. Detta är en " "potentiell källa till säkerhetsproblem." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Detta paket inkluderar ett skript som körs vid systemets uppstart, detta " "kommer att försöka återställa alla trasiga användarfiler som den hittar. " "Detta gör det mindre troligt att användare själva behöver köra " "återställningen, därför är standardvärdet att installera återställningen " "utan det speciella läget som krävs för att användare själva ska kunna köra " "återställningen." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Om du aktiverar detta alternativ kan användare utan särskilda rättigheter " "köra \"recover\"." #~ msgid "abort, backup, purge, ignore" #~ msgstr "avbryt, säkerhetskopiera, rensa, ignorera" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "Ska NetHack säkerhetskopiera din gamla inkompatibla sparfiler?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Du uppgraderar från en version av NetHack vars sparfiler inte är " #~ "kompatibla med den version du uppgraderar till. Du kan antingen " #~ "säkerhetskopiera dom till /tmp, rensa dom, ignorera detta problem totalt " #~ "eller avbryta installationen och manuellt hantera NetHacks sparfiler. " #~ "Dina rekordfiler kommer att förloras om du väljer att rensa." #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "Om du väljer att säkerhetskopiera kommer filerna att kopieras in i en " #~ "gzip-komprimerat tar-arkiv i /tmp med ett slumpat namn som börjar med " #~ "\"nethk\" och slutar på \".tar.gz\"." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "Gamla sparfiler för NetHack kan hittas i /var/games/nethack (eller /var/" #~ "lib/games/nethack för versioner före 3.4.0)." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "Vill du sätta NetHack-verktyget \"recover\" till setgid games?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "Programmet \"recover\" är installerat som en del av paketet nethack-" #~ "common och finns där för att hjälpa administratören att återhämta trasiga " #~ "sparfiler etc." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "Recover är traditionellt installerad som setgid games även om det inte " #~ "behövs vara i Debians NetHack-installation eftersom den körs automatiskt " #~ "som root vid systemets uppstart. Dess enda användbara funktion som en " #~ "setgid-binär är att låta spelare som normala användare på systemet " #~ "återhämta deras sparfiler om NetHack skulle krascha eller deras " #~ "anslutning bryts mitt i spelet." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Om du svarar nej måste du köra recover som root eller som någon i gruppen " #~ "games för att återhämta sparfiler efter en krasch eller en avbruten " #~ "anslutning." debian/po/nl.po0000644000000000000000000000474111765144123010567 0ustar # Dutch translation of nethack debconf templates. # Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the nethack package. # Jeroen Schot , 2011. # msgid "" msgstr "" "Project-Id-Version: nethack 3.4.3-12.2\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2011-09-27 08:51+0200\n" "Last-Translator: Jeroen Schot \n" "Language-Team: Debian l10n Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "De setgid-bit instellen voor NetHack's hulpprogramma recover?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Het programma \"recover\" uit het pakket nethack-common werd van oorsprong " "geïnstalleerd met de \"setgid\"-bit ingesteld, zodat alle gebruikers het " "kunnen gebruiken om hun eigen spelbestanden na een crash te herstellen (met " "de privileges van de \"games\"-groep). Dit is mogelijke bron van " "beveiligingsproblemen." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Dit pakket bevat een script dat tijdens de systeemstart wordt uitgevoerd. " "Dit script roept recover aan op alle corrupte spelbestanden die het kan " "vinden. Hierdoor is de kans kleiner dat gebruikers dit zelf moeten " "uitvoeren, en daarom is het standaard om recover zonder de benodigde " "speciale permissiebits te installeren." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Als u voor deze optie kiest kunnen normale gebruikers \"recover\" uitvoeren." debian/po/vi.po0000644000000000000000000000527611765144123010600 0ustar # Vietnamese translation for Net-Hack. # Copyright © 2009 Free Software Foundation, Inc. # Clytie Siddall , 2005-2009. # msgid "" msgstr "" "Project-Id-Version: nethack 3.4.3-10.7\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-09-23 17:47+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: LocFactoryEditor 1.8\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Dùng bit « setgid » với tiện ích phục hồi của NetHack ?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Chương trình phục hồi « recover » trong gói « nethack-common » thường được " "cài đặt với bit « setgid » được đặt, để mọi người dùng có quyền truy cập của " "nhóm « games » có thể phục hồi các tập tin lưu sau khi phần mềm sụp đổ. Tuy " "nhiên, trường hợp này cũng có thể rủi ro bảo mật." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Gói này bao gồm một văn lệnh mà chạy trong khi hệ thống khởi động, gọi " "chương trình phục hồi « recover » đối với bất cứ tập tin lưu bị hỏng nào " "được tìm. Văn lệnh này làm cho người dùng rất ít có thể cần tự chạy chương " "trình này, thì giá trị mặc định là cài đặt « recover » mà không có các bit " "quyền hạn đặc biệt được yêu cầu cho đó." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Bật tùy chọn này thì các người dùng không có quyền đặc biệt cũng có thể chạy " "« recover »." debian/po/pt.po0000644000000000000000000000475111765144123010602 0ustar # Portuguese translation of nethack. # Copyright (C) 2009 THE nethack'S COPYRIGHT HOLDER # This file is distributed under the same license as the gnunet package. # Rui Branco , 2006. # Carlos Lisboa , 2009 msgid "" msgstr "" "Project-Id-Version: nethack 3.4.3-8\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-15 23:25+0100\n" "Last-Translator: Carlos Lisboa \n" "Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Usar o bit setgid com o utilitário de recuperação do NetHack?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "O programa \"recover\" no pacote nethack-common é tradicionalmente instalado " "com o bit \"setgid\" activado, para que todos os utilizadores possam " "recuperar os seus próprios ficheiros de salvaguarda após um bloqueio (com " "privilégios do grupo \"games\"). Esta é uma potencial fonte de problemas de " "segurança." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Este pacote inclui um script que corre durante o arranque do sistema, " "invocando \"recover\" em qualquer ficheiro de salvaguarda que encontre. Isto " "torna menos provável a necessidade dos utilizadores o correrem por si, assim " "por omissão instala-se o \"recover\" sem os bits especiais de permissões " "requeridas." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Se escolher esta opção, utilizadores sem privilégios poderão correr \"recover" "\"." debian/po/fi.po0000644000000000000000000000474211765144123010555 0ustar # Copyright (C) 2009 # This file is distributed under the same license as the nethack package. # # Esko Arajärvi , 2009. msgid "" msgstr "" "Project-Id-Version: nethack\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-06-09 19:47+0300\n" "Last-Translator: Esko Arajärvi \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Finnish\n" "X-Poedit-Country: FINLAND\n" "X-Generator: Lokalize 0.3\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Tulisiko NetHackin palautustyökalu recover asentaa asetuksella setgid?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Paketin nethack-common ohjelma ”recover” on perinteisesti asennettu " "asetuksella ”setgid”, jotta kaikki käyttäjät voivat korjata " "tallennustiedostonsa järjestelmän kaatumisen jälkeen (ryhmän ”games” " "oikeuksilla). On mahdollista, että tämä on tietoturvariski." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Tässä paketissa on järjestelmän käynnistyksen yhteydessä ajettava " "komentosarja, joka korjaa kaikki löytämänsä rikkoutuneet " "tallennnustiedostot. Tästä syystä on epätodennäköisempää, että käyttäjien " "tarvitsisi ajaa ohjelmaa itse, joten oletuksena recover asennetaan ilman " "erityisoikeuksia." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Jos valitset tämän vaihtoehdon, tavalliset käyttäjät voivat ajaa ohjelman " "”recover”." debian/po/gl.po0000644000000000000000000001371411765144123010560 0ustar # Galician translation of nethack's debconf templates # This file is distributed under the same license as the nethack package. # # Jacobo Tarrio , 2007. # marce villarino , 2009. msgid "" msgstr "" "Project-Id-Version: nethack\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-04-15 22:34+0200\n" "Last-Translator: marce villarino \n" "Language-Team: Galician \n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 0.2\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Desexa empregar o bit setgid coa utilidade de recuperación de NetHack?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "O programa «recover» do paquete nethack-common instálase tradicionalmente co " "bit «setgid» activado, de tal xeito que todos os usuarios podan empregalo " "para recuperar os seus proprios ficheiros gardatos tras dun peche inesperado " "(con privilexios do grupo «games»). Esta é unha fonte potencial de problemas " "de seguranza." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Este paquete inclúe un script que se executa durante o inicio do sistema e " "que invoca a «recover» en calquera ficheiro gardado e estragado que atope, o " "que fai que sexa menos probábel que os usuarios deben executalo por si " "mesmos. Polo tanto, o predeterminado é instalar recover sen os bits de " "permisos especiais requiridos para isto." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Se escolle esta opción, os usuarios sen privilexios poderán executar " "«recover»." #~ msgid "abort, backup, purge, ignore" #~ msgstr "abortar, copiar, eliminar, ignorar" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "¿Debe NetHack gardar as partidas gravadas vellas e incompatibles?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Está a se actualizar dunha versión de NetHack cunhas partidas gravadas " #~ "que non son compatibles coa versión á que se está a actualizar. Pode " #~ "copialas a /tmp/, eliminalas, ignorar este problema completamente ou " #~ "abortar a instalación e xestionar as partidas gravadas de NetHack á man. " #~ "Hanse perder os ficheiros de puntuacións se escolle eliminar." #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "Se escolle copiar, os ficheiros hanse gravar nun arquivo tar comprimido " #~ "con gzip en /tmp cun nome aleatorio que ha comezar por \"nethk\" e ha " #~ "rematar en \".tar.gz\"." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "As antigas partidas gravadas de NetHack están en /var/games/nethack (ou /" #~ "var/lib/games/nethack, para versións anteriores á 3.4.0)." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "" #~ "¿Quere que a utilidade de recuperación de NetHack asuma o grupo \"games\"?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "O programa \"recover\" instálase coma parte do paquete nethack-common e " #~ "existe para axudar ao administrador a recuperar partidas gravadas " #~ "estragadas, etc." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "\"Recover\" adoita instalarse co bit \"setgid\" posto e o grupo \"games" #~ "\", aínda que isto non é necesario na instalación de NetHack de Debian, " #~ "xa que adoita executarse coma administrador ao iniciar o sistema. A súa " #~ "única utilidade coma binario con \"setgid\" consiste en permitir aos " #~ "usuarios normais do sistema recuperar as súas partidas gravadas se " #~ "NetHack falla ou a súa conexión cae a metade do xogo." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Se resposta \"non\", ha ter que executar \"recover\" coma administrador " #~ "ou cun usuario que pertenza ao grupo \"games\" para recuperar as partidas " #~ "gravadas despois dun fallo do programa ou da conexión." debian/po/ca.po0000644000000000000000000001210611765144123010533 0ustar # nethack (debconf) translation to Catalan. # Copyright (C) 2004 Free Software Foundation, Inc. # Aleix Badia i Bosch , 2004 msgid "" msgstr "" "Project-Id-Version: nethack_3.4.3-3_templates\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2004-04-04 19:46GMT\n" "Last-Translator: Aleix Badia i Bosch \n" "Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" #~ msgid "abort, backup, purge, ignore" #~ msgstr "abort, backup, purge, ignore" #~ msgid "Should NetHack back up your old, incompatible save files?" #~ msgstr "" #~ "Voleu que el NetHack faci una còpia de seguretat dels fitxers " #~ "d'emmagatzematge antics i incompatibles?" #~ msgid "" #~ "You are upgrading from a version of NetHack whose save files are not " #~ "compatible with the version you are upgrading to. You may either have " #~ "them backed up into /tmp, purge them, ignore this problem completely, or " #~ "abort this installation and manually handle NetHack's save files. Your " #~ "score files will be lost if you choose to purge." #~ msgstr "" #~ "Els fitxers d'emmagatzematge de la versió del Nethack que esteu " #~ "actualitzant no són compatibles amb la nova versió. Podeu fer-ne una " #~ "còpia de seguretat al directori /tmp, purgar-los, ignorar el problema o " #~ "aturar la instal·lació i gestionar-los manualment. Si escolliu l'opció de " #~ "purgar-los es perdran tots els fitxers de puntuació. " #~ msgid "" #~ "If you choose to back up, the files will be backed up into a gzip-" #~ "compressed tar archive in /tmp with a random name starting with 'nethk' " #~ "and ending in '.tar.gz'." #~ msgstr "" #~ "Si escolliu fer-ne una còpia de seguretat, els fitxers es copiaran a un " #~ "fitxer tar comprimit amb gzip. El fitxer es crearà al directori /tmp amb " #~ "un nom aleatori que començarà per 'nethk' i acabarà per '.tar.gz'." #~ msgid "" #~ "Old NetHack save files can be found in /var/games/nethack (or /var/lib/" #~ "games/nethack, for versions before 3.4.0)." #~ msgstr "" #~ "Podeu trobar els fitxers antics d'emmagatzematge del Nethack al " #~ "directori /var/games/nethack (o a /var/lib/games/nethack en el cas de les " #~ "versions anteriors a la 3.4.0)." #~ msgid "Would you like NetHack's recover utility to be setgid games?" #~ msgstr "Voleu que l'eina de recuperació del NetHack sigui setgid games?" #~ msgid "" #~ "The 'recover' program is installed as part of the nethack-common package " #~ "and exists to help the administrator recover broken save files, etc." #~ msgstr "" #~ "El programa 'recover' s'instal·la com una part més del paquet nethack-" #~ "common. La seva funció és ajudar a l'administrador a recuperar fitxers " #~ "desats amb errors, etc." #~ msgid "" #~ "Recover is traditionally installed setgid games, although it does not " #~ "need to be in the Debian NetHack installation, as it is automatically run " #~ "at boot time as root. Its only usefulness as a setgid binary is to let " #~ "players as normal users on the system recover their save files, should " #~ "NetHack crash or their connection drop mid-game." #~ msgstr "" #~ "El programa recover acostuma a instal·lar-se setgid games, tot i això, no " #~ "necessita estar en la instal·lació del Nethack de Debian ja que s'executa " #~ "automàticament com a superadministrador a l'arrencada. Ser setgid binari " #~ "només és útil al permetre als jugadors com els usuaris normals del " #~ "sistema, recuperar els fitxers emmagatzemats després d'un error del " #~ "Nethack o la desconnexió." #~ msgid "" #~ "If you answer no, you will have to run recover as root or as someone in " #~ "group games to recover save files after a crash or a connection drop." #~ msgstr "" #~ "Si contesteu que no, per poder recuperar els fitxers desats després de " #~ "produir-se un error o una desconnexió, haureu d'executar el recover com a " #~ "superadministrador o qualsevol altre usuari del grup games. " debian/po/fr.po0000644000000000000000000000506711765144123010567 0ustar # French po-debconf translation of nethack # Copyright (C) 2006-2009 Debian French l10n team .org> # This file is distributed under the same license as the nethack package. # # Nicolas Bertolissio , 2003 # Florentin Duneau , 2009 msgid "" msgstr "" "Project-Id-Version: nethack 3.4.2-2\n" "Report-Msgid-Bugs-To: nethack@packages.debian.org\n" "POT-Creation-Date: 2009-03-17 07:46+0100\n" "PO-Revision-Date: 2009-03-29 15:23+0200\n" "Last-Translator: Florentin Duneau \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "Use setgid bit with NetHack's recover utility?" msgstr "Faut-il exécuter recover avec les privilèges du groupe « games » ?" #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "The \"recover\" program in the package nethack-common is traditionally " "installed with the \"setgid\" bit set, so that all users can use it to " "recover their own save files after a crash (with \"games\" group " "privileges). This is a potential source of security problems." msgstr "" "Le programme « recover » du paquet nethack-common est généralement installé " "avec le bit segid positionné. Ainsi, tous les utilisateurs appartenant au " "groupe « games » pourront l'utiliser pour récupérer leurs fichiers de " "sauvegarde après un plantage. Ce réglage comporte toutefois un risque de " "sécurité potentiel." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "This package includes a script that runs during system boot, invoking " "recover on any broken save files it finds. This makes it less likely that " "users will need to run it themselves, so the default is to install recover " "without the special permission bits required for that." msgstr "" "Ce paquet fournit un script qui est exécuté au démarrage du système. Il " "appelle l'outil de récupération sur tout fichier de sauvegarde corrompu " "trouvé. Comme il est peu probable que les utilisateurs doivent l'exécuter " "eux-mêmes, recover est par défaut installé normalement." #. Type: boolean #. Description #: ../nethack-common.templates:2001 msgid "" "If you choose this option, unprivileged users will be able to run \"recover" "\"." msgstr "" "Si vous choisissez cette option, les utilisateurs sans privilège pourront " "exécuter « recover »." debian/patches/0000755000000000000000000000000011765326576010637 5ustar debian/patches/0008-Use-usr-share-pixmaps-nethack-for-pretty-pictures.patch0000644000000000000000000000254411765144123023736 0ustar From 77d8972a0dfdd46bd7ad3661e0d0a2f39b8a253f Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Use /usr/share/pixmaps/nethack/ for pretty pictures. --- win/X11/winX.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/X11/winX.c b/win/X11/winX.c index 14f0e90..1c5d49b 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -919,12 +919,12 @@ static XtResource resources[] = { { "message_lines", "Message_lines", XtRInt, sizeof(int), XtOffset(AppResources *,message_lines), XtRString, "12" }, { "pet_mark_bitmap", "Pet_mark_bitmap", XtRString, sizeof(String), - XtOffset(AppResources *,pet_mark_bitmap), XtRString, "pet_mark.xbm" }, + XtOffset(AppResources *,pet_mark_bitmap), XtRString, PIXMAPDIR "pet_mark.xbm" }, { "pet_mark_color", "Pet_mark_color", XtRPixel, sizeof(XtRPixel), XtOffset(AppResources *,pet_mark_color), XtRString, "Red" }, #ifdef GRAPHIC_TOMBSTONE { "tombstone", "Tombstone", XtRString, sizeof(String), - XtOffset(AppResources *,tombstone), XtRString, "rip.xpm" }, + XtOffset(AppResources *,tombstone), XtRString, PIXMAPDIR "rip.xpm" }, { "tombtext_x", "Tombtext_x", XtRInt, sizeof(int), XtOffset(AppResources *,tombtext_x), XtRString, "155" }, { "tombtext_y", "Tombtext_y", XtRInt, sizeof(int), debian/patches/0021-fix-kfreebsd-ftbfs.patch0000644000000000000000000000265211765326576015720 0ustar Description: Fix FTBFS on kfreebsd "#define BSD 1" also has to be un-commented in include/unixconf.h in order for nethack to be built successfully on kfreebsd (see 0017-Debian-and-Linux-specifics-defined-in-unixconf.h.patch). Also, if 0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch (i.e. the menucolors patch) is applied, defining MENU_COLOR_REGEX causes a FTBFS on kfreebsd (not sure why), so define it only on Linux for now. Author: Vincent Cheng Last-Update: 2012-06-11 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -3,6 +3,10 @@ /* Copyright (c) Robert Patrick Rankin, 1991 */ /* NetHack may be freely redistributed. See license for details. */ +#if defined(__FreeBSD_kernel__) +#include +#endif + /* We could include only config.h, except for the overlay definitions... */ #include "hack.h" /*= --- a/util/makedefs.c +++ b/util/makedefs.c @@ -4,6 +4,10 @@ /* Copyright (c) Dean Luick, 1990. */ /* NetHack may be freely redistributed. See license for details. */ +#if defined(__FreeBSD_kernel__) +#include +#endif + #define MAKEDEFS_C /* use to conditionally include file sections */ /* #define DEBUG */ /* uncomment for debugging info */ --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -835,10 +835,6 @@ #include -#ifndef LINUX -extern char *tparm(); -#endif - # ifdef COLOR_BLACK /* trust include file */ #undef COLOR_BLACK # else debian/patches/0020-fix-64-bit-issues-in-lisp-code.patch0000644000000000000000000000256211765144126017614 0ustar From fd9b0e0a5bcd0fa29507ab645719225eb7780c21 Mon Sep 17 00:00:00 2001 From: "Bernhard R. Link" Date: Sun, 10 Jun 2012 18:15:17 +0200 Subject: fix 64 bit issues in lisp code some arguments are longs where ints are expected, so explicitly cast them. --- win/lisp/winlisp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win/lisp/winlisp.c b/win/lisp/winlisp.c index 290a457..15f685c 100644 --- a/win/lisp/winlisp.c +++ b/win/lisp/winlisp.c @@ -1004,7 +1004,7 @@ generate_status_line () lisp_int (depth(&u.uz));); lisp_list (lisp_string ("$"); - lisp_int (u.ugold);); + lisp_int ((int)u.ugold);); lisp_list (lisp_string ("HP"); lisp_int (hp);); lisp_list (lisp_string ("HPmax"); @@ -1031,10 +1031,10 @@ generate_status_line () lisp_int (u.ulevel);); #ifdef EXP_ON_BOTL lisp_list (lisp_string ("XP"); - lisp_int (u.uexp);); + lisp_int ((int)u.uexp);); #endif lisp_list (lisp_string ("T"); - lisp_int (moves);); + lisp_int ((int)moves);); if (Confusion) lisp_list (lisp_string ("confusion"); lisp_string ("Conf")); @@ -1932,6 +1932,6 @@ lisp_outrip(window, how) lisp_cmd ("outrip", lisp_int (window); lisp_string (plname); - lisp_int (u.ugold); + lisp_int ((int)u.ugold); lisp_string ("Died while trying to finish nethack-el.")); } debian/patches/0010-Enables-color-HP-monitor-for-textmode-NetHack.patch0000644000000000000000000001441111765144123022626 0ustar From 9a705b20cd95adfe8b570bb8a4f105a2201a9ebf Mon Sep 17 00:00:00 2001 From: Ralph Churchill Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Enables color HP monitor for textmode NetHack. --- dat/opthelp | 3 +++ doc/Guidebook.mn | 4 ++++ doc/Guidebook.tex | 5 +++++ doc/Guidebook.txt | 5 +++++ include/config.h | 3 +++ include/flag.h | 5 +++++ src/botl.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/options.c | 3 +++ 8 files changed, 74 insertions(+) diff --git a/dat/opthelp b/dat/opthelp index 4dade58..2fa5f70 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -71,6 +71,9 @@ Boolean options if TEXTCOLOR was set at compile time: color use different colors for objects on screen [TRUE for micros] hilite_pet display pets in a highlighted manner [FALSE] +Boolean option if HPMON was set at compile time: +hpmon color HP readout depending on how low it is [FALSE] + Boolean option if TIMED_DELAY was set at compile time (tty interface only): timed_delay on unix and VMS, use a timer instead of sending extra screen output when attempting to pause for diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index f67f02f..8ac033d 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1863,6 +1863,10 @@ interesting and/or important information. .lp horsename Name your starting horse (ex. ``horsename:Trigger''). Cannot be set with the `O' command. +.lp hpmon +Colors your HP reading green when you attain <= 2/3 of your total HP, +yellow when you reach <= 1/3 of total, and red when you are at or below +1/10 of your total HP. .lp IBMgraphics Use a predefined selection of IBM extended ASCII characters to display the dungeon/effects/traps instead of having to define a full graphics set diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index f76398f..9dd0be5 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2307,6 +2307,11 @@ might miss some interesting and/or important information. Name your starting horse (ex.\ ``{\tt horsename:Trigger}''). Cannot be set with the `{\tt O}' command. %.lp +\item[\ib{hpmon}] +Colors your HP reading green when you attain <= 2/3 of your total HP, +yellow when you reach <= 1/3 of total, and red when you are at or below +1/10 of your total HP. +%.lp \item[\ib{IBMgraphics}] Use a predefined selection of IBM extended ASCII characters to display the dungeon/effects/traps instead of having to define a full graphics set diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index f0f9f7d..cfc0ed4 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -2398,6 +2398,11 @@ Name your starting horse (ex. ``horsename:Trigger''). Cannot be set with the `O' command. + hpmon + Colors your hitpoint reading green when you attain <= 2/3 of + your total HP, yellow when you reach <= 1/3 of total, and red + when you are at or below 1/10 of your total HP. + IBMgraphics Use a predefined selection of IBM extended ASCII characters to display the dungeon/effects/traps instead of having to define a diff --git a/include/config.h b/include/config.h index e2c1921..5a57195 100644 --- a/include/config.h +++ b/include/config.h @@ -340,6 +340,9 @@ typedef unsigned char uchar; #define EXP_ON_BOTL /* Show experience on bottom line */ #define PARANOID + +#define HPMON /* Color HP monitor */ + /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ /* diff --git a/include/flag.h b/include/flag.h index de149ff..ee8031b 100644 --- a/include/flag.h +++ b/include/flag.h @@ -219,6 +219,11 @@ struct instance_flags { boolean lan_mail; /* mail is initialized */ boolean lan_mail_fetched; /* mail is awaiting display */ #endif + +#if defined(HPMON) && defined(TEXTCOLOR) + boolean use_hpmon; +#endif + /* * Window capability support. */ diff --git a/src/botl.c b/src/botl.c index 6534ad7..70a2d37 100644 --- a/src/botl.c +++ b/src/botl.c @@ -3,6 +3,7 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" +#include "wintty.h" #ifdef OVL0 extern const char *hu_stat[]; /* defined in eat.c */ @@ -248,6 +249,9 @@ bot2() char newbot2[MAXCO]; register char *nb; int hp, hpmax; +#if defined(HPMON) && !defined(LISP_GRAPHICS) + int hpcolor, hpattr; +#endif int cap = near_capacity(); hp = Upolyd ? u.mh : u.uhp; @@ -256,6 +260,15 @@ bot2() if(hp < 0) hp = 0; (void) describe_level(newbot2); Sprintf(nb = eos(newbot2), +#ifdef HPMON + "%c:%-2ld HP:", oc_syms[COIN_CLASS], +#ifndef GOLDOBJ + u.ugold +#else + money_cnt(invent) +#endif + ); +#else /* HPMON */ "%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", oc_syms[COIN_CLASS], #ifndef GOLDOBJ u.ugold, @@ -263,6 +276,39 @@ bot2() money_cnt(invent), #endif hp, hpmax, u.uen, u.uenmax, u.uac); +#endif /* HPMON */ +#ifdef HPMON + curs(WIN_STATUS, 1, 1); + putstr(WIN_STATUS, 0, newbot2); + + Sprintf(nb = eos(newbot2), "%d(%d)", hp, hpmax); +#if defined(TEXTCOLOR) && !defined(LISP_GRAPHICS) + if (iflags.use_color && iflags.use_hpmon) { + curs(WIN_STATUS, 1, 1); + hpattr = ATR_NONE; + if(hp == hpmax){ + hpcolor = NO_COLOR; + } else if(hp > (hpmax*2/3)) { + hpcolor = CLR_GREEN; + } else if(hp <= (hpmax/3)) { + hpcolor = CLR_RED; + if(hp<=(hpmax/10)) + hpattr = ATR_BLINK; + } else { + hpcolor = CLR_YELLOW; + } + if (hpcolor != NO_COLOR) + term_start_color(hpcolor); + if(hpattr!=ATR_NONE)term_start_attr(hpattr); + putstr(WIN_STATUS, hpattr, newbot2); + if(hpattr!=ATR_NONE)term_end_attr(hpattr); + if (hpcolor != NO_COLOR) + term_end_color(); + } +#endif /* TEXTCOLOR */ + Sprintf(nb = eos(newbot2), " Pw:%d(%d) AC:%-2d", + u.uen, u.uenmax, u.uac); +#endif /* HPMON */ if (Upolyd) Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); diff --git a/src/options.c b/src/options.c index dfb8006..3aff6b3 100644 --- a/src/options.c +++ b/src/options.c @@ -86,6 +86,9 @@ static struct Bool_Opt #else {"extmenu", (boolean *)0, FALSE, SET_IN_FILE}, #endif +#if defined(TEXTCOLOR) && defined(HPMON) + { "hpmon", &iflags.use_hpmon, FALSE, SET_IN_GAME}, +#endif #ifdef OPT_DISPMAP {"fast_map", &flags.fast_map, TRUE, SET_IN_GAME}, #else debian/patches/0019-stay-in-array-bounds.patch0000644000000000000000000000151711765144123016225 0ustar From e5fe232d25d77490d2a830cdee89e3d73ac8ba83 Mon Sep 17 00:00:00 2001 From: "Bernhard R. Link" Date: Sun, 10 Jun 2012 17:41:55 +0200 Subject: stay in array bounds Fix code reading a element after an array. As that is undefined behaviour it gets a warning and might lead to later hard to detect misoptimisations by the compiler. --- src/mhitu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mhitu.c b/src/mhitu.c index 7df5b5e..6b10f33 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -233,7 +233,7 @@ boolean message; for(i = 0; i < NATTK; i++) if(mdat->mattk[i].aatyp == AT_ENGL) break; - if (mdat->mattk[i].aatyp != AT_ENGL) + if (i >= NATTK || mdat->mattk[i].aatyp != AT_ENGL) impossible("Swallower has no engulfing attack?"); else { if (is_whirly(mdat)) { debian/patches/0017-Debian-and-Linux-specifics-defined-in-unixconf.h.patch0000644000000000000000000001254711765325675023317 0ustar From f14dd4457436451d4447ed3cce26b55a75d3e183 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Debian (and Linux) specifics defined in unixconf.h. --- include/unixconf.h | 15 +++++++++------ src/mail.c | 5 +++-- util/makedefs.c | 16 ++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) --- a/include/unixconf.h +++ b/include/unixconf.h @@ -19,8 +19,9 @@ */ /* define exactly one of the following four choices */ -/* #define BSD 1 */ /* define for 4.n/Free/Open/Net BSD */ - /* also for relatives like SunOS 4.x, DG/UX, and */ +#if defined(__FreeBSD_kernel__) +#define BSD 1 /* define for 4.n/Free/Open/Net BSD */ +#endif /* also for relatives like SunOS 4.x, DG/UX, and */ /* older versions of Linux */ /* #define ULTRIX */ /* define for Ultrix v3.0 or higher (but not lower) */ /* Use BSD for < v3.0 */ @@ -32,12 +33,14 @@ /* define any of the following that are appropriate */ -#define SVR4 /* use in addition to SYSV for System V Release 4 */ +/* #define SVR4 */ /* use in addition to SYSV for System V Release 4 */ /* including Solaris 2+ */ #define NETWORK /* if running on a networked system */ /* e.g. Suns sharing a playground through NFS */ /* #define SUNOS4 */ /* SunOS 4.x */ -/* #define LINUX */ /* Another Unix clone */ +#ifdef __linux__ +#define LINUX /* Another Unix clone */ +#endif /* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */ /* #define GENIX */ /* Yet Another Unix Clone */ /* #define HISX */ /* Bull Unix for XPS Machines */ @@ -102,7 +105,7 @@ * If you want the static parts of your playground on a read-only file * system, define VAR_PLAYGROUND to be where the variable parts are kept. */ -/* #define VAR_PLAYGROUND "/var/lib/games/nethack" */ +#define VAR_PLAYGROUND "/var/games/nethack" /* @@ -132,7 +135,7 @@ * "extra output" method is used, but not all systems provide access to * a fine-grained timer. */ -/* #define TIMED_DELAY */ /* usleep() */ +#define TIMED_DELAY /* usleep() */ #endif /* @@ -166,12 +169,12 @@ /* #define NO_MAILREADER */ /* have mail daemon just tell player of mail */ -#ifdef MAIL +#ifdef MAIL # if defined(BSD) || defined(ULTRIX) # ifdef AMS #define AMS_MAILBOX "/Mailbox" # else -# if defined(__FreeBSD__) || defined(__OpenBSD__) +# if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) #define DEF_MAILREADER "/usr/bin/mail" # else #define DEF_MAILREADER "/usr/ucb/Mail" @@ -189,7 +192,8 @@ # endif # endif # else -#define DEF_MAILREADER "/bin/mail" +/* Debian mail reader is /usr/bin/mail, not /bin/mail */ +#define DEF_MAILREADER "/usr/bin/mail" # endif #endif --- a/src/mail.c +++ b/src/mail.c @@ -72,10 +72,11 @@ # if !defined(MAILPATH) && defined(AMS) /* Just a placeholder for AMS */ # define MAILPATH "/dev/null" # endif -# if !defined(MAILPATH) && (defined(LINUX) || defined(__osf__)) +# if !defined(MAILPATH) && defined(__osf__) # define MAILPATH "/var/spool/mail/" # endif -# if !defined(MAILPATH) && defined(__FreeBSD__) +/* Debian uses /var/mail, too. */ +# if !defined(MAILPATH) && (defined(__FreeBSD__) || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)) # define MAILPATH "/var/mail/" # endif # if !defined(MAILPATH) && (defined(BSD) || defined(ULTRIX)) --- a/util/makedefs.c +++ b/util/makedefs.c @@ -358,7 +358,7 @@ perror(filename); exit(EXIT_FAILURE); } - Fprintf(ofp,Dont_Edit_Data); + Fprintf(ofp, "%s", Dont_Edit_Data); Sprintf(infile, DATA_IN_TEMPLATE, RUMOR_FILE); Strcat(infile, ".tru"); @@ -557,7 +557,7 @@ exit(EXIT_FAILURE); } Fprintf(ofp,"/*\tSCCS Id: @(#)date.h\t3.4\t2002/02/03 */\n\n"); - Fprintf(ofp,Dont_Edit_Code); + Fprintf(ofp, "%s", Dont_Edit_Code); #ifdef KR1ED (void) time(&clocktim); @@ -1236,7 +1236,7 @@ perror(filename); exit(EXIT_FAILURE); } - Fprintf(ofp,Dont_Edit_Data); + Fprintf(ofp, "%s", Dont_Edit_Data); while (fgets(in_line, sizeof in_line, ifp) != 0) { SpinCursor(3); @@ -1358,7 +1358,7 @@ perror(filename); exit(EXIT_FAILURE); } - Fprintf(ofp,Dont_Edit_Code); + Fprintf(ofp,"%s", Dont_Edit_Code); Fprintf(ofp,"#include \"config.h\"\n"); Fprintf(ofp,"\nconst int monstr[] = {\n"); for (ptr = &mons[0], j = 0; ptr->mlet; ptr++) { @@ -1399,7 +1399,7 @@ exit(EXIT_FAILURE); } Fprintf(ofp,"/*\tSCCS Id: @(#)pm.h\t3.4\t2002/02/03 */\n\n"); - Fprintf(ofp,Dont_Edit_Code); + Fprintf(ofp,"%s", Dont_Edit_Code); Fprintf(ofp,"#ifndef PM_H\n#define PM_H\n"); if (strcmp(mons[0].mname, "playermon") != 0) @@ -1715,7 +1715,7 @@ exit(EXIT_FAILURE); } Fprintf(ofp,"/*\tSCCS Id: @(#)onames.h\t3.4\t2002/02/03 */\n\n"); - Fprintf(ofp,Dont_Edit_Code); + Fprintf(ofp,"%s", Dont_Edit_Code); Fprintf(ofp,"#ifndef ONAMES_H\n#define ONAMES_H\n\n"); for(i = 0; !i || objects[i].oc_class != ILLOBJ_CLASS; i++) { @@ -1870,7 +1870,7 @@ perror(filename); exit(EXIT_FAILURE); } - Fprintf(ofp,Dont_Edit_Code); + Fprintf(ofp,"%s", Dont_Edit_Code); Fprintf(ofp,"#ifdef VISION_TABLES\n"); #ifdef VISION_TABLES H_close_gen(); @@ -1895,7 +1895,7 @@ Unlink(filename); exit(EXIT_FAILURE); } - Fprintf(ofp,Dont_Edit_Code); + Fprintf(ofp,"%s", Dont_Edit_Code); Fprintf(ofp,"#include \"config.h\"\n"); Fprintf(ofp,"#ifdef VISION_TABLES\n"); Fprintf(ofp,"#include \"vis_tab.h\"\n"); debian/patches/0018-lisp-support-in-src-Makefile.patch0000644000000000000000000000437211765144123017623 0ustar From a933713c8f8a28aa2f8b917bb80c43d15eb1ac96 Mon Sep 17 00:00:00 2001 From: "Bernhard R. Link" Date: Sun, 10 Jun 2012 16:37:19 +0200 Subject: lisp support in src/Makefile some left over parts of some older patches belonging to the lisp part. --- sys/unix/Makefile.src | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 29ad99a..0b75660 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -216,6 +216,9 @@ WINBEOBJ = # WINSRC = $(WINTTYSRC) WINOBJ = $(WINTTYOBJ) +# Files for the lisp port +WINLISPSRC = ../win/lisp/winlisp.c tile.c +WINLISPOBJ = winlisp.o tile.o # on some systems the termcap library is in -ltermcap or -lcurses # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead @@ -338,7 +341,7 @@ SYSCSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ GENCSRC = monstr.c vis_tab.c #tile.c # all windowing-system-dependent .c (for dependencies and such) -WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) +WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) $(WINLISPSRC) # all windowing-system-dependent .cpp (for dependencies and such) WINCXXSRC = $(WINQTSRC) $(WINBESRC) @@ -683,6 +686,9 @@ load_img.o: ../win/gem/load_img.c ../include/load_img.h $(CC) $(CFLAGS) -c ../win/gem/load_img.c gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h $(CC) $(CFLAGS) -c ../win/gem/gr_rect.c +winlisp.o: ../win/lisp/winlisp.c $(HACK_H) ../include/winlisp.h \ + ../include/func_tab.h ../include/dlb.h ../include/patchlevel.h + $(CC) $(CFLAGS) -c ../win/lisp/winlisp.c tile.o: tile.c $(HACK_H) qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/func_tab.h \ ../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \ @@ -803,7 +809,8 @@ vision.o: vision.c $(HACK_H) ../include/vis_tab.h weapon.o: weapon.c $(HACK_H) were.o: were.c $(HACK_H) wield.o: wield.c $(HACK_H) -windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h +windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h \ + ../include/winlisp.h wizard.o: wizard.c $(HACK_H) ../include/qtext.h ../include/epri.h worm.o: worm.c $(HACK_H) ../include/lev.h worn.o: worn.c $(HACK_H) debian/patches/series0000644000000000000000000000204011765325735012044 0ustar 0001-Make-sure-the-user-calling-recover-owns-the-file.patch 0002-Change-paths-in-the-default-manpage-to-what-is-used-.patch 0003-Define-_GNU_SOURCE-for-RTLD_NEXT.patch 0004-Add-LISP-based-windowing-system.patch 0005-Simple-mail.patch 0006-Common-config.h-for-all-binary-packages.patch 0007-Be-a-little-bit-more-useful-with-recover-s-error-mes.patch 0008-Use-usr-share-pixmaps-nethack-for-pretty-pictures.patch 0009-Better-way-to-do-it.patch 0010-Enables-color-HP-monitor-for-textmode-NetHack.patch 0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch 0012-Paranoid-hit-asks-you-to-confirm-yes-instead-of-y-wh.patch 0013-93_enh_dump.dpatch-by-Tom-Friedetzky-Jukka-Lahtinen-.patch 0014-94_enh_sortloot.dpatch-by-Jeroen-Demeyer-and-Jukka-L.patch 0015-95_enh_engulf_prayers.dpatch-by-Joshua-Kwan.patch 0016-fix-non-constant-format-strings.patch 0017-Debian-and-Linux-specifics-defined-in-unixconf.h.patch 0018-lisp-support-in-src-Makefile.patch 0019-stay-in-array-bounds.patch 0020-fix-64-bit-issues-in-lisp-code.patch 0021-fix-kfreebsd-ftbfs.patch debian/patches/0014-94_enh_sortloot.dpatch-by-Jeroen-Demeyer-and-Jukka-L.patch0000644000000000000000000004236011765144123023742 0ustar From f268f1f6066c0ec1a78c49be99babbe2ad927f8e Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: =?UTF-8?q?94=5Fenh=5Fsortloot.dpatch=20by=20Jeroen=20Demeyer=20and=20?= =?UTF-8?q?Jukka=20Lahtinen=0ASort=20item=20lists=20alphabetically?= --- dat/opthelp | 5 +++++ doc/Guidebook.mn | 12 ++++++++++ doc/Guidebook.tex | 15 +++++++++++++ doc/Guidebook.txt | 12 ++++++++++ include/config.h | 1 + include/extern.h | 3 +++ include/flag.h | 3 +++ src/end.c | 44 ++++++++++++++++++++++++++++++++++++ src/invent.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/objnam.c | 25 +++++++++++++++++++++ src/options.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++- src/pickup.c | 41 ++++++++++++++++++++++++++++++++++ 12 files changed, 288 insertions(+), 1 deletion(-) diff --git a/dat/opthelp b/dat/opthelp index 4fa8f49..3c9138f 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -132,6 +132,11 @@ runmode controls how often the map window is updated when performing scores the parts of the score list you wish to see when the game ends You choose a combination of top scores, scores around the top scores, and all of your own scores. [!own/3 top/2 around] +sortloot controls the sortloot patch [none]: + full -- All pickup lists of items are sorted by item description + loot -- When inventory letters are shown, has no effect. + Otherwise sorts by description + none -- Works the traditional way, like without the patch suppress_alert disable various version-specific warnings about changes in game play or the user interface, such as notification given for the 'Q' command that quitting is now done via #quit diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 55a9cee..c0bcfb1 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -2111,6 +2111,18 @@ the appearance of the display, not the way the game treats you. Show your approximate accumulated score on bottom line (default off). .lp "silent " Suppress terminal beeps (default on). +.lp sortloot +Controls the behavior of the sortloot patch that sorts pickup lists for +inventory and #loot commands and some others. +The possible values are: +.sd +.si +full - always sort the lists; +loot - only sort the lists that don't use inventory + letters, like with the #loot and pickup commands; +none - show lists the traditional way without sorting. +.ei +.ed .lp sortpack Sort the pack contents by type when displaying inventory (default on). .lp sound diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 69a8594..ddc08db 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2589,6 +2589,21 @@ Show your approximate accumulated score on bottom line (default off). \item[\ib{silent}] Suppress terminal beeps (default on). %.lp +\item[\ib{sortloot}] +Controls the behavior of the sortloot patch that sorts pickup lists for +inventory and \#loot commands and some others. + +The possible values are: +%.sd +%.si +{\tt full} --- always sort the lists;\\ +{\tt loot} --- only sort the lists that don't use inventory + letters, like with the \#loot and pickup commands;\\ +{\tt none} --- show lists the traditional way without sorting. +%.ei +%.ed +%.lp +The default is 'none', the way an unpatched game works. \item[\ib{sortpack}] Sort the pack contents by type when displaying inventory (default on). %.lp diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 17513e6..ba57778 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -2739,6 +2739,18 @@ silent Suppress terminal beeps (default on). + sortloot + Controls the behavior of the sortloot patch that sorts + pickup lists for inventory and #loot commands and some + others. + The possible values are: + + full - always sort the lists + loot - only sort the lists that don't use inventory + letters, like with the #loot and pickup commands + none - show lists the traditional way without sorting + The default is 'none', the way an unpatched game works. + sortpack Sort the pack contents by type when displaying inventory (de- fault on). diff --git a/include/config.h b/include/config.h index 26b68b5..c7a55ee 100644 --- a/include/config.h +++ b/include/config.h @@ -342,6 +342,7 @@ typedef unsigned char uchar; #define PARANOID #define HPMON /* Color HP monitor */ +#define SORTLOOT /* Sort yer loot by alphabetical order, not index */ /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ diff --git a/include/extern.h b/include/extern.h index 2138f41..4c0225a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1378,6 +1378,9 @@ E char *FDECL(doname, (struct obj *)); E boolean FDECL(not_fully_identified, (struct obj *)); E char *FDECL(corpse_xname, (struct obj *,BOOLEAN_P)); E char *FDECL(cxname, (struct obj *)); +#ifdef SORTLOOT +E char *FDECL(cxname2, (struct obj *)); +#endif E char *FDECL(killer_xname, (struct obj *)); E const char *FDECL(singular, (struct obj *,char *(*)(OBJ_P))); E char *FDECL(an, (const char *)); diff --git a/include/flag.h b/include/flag.h index efe778e..78a0c33 100644 --- a/include/flag.h +++ b/include/flag.h @@ -222,6 +222,9 @@ struct instance_flags { boolean lan_mail; /* mail is initialized */ boolean lan_mail_fetched; /* mail is awaiting display */ #endif +#ifdef SORTLOOT + char sortloot; /* sort items to loot alphabetically */ +#endif #ifdef PARANOID boolean paranoid_hit; /* Ask for 'yes' when hitting peacefuls */ #endif diff --git a/src/end.c b/src/end.c index e33bd7f..7a79635 100644 --- a/src/end.c +++ b/src/end.c @@ -1065,6 +1065,11 @@ boolean identified, all_containers, want_dump; /* The original container_contents function */ { register struct obj *box, *obj; +#ifdef SORTLOOT + struct obj **oarray; + int i,j,n; + char *invlet; +#endif /* SORTLOOT */ char buf[BUFSZ]; for (box = list; box; box = box->nobj) { @@ -1073,13 +1078,52 @@ boolean identified, all_containers, want_dump; continue; /* wrong type of container */ } else if (box->cobj) { winid tmpwin = create_nhwindow(NHW_MENU); +#ifdef SORTLOOT + /* count the number of items */ + for (n = 0, obj = box->cobj; obj; obj = obj->nobj) n++; + /* Make a temporary array to store the objects sorted */ + oarray = (struct obj **) alloc(n*sizeof(struct obj*)); + + /* Add objects to the array */ + i = 0; + invlet = flags.inv_order; + nextclass: + for (obj = box->cobj; obj; obj = obj->nobj) { + if (!flags.sortpack || obj->oclass == *invlet) { + if (iflags.sortloot == 'f' + || iflags.sortloot == 'l') { + /* Insert object at correct index */ + for (j = i; j; j--) { + if (strcmpi(cxname2(obj), cxname2(oarray[j-1]))>0 + || (flags.sortpack && + oarray[j-1]->oclass != obj->oclass)) + break; + oarray[j] = oarray[j-1]; + } + oarray[j] = obj; + i++; + } else { + /* Just add it to the array */ + oarray[i++] = obj; + } + } + } /* for loop */ + if (flags.sortpack) { + if (*++invlet) goto nextclass; + } +#endif /* SORTLOOT */ Sprintf(buf, "Contents of %s:", the(xname(box))); putstr(tmpwin, 0, buf); putstr(tmpwin, 0, ""); #ifdef DUMP_LOG if (dump_fp) dump("", buf); #endif +#ifdef SORTLOOT + for (i = 0; i < n; i++) { + obj = oarray[i]; +#else for (obj = box->cobj; obj; obj = obj->nobj) { +#endif if (identified) { makeknown(obj->otyp); obj->known = obj->bknown = diff --git a/src/invent.c b/src/invent.c index 93bbc9b..a35da0a 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1714,6 +1714,10 @@ long* out_cnt; #endif { struct obj *otmp; +#ifdef SORTLOOT + struct obj **oarray; + int i, j; +#endif char ilet, ret; char *invlet = flags.inv_order; int n, classcount; @@ -1793,10 +1797,66 @@ long* out_cnt; return ret; } +#ifdef SORTLOOT + /* count the number of items */ + for (n = 0, otmp = invent; otmp; otmp = otmp->nobj) + if(!lets || !*lets || index(lets, otmp->invlet)) n++; + + /* Make a temporary array to store the objects sorted */ + oarray = (struct obj **)alloc(n*sizeof(struct obj*)); + + /* Add objects to the array */ + i = 0; + for(otmp = invent; otmp; otmp = otmp->nobj) + if(!lets || !*lets || index(lets, otmp->invlet)) { + if (iflags.sortloot == 'f') { + /* Insert object at correct index */ + for (j = i; j; j--) { + if (strcmpi(cxname2(otmp), cxname2(oarray[j-1]))>0) break; + oarray[j] = oarray[j-1]; + } + oarray[j] = otmp; + i++; + } else { + /* Just add it to the array */ + oarray[i++] = otmp; + } + } +#endif /* SORTLOOT */ + start_menu(win); nextclass: classcount = 0; any.a_void = 0; /* set all bits to zero */ +#ifdef SORTLOOT + for(i = 0; i < n; i++) { + otmp = oarray[i]; + ilet = otmp->invlet; + if (!flags.sortpack || otmp->oclass == *invlet) { + if (flags.sortpack && !classcount) { + any.a_void = 0; /* zero */ + add_menu(win, NO_GLYPH, &any, 0, 0, ATR_INVERSE, + let_to_name(*invlet, FALSE), MENU_UNSELECTED); +#ifdef DUMP_LOG + if (want_dump) + dump(" ", let_to_name(*invlet, FALSE)); +#endif + classcount++; + } + any.a_char = ilet; + add_menu(win, obj_to_glyph(otmp), + &any, ilet, 0, ATR_NONE, doname(otmp), + MENU_UNSELECTED); +#ifdef DUMP_LOG + if (want_dump) { + char letbuf[7]; + sprintf(letbuf, " %c - ", ilet); + dump(letbuf, doname(otmp)); + } +#endif + } + } +#else /* SORTLOOT */ for(otmp = invent; otmp; otmp = otmp->nobj) { ilet = otmp->invlet; if(!lets || !*lets || index(lets, ilet)) { @@ -1825,6 +1885,7 @@ nextclass: } } } +#endif /* SORTLOOT */ if (flags.sortpack) { if (*++invlet) goto nextclass; #ifdef WIZARD @@ -1834,6 +1895,9 @@ nextclass: } #endif } +#ifdef SORTLOOT + free(oarray); +#endif end_menu(win, (char *) 0); n = select_menu(win, want_reply ? PICK_ONE : PICK_NONE, &selected); diff --git a/src/objnam.c b/src/objnam.c index 2130432..94b5040 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -15,6 +15,9 @@ static boolean FDECL(wishymatch, (const char *,const char *,BOOLEAN_P)); #endif static char *NDECL(nextobuf); static void FDECL(add_erosion_words, (struct obj *, char *)); +#ifdef SORTLOOT +char * FDECL(xname2, (struct obj *, boolean)); +#endif struct Jitem { int item; @@ -233,6 +236,15 @@ boolean juice; /* whether or not to append " juice" to the name */ char * xname(obj) register struct obj *obj; +#ifdef SORTLOOT +{ + return xname2(obj, FALSE); +} +char * +xname2(obj, ignore_oquan) +register struct obj *obj; +boolean ignore_oquan; +#endif { register char *buf; register int typ = obj->otyp; @@ -469,6 +481,9 @@ register struct obj *obj; default: Sprintf(buf,"glorkum %d %d %d", obj->oclass, typ, obj->spe); } +#ifdef SORTLOOT + if (!ignore_oquan) +#endif if (obj->quan != 1L) Strcpy(buf, makeplural(buf)); if (obj->onamelth && obj->dknown) { @@ -853,6 +868,16 @@ struct obj *obj; return corpse_xname(obj, FALSE); return xname(obj); } +#ifdef SORTLOOT +char * +cxname2(obj) +struct obj *obj; +{ + if (obj->otyp == CORPSE) + return corpse_xname(obj, TRUE); + return xname2(obj, TRUE); +} +#endif /* SORTLOOT */ /* treat an object as fully ID'd when it might be used as reason for death */ char * diff --git a/src/options.c b/src/options.c index b4ca5ca..e06d01f 100644 --- a/src/options.c +++ b/src/options.c @@ -330,6 +330,9 @@ static struct Comp_Opt { "scroll_amount", "amount to scroll map when scroll_margin is reached", 20, DISP_IN_GAME }, /*WC*/ { "scroll_margin", "scroll map when this far from the edge", 20, DISP_IN_GAME }, /*WC*/ +#ifdef SORTLOOT + { "sortloot", "sort object selection lists by description", 4, SET_IN_GAME }, +#endif #ifdef MSDOS { "soundcard", "type of sound card to use", 20, SET_IN_FILE }, #endif @@ -562,6 +565,10 @@ initoptions() flags.pickup_types[0] = '\0'; flags.pickup_burden = MOD_ENCUMBER; +#ifdef SORTLOOT + iflags.sortloot = 'n'; +#endif + for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++) flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO; switch_graphics(ASCII_GRAPHICS); /* set default characters */ @@ -2002,6 +2009,24 @@ goodfruit: return; } +#ifdef SORTLOOT + fullname = "sortloot"; + if (match_optname(opts, fullname, 4, TRUE)) { + op = string_for_env_opt(fullname, opts, FALSE); + if (op) { + switch (tolower(*op)) { + case 'n': + case 'l': + case 'f': iflags.sortloot = tolower(*op); + break; + default: badoption(opts); + return; + } + } + return; + } +#endif /* SORTLOOT */ + fullname = "suppress_alert"; if (match_optname(opts, fullname, 4, TRUE)) { op = string_for_opt(opts, negated); @@ -2426,6 +2451,12 @@ static NEARDATA const char *runmodes[] = { "teleport", "run", "walk", "crawl" }; +#ifdef SORTLOOT +static NEARDATA const char *sortltype[] = { + "none", "loot", "full" +}; +#endif + /* * Convert the given string of object classes to a string of default object * symbols. @@ -2703,7 +2734,7 @@ boolean setinitial,setfromfile; boolean retval = FALSE; /* Special handling of menustyle, pickup_burden, pickup_types, - * disclose, runmode, msg_window, menu_headings, and number_pad options. + * disclose, runmode, msg_window, menu_headings, number_pad and sortloot #ifdef AUTOPICKUP_EXCEPTIONS * Also takes care of interactive autopickup_exception_handling changes. #endif @@ -2858,6 +2889,26 @@ boolean setinitial,setfromfile; } destroy_nhwindow(tmpwin); retval = TRUE; +#ifdef SORTLOOT + } else if (!strcmp("sortloot", optname)) { + const char *sortl_name; + menu_item *sortl_pick = (menu_item *)0; + tmpwin = create_nhwindow(NHW_MENU); + start_menu(tmpwin); + for (i = 0; i < SIZE(sortltype); i++) { + sortl_name = sortltype[i]; + any.a_char = *sortl_name; + add_menu(tmpwin, NO_GLYPH, &any, *sortl_name, 0, + ATR_NONE, sortl_name, MENU_UNSELECTED); + } + end_menu(tmpwin, "Select loot sorting type:"); + if (select_menu(tmpwin, PICK_ONE, &sortl_pick) > 0) { + iflags.sortloot = sortl_pick->item.a_char; + free((genericptr_t)sortl_pick); + } + destroy_nhwindow(tmpwin); + retval = TRUE; +#endif } #endif else if (!strcmp("align_message", optname) || @@ -3239,6 +3290,17 @@ char *buf; if (iflags.wc_scroll_margin) Sprintf(buf, "%d",iflags.wc_scroll_margin); else Strcpy(buf, defopt); } +#ifdef SORTLOOT + else if (!strcmp(optname, "sortloot")) { + char *sortname = (char *)NULL; + for (i=0; i < SIZE(sortltype) && sortname==(char *)NULL; i++) { + if (iflags.sortloot == sortltype[i][0]) + sortname = (char *)sortltype[i]; + } + if (sortname != (char *)NULL) + Sprintf(buf, "%s", sortname); + } +#endif else if (!strcmp(optname, "player_selection")) Sprintf(buf, "%s", iflags.wc_player_selection ? "prompts" : "dialog"); #ifdef MSDOS diff --git a/src/pickup.c b/src/pickup.c index 07be607..8dea122 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -690,9 +690,15 @@ menu_item **pick_list; /* return list of items picked */ int how; /* type of query */ boolean FDECL((*allow), (OBJ_P));/* allow function */ { +#ifdef SORTLOOT + int i, j; +#endif int n; winid win; struct obj *curr, *last; +#ifdef SORTLOOT + struct obj **oarray; +#endif char *pack; anything any; boolean printed_type_name; @@ -717,6 +723,33 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */ return 1; } +#ifdef SORTLOOT + /* Make a temporary array to store the objects sorted */ + oarray = (struct obj **)alloc(n*sizeof(struct obj*)); + + /* Add objects to the array */ + i = 0; + for (curr = olist; curr; curr = FOLLOW(curr, qflags)) { + if ((*allow)(curr)) { + if (iflags.sortloot == 'f' || + (iflags.sortloot == 'l' && !(qflags & USE_INVLET))) + { + /* Insert object at correct index */ + for (j = i; j; j--) + { + if (strcmpi(cxname2(curr), cxname2(oarray[j-1]))>0) break; + oarray[j] = oarray[j-1]; + } + oarray[j] = curr; + i++; + } else { + /* Just add it to the array */ + oarray[i++] = curr; + } + } + } +#endif /* SORTLOOT */ + win = create_nhwindow(NHW_MENU); start_menu(win); any.a_obj = (struct obj *) 0; @@ -730,7 +763,12 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */ pack = flags.inv_order; do { printed_type_name = FALSE; +#ifdef SORTLOOT + for (i = 0; i < n; i++) { + curr = oarray[i]; +#else /* SORTLOOT */ for (curr = olist; curr; curr = FOLLOW(curr, qflags)) { +#endif /* SORTLOOT */ if ((qflags & FEEL_COCKATRICE) && curr->otyp == CORPSE && will_feel_cockatrice(curr, FALSE)) { destroy_nhwindow(win); /* stop the menu and revert */ @@ -758,6 +796,9 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */ pack++; } while (qflags & INVORDER_SORT && *pack); +#ifdef SORTLOOT + free(oarray); +#endif end_menu(win, qstr); n = select_menu(win, how, pick_list); destroy_nhwindow(win); debian/patches/0002-Change-paths-in-the-default-manpage-to-what-is-used-.patch0000644000000000000000000000464111765144123023747 0ustar From 2fb7fc3c993424e594cf7753777e94d615f72901 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Change paths in the default manpage to what is used in Debian + other stuff. --- doc/nethack.6 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/nethack.6 b/doc/nethack.6 index 7bc2f94..63ebf40 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -108,9 +108,10 @@ Because the option list can be very long (particularly when specifying graphics characters), options may also be included in a configuration file. The default is located in your home directory and -named .nethackrc on Unix systems. On other systems, the default may be -different, usually NetHack.cnf. On DOS or Windows, the name is -defaults.nh, while on the Macintosh or BeOS, it is NetHack Defaults. +named .nethackrc on Unix systems. +On Debian systems, use .nethackrc.gnome for the Gnome windowing port, +use .nethackrc.x11 for the X11 windowing port, and use .nethackrc.qt for the +QT windowing port. You can use .nethackrc.tty for the non-graphical version. The configuration file's location may be specified by setting NETHACKOPTIONS to a string consisting of an @ character followed by the filename. .PP @@ -197,7 +198,7 @@ option, which must be the first argument if it appears, supplies a directory which is to serve as the playground. It overrides the value from NETHACKDIR, HACKDIR, or the directory specified by the game administrator during compilation -(usually /usr/games/lib/nethackdir). +(usually /usr/lib/games/nethack). This option is usually only useful to the game administrator. The playground must contain several auxiliary files such as help files, the list of top scorers, and a subdirectory @@ -222,7 +223,7 @@ development by the Usenet. Andries Brouwer has made this request for the distinction, as he may eventually release a new version of his own. .SH FILES .PP -All files are in the playground, normally /usr/games/lib/nethackdir. +All files are in the playground, normally /usr/lib/games/nethack. If DLB was defined during the compile, the data files and special levels will be inside a larger file, normally nhdat, instead of being separate files. @@ -283,7 +284,7 @@ MAIL Mailbox file. .br MAILREADER Replacement for default reader .br - (probably /bin/mail or /usr/ucb/mail). + (probably /usr/bin/mail). .br NETHACKDIR Playground. .br debian/patches/0003-Define-_GNU_SOURCE-for-RTLD_NEXT.patch0000644000000000000000000000102411765144123017444 0ustar From 66de1ffa3817ecc98617671b829f031c83bf740b Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Define _GNU_SOURCE for RTLD_NEXT. --- sys/unix/unixres.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/unix/unixres.c b/sys/unix/unixres.c index 3e7f989..a6ac959 100644 --- a/sys/unix/unixres.c +++ b/sys/unix/unixres.c @@ -21,6 +21,7 @@ # if defined(LINUX) /* requires dynamic linking with libc */ +#define _GNU_SOURCE #include static int debian/patches/0005-Simple-mail.patch0000644000000000000000000001262111765144123014377 0ustar From c3567da0cb29043180b24543f883454312c8f17f Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Simple mail --- include/decl.h | 4 +++ include/flag.h | 3 ++ include/unixconf.h | 1 - src/mail.c | 96 ++++++++++++++++++++++++++++++++++++++++++++------- sys/unix/unixmain.c | 10 +++++- 5 files changed, 99 insertions(+), 15 deletions(-) diff --git a/include/decl.h b/include/decl.h index 76f9533..ab650d3 100644 --- a/include/decl.h +++ b/include/decl.h @@ -385,6 +385,10 @@ struct autopickup_exception { }; #endif /* AUTOPICKUP_EXCEPTIONS */ +#ifdef SIMPLE_MAIL +E int mailckfreq; +#endif + #undef E #endif /* DECL_H */ diff --git a/include/flag.h b/include/flag.h index 1807a0b..de149ff 100644 --- a/include/flag.h +++ b/include/flag.h @@ -175,6 +175,9 @@ struct instance_flags { uchar bouldersym; /* symbol for boulder display */ boolean travel1; /* first travel step */ coord travelcc; /* coordinates for travel_cache */ +#ifdef SIMPLE_MAIL + boolean simplemail; /* simple mail format $NAME:$MESSAGE */ +#endif #ifdef WIZARD boolean sanity_check; /* run sanity checks */ boolean mon_polycontrol; /* debug: control monster polymorphs */ diff --git a/include/unixconf.h b/include/unixconf.h index fe1b006..414938a 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -193,7 +193,6 @@ # endif #endif -#define MAILCKFREQ 50 #endif /* MAIL */ diff --git a/src/mail.c b/src/mail.c index 99d7637..9b1e4f6 100644 --- a/src/mail.c +++ b/src/mail.c @@ -5,6 +5,8 @@ #include "hack.h" #ifdef MAIL +#include +#include #include "mail.h" /* @@ -36,6 +38,8 @@ STATIC_DCL boolean FDECL(md_stop,(coord *, coord *)); STATIC_DCL boolean FDECL(md_rush,(struct monst *,int,int)); STATIC_DCL void FDECL(newmail, (struct mail_info *)); +int mailckfreq = 0; + extern char *viz_rmin, *viz_rmax; /* line-of-sight limits (vision.c) */ #ifdef OVL0 @@ -464,11 +468,15 @@ struct obj *otmp; void ckmailstatus() { +#ifdef SIMPLE_MAIL + if (mailckfreq == 0) + mailckfreq = (iflags.simplemail ? 5 : 10); +#else + mailckfreq = 10; +#endif + if(!mailbox || u.uswallow || !flags.biff -# ifdef MAILCKFREQ - || moves < laststattime + MAILCKFREQ -# endif - ) + || moves < laststattime + mailckfreq) return; laststattime = moves; @@ -501,9 +509,68 @@ void readmail(otmp) struct obj *otmp; { -# ifdef DEF_MAILREADER /* This implies that UNIX is defined */ +#ifdef DEF_MAILREADER register const char *mr = 0; +#endif /* DEF_MAILREADER */ +#ifdef SIMPLE_MAIL + if (iflags.simplemail) + { + FILE* mb = fopen(mailbox, "r"); + char curline[102], *msg; + boolean seen_one_already = FALSE; + struct flock fl = { 0 }; + + fl.l_type = F_RDLCK; + fl.l_whence = SEEK_SET; + fl.l_start = 0; + fl.l_len = 0; + + if (!mb) + goto bail; + + /* Allow this call to block. */ + if (fcntl (fileno (mb), F_SETLKW, &fl) == -1) + goto bail; + + errno = 0; + + while (fgets(curline, 102, mb) != NULL) + { + fl.l_type = F_UNLCK; + fcntl (fileno(mb), F_UNLCK, &fl); + + pline("There is a%s message on this scroll.", + seen_one_already ? "nother" : ""); + + msg = strchr(curline, ':'); + + if (!msg) + goto bail; + + *msg = '\0'; + msg++; + + pline ("This message is from '%s'.", curline); + + msg[strlen(msg) - 1] = '\0'; /* kill newline */ + pline ("It reads: \"%s\".", msg); + + seen_one_already = TRUE; + errno = 0; + + fl.l_type = F_RDLCK; + fcntl(fileno(mb), F_SETLKW, &fl); + } + fl.l_type = F_UNLCK; + fcntl(fileno(mb), F_UNLCK, &fl); + + fclose(mb); + unlink(mailbox); + return; + } +# endif /* SIMPLE_MAIL */ +# ifdef DEF_MAILREADER /* This implies that UNIX is defined */ display_nhwindow(WIN_MESSAGE, FALSE); if(!(mr = nh_getenv("MAILREADER"))) mr = DEF_MAILREADER; @@ -512,15 +579,21 @@ struct obj *otmp; (void) execl(mr, mr, (char *)0); terminate(EXIT_FAILURE); } -# else -# ifndef AMS /* AMS mailboxes are directories */ +# else +# ifndef AMS /* AMS mailboxes are directories */ display_file(mailbox, TRUE); -# endif /* AMS */ -# endif /* DEF_MAILREADER */ +# endif /* AMS */ +# endif /* DEF_MAILREADER */ /* get new stat; not entirely correct: there is a small time window where we do not see new mail */ getmailstatus(); + return; + +#ifdef SIMPLE_MAIL +bail: + pline("It appears to be all gibberish."); /* bail out _professionally_ */ +#endif } # endif /* UNIX */ @@ -587,10 +660,7 @@ ckmailstatus() static int laststattime = 0; if(u.uswallow || !flags.biff -# ifdef MAILCKFREQ - || moves < laststattime + MAILCKFREQ -# endif - ) + || moves < laststattime + mailckfreq) return; laststattime = moves; diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index a13514f..f88c2e1 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -54,7 +54,9 @@ char *argv[]; register char *dir; #endif boolean exact_username; - +#ifdef SIMPLE_MAIL + char* e_simple = NULL; +#endif #if defined(__APPLE__) /* special hack to change working directory to a resource fork when running from finder --sam */ @@ -84,6 +86,12 @@ char *argv[]; } #endif +#ifdef SIMPLE_MAIL + /* figure this out early */ + e_simple = nh_getenv("SIMPLEMAIL"); + iflags.simplemail = (e_simple ? 1 : 0); +#endif + hname = argv[0]; hackpid = getpid(); (void) umask(0777 & ~FCMASK); debian/patches/0009-Better-way-to-do-it.patch0000644000000000000000000000156011765144123015707 0ustar From 49e68ac683cbe6ab2d2fa4db925938860a9b2a27 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Better way to do it. --- src/windows.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/windows.c b/src/windows.c index d65710c..8953269 100644 --- a/src/windows.c +++ b/src/windows.c @@ -103,10 +103,16 @@ void choose_windows(s) const char *s; { + char *ow; const char *wt; register int i; + + if (!strcmp(s, DEFAULT_WINDOW_SYS) && (ow = getenv("OVERRIDEWIN"))) + wt = ow; + else + wt = s; for(i=0; winchoices[i].procs; i++) - if (!strcmpi(s, winchoices[i].procs->name)) { + if (!strcmpi(wt, winchoices[i].procs->name)) { windowprocs = *winchoices[i].procs; if (winchoices[i].ini_routine) (*winchoices[i].ini_routine)(); return; debian/patches/0012-Paranoid-hit-asks-you-to-confirm-yes-instead-of-y-wh.patch0000644000000000000000000001146711765144123024105 0ustar From 483e822617cd94a508038fab69853b26014cf67e Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Paranoid hit asks you to confirm 'yes' instead of 'y' when hitting peacefuls --- dat/opthelp | 3 +++ doc/Guidebook.mn | 3 +++ doc/Guidebook.tex | 4 ++++ doc/Guidebook.txt | 4 ++++ include/flag.h | 3 +++ src/options.c | 3 +++ src/uhitm.c | 18 ++++++++++++++++++ 7 files changed, 38 insertions(+) diff --git a/dat/opthelp b/dat/opthelp index a2d624a..eefd333 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -61,6 +61,9 @@ news print any news from game administrator on startup [TRUE] Boolean option if MFLOPPY was set at compile time: checkspace check free disk space before writing files to disk [TRUE] +Boolean option if PARANOID was set at compile time: +paranoid_quit ask for explicit 'yes' when quitting [FALSE] + Boolean option if EXP_ON_BOTL was set at compile time: showexp display your accumulated experience points [FALSE] diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 8ac033d..a0edc2e 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -2031,6 +2031,9 @@ Specify the order to list object types in (default ``")[%?+!=/(*`0_''). The value of this option should be a string containing the symbols for the various object types. Any omitted types are filled in at the end from the previous order. +.lp paranoid_hit +If true, asks you to type the word ``yes'' when hitting any peaceful +monster, not just the letter ``y''. .lp perm_invent If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 9dd0be5..55a85ec 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2491,6 +2491,10 @@ Specify the order to list object types in (default containing the symbols for the various object types. Any omitted types are filled in at the end from the previous order. %.lp +\item[\ib{paranoid\_hit}] +If true, asks you to type the word ``yes'' when hitting any peaceful +monster, not just the letter ``y''. +%.lp \item[\ib{perm\_invent}] If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index cfc0ed4..82a8eeb 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -2612,6 +2612,10 @@ Any omitted types are filled in at the end from the previous order. + paranoid_hit + If true, asks you to type the word ``yes'' when hitting any + peaceful monster, not just the letter ``y''. + perm_invent If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that im- diff --git a/include/flag.h b/include/flag.h index cf2958c..efe778e 100644 --- a/include/flag.h +++ b/include/flag.h @@ -222,6 +222,9 @@ struct instance_flags { boolean lan_mail; /* mail is initialized */ boolean lan_mail_fetched; /* mail is awaiting display */ #endif +#ifdef PARANOID + boolean paranoid_hit; /* Ask for 'yes' when hitting peacefuls */ +#endif #if defined(HPMON) && defined(TEXTCOLOR) boolean use_hpmon; diff --git a/src/options.c b/src/options.c index 0e253b4..e767a83 100644 --- a/src/options.c +++ b/src/options.c @@ -155,6 +155,9 @@ static struct Bool_Opt #else {"page_wait", (boolean *)0, FALSE, SET_IN_FILE}, #endif +#ifdef PARANOID + {"paranoid_hit", &iflags.paranoid_hit, FALSE, SET_IN_GAME}, +#endif {"perm_invent", &flags.perm_invent, FALSE, SET_IN_GAME}, {"popup_dialog", &iflags.wc_popup_dialog, FALSE, SET_IN_GAME}, /*WC*/ {"prayconfirm", &flags.prayconfirm, TRUE, SET_IN_GAME}, diff --git a/src/uhitm.c b/src/uhitm.c index 3dd028a..4a980d6 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -99,6 +99,9 @@ register struct monst *mtmp; struct obj *wep; /* uwep for attack(), null for kick_monster() */ { char qbuf[QBUFSZ]; +#ifdef PARANOID + char buf[BUFSZ]; +#endif /* if you're close enough to attack, alert any waiting monster */ mtmp->mstrategy &= ~STRAT_WAITMASK; @@ -199,11 +202,26 @@ struct obj *wep; /* uwep for attack(), null for kick_monster() */ return(FALSE); } if (canspotmon(mtmp)) { +#ifdef PARANOID + Sprintf(qbuf, "Really attack %s? [no/yes]", + mon_nam(mtmp)); + if (iflags.paranoid_hit) { + getlin (qbuf, buf); + (void) lcase (buf); + if (strcmp (buf, "yes")) { + flags.move = 0; + return(TRUE); + } + } else { +#endif Sprintf(qbuf, "Really attack %s?", mon_nam(mtmp)); if (yn(qbuf) != 'y') { flags.move = 0; return(TRUE); } +#ifdef PARANOID + } +#endif } } debian/patches/0016-fix-non-constant-format-strings.patch0000644000000000000000000011760711765144123020424 0ustar From 01b718a7e0faa11ba36313b661e38e345f49231d Mon Sep 17 00:00:00 2001 From: "Bernhard R. Link" Date: Sun, 10 Jun 2012 14:28:44 +0200 Subject: fix non-constant format strings With the default dpkg-buildflags, gcc reports format strings it cannot check as errors. This patch avoids all cases where gcc complains. --- include/extern.h | 1 + src/apply.c | 58 +++++++++++++++++++++++++++--------------------------- src/artifact.c | 2 +- src/botl.c | 4 ++-- src/cmd.c | 8 ++++---- src/detect.c | 4 ++-- src/dig.c | 2 +- src/do.c | 10 +++++----- src/dothrow.c | 2 +- src/dungeon.c | 2 +- src/eat.c | 6 +++--- src/engrave.c | 8 ++++---- src/hack.c | 6 +++--- src/invent.c | 12 +++++------ src/lock.c | 2 +- src/mail.c | 2 +- src/makemon.c | 2 +- src/mcastu.c | 2 +- src/mhitu.c | 8 ++++---- src/mon.c | 2 +- src/mthrowu.c | 2 +- src/muse.c | 4 ++-- src/pline.c | 6 ++++++ src/polyself.c | 4 ++-- src/potion.c | 6 +++--- src/pray.c | 2 +- src/priest.c | 6 +++--- src/questpgr.c | 2 +- src/read.c | 18 ++++++++--------- src/region.c | 4 ++-- src/restore.c | 2 +- src/rumors.c | 4 ++-- src/shk.c | 6 +++--- src/sounds.c | 18 ++++++++--------- src/spell.c | 2 +- src/steed.c | 2 +- src/teleport.c | 12 +++++------ src/timeout.c | 8 ++++---- src/trap.c | 4 ++-- src/uhitm.c | 2 +- src/zap.c | 24 +++++++++++----------- 41 files changed, 144 insertions(+), 137 deletions(-) diff --git a/include/extern.h b/include/extern.h index 4c0225a..3e986b3 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1525,6 +1525,7 @@ E boolean FDECL(is_autopickup_exception, (struct obj *, BOOLEAN_P)); /* ### pline.c ### */ E void VDECL(pline, (const char *,...)) PRINTF_F(1,2); +E void FDECL(plines, (const char *)); E void VDECL(Norep, (const char *,...)) PRINTF_F(1,2); E void NDECL(free_youbuf); E void VDECL(You, (const char *,...)) PRINTF_F(1,2); diff --git a/src/apply.c b/src/apply.c index f45e196..25f5b40 100644 --- a/src/apply.c +++ b/src/apply.c @@ -62,7 +62,7 @@ use_camera(obj) if(!getdir((char *)0)) return(0); if (obj->spe <= 0) { - pline(nothing_happens); + plines(nothing_happens); return (1); } consume_obj_charge(obj, TRUE); @@ -802,7 +802,7 @@ struct obj **optr; if (!obj->cursed) (void) openit(); else - pline(nothing_happens); + plines(nothing_happens); } else if (obj->cursed) { coord mm; @@ -834,7 +834,7 @@ struct obj **optr; } res += openit(); switch (res) { - case 0: pline(nothing_happens); break; + case 0: plines(nothing_happens); break; case 1: pline("%s opens...", Something); learno = TRUE; break; default: pline("Things open around you..."); @@ -846,7 +846,7 @@ struct obj **optr; amii_speaker( obj, "AeFeaeFeAefegw", AMII_OKAY_VOLUME ); #endif if (findit() != 0) learno = TRUE; - else pline(nothing_happens); + else plines(nothing_happens); } } /* charged BofO */ @@ -1192,12 +1192,12 @@ dorub() update_inventory(); } else if (rn2(2) && !Blind) You("see a puff of smoke."); - else pline(nothing_happens); + else plines(nothing_happens); } else if (obj->otyp == BRASS_LANTERN) { /* message from Adventure */ pline("Rubbing the electric lamp is not particularly rewarding."); pline("Anyway, nothing exciting happens."); - } else pline(nothing_happens); + } else plines(nothing_happens); return 1; } @@ -1510,7 +1510,7 @@ struct obj *obj; } if (trouble_count == 0) { - pline(nothing_happens); + plines(nothing_happens); return; } else if (trouble_count > 1) { /* shuffle */ int i, j, k; @@ -1888,7 +1888,7 @@ struct obj *tstone; } if (Blind) { - pline(scritch); + plines(scritch); return; } else if (Hallucination) { pline("Oh wow, man: Fractals!"); @@ -1966,7 +1966,7 @@ struct obj *tstone; else if (streak_color) pline("You see %s streaks on the %s.", streak_color, stonebuf); else - pline(scritch); + plines(scritch); return; } @@ -2172,7 +2172,7 @@ struct obj *obj; You("wrap your bullwhip around %s on the %s.", an(singular(otmp, xname)), surface(u.ux, u.uy)); if (rnl(6) || pickup_object(otmp, 1L, TRUE) < 1) - pline(msg_slipsfree); + plines(msg_slipsfree); return 1; } } @@ -2213,7 +2213,7 @@ struct obj *obj; wrapped_what = strcpy(buf, mon_nam(mtmp)); } else if (proficient) { if (attack(mtmp)) return 1; - else pline(msg_snap); + else plines(msg_snap); } } if (!wrapped_what) { @@ -2235,10 +2235,10 @@ struct obj *obj; vision_full_recalc = 1; } } else { - pline(msg_slipsfree); + plines(msg_slipsfree); } if (mtmp) wakeup(mtmp); - } else pline(msg_snap); + } else plines(msg_snap); } else if (mtmp) { if (!canspotmon(mtmp) && @@ -2330,7 +2330,7 @@ struct obj *obj; break; } } else { - pline(msg_slipsfree); + plines(msg_slipsfree); } wakeup(mtmp); } else { @@ -2340,7 +2340,7 @@ struct obj *obj; else You("flick your bullwhip towards %s.", mon_nam(mtmp)); if (proficient) { if (attack(mtmp)) return 1; - else pline(msg_snap); + else plines(msg_snap); } } @@ -2349,7 +2349,7 @@ struct obj *obj; You("snap your whip through thin air."); } else { - pline(msg_snap); + plines(msg_snap); } return 1; @@ -2374,7 +2374,7 @@ use_pole (obj) /* Are you allowed to use the pole? */ if (u.uswallow) { - pline(not_enough_room); + plines(not_enough_room); return (0); } if (obj != uwep) { @@ -2384,7 +2384,7 @@ use_pole (obj) /* assert(obj == uwep); */ /* Prompt for a location */ - pline(where_to_hit); + plines(where_to_hit); cc.x = u.ux; cc.y = u.uy; if (getpos(&cc, TRUE, "the spot to hit") < 0) @@ -2404,10 +2404,10 @@ use_pole (obj) } else if (!cansee(cc.x, cc.y) && ((mtmp = m_at(cc.x, cc.y)) == (struct monst *)0 || !canseemon(mtmp))) { - You(cant_see_spot); + You("%s", cant_see_spot); return (res); } else if (!couldsee(cc.x, cc.y)) { /* Eyes of the Overworld */ - You(cant_reach); + You("%s", cant_reach); return res; } @@ -2426,7 +2426,7 @@ use_pole (obj) u.uconduct.weaphit++; } else /* Now you know that nothing is there... */ - pline(nothing_happens); + plines(nothing_happens); return (1); } @@ -2480,7 +2480,7 @@ use_grapple (obj) /* Are you allowed to use the hook? */ if (u.uswallow) { - pline(not_enough_room); + plines(not_enough_room); return (0); } if (obj != uwep) { @@ -2490,7 +2490,7 @@ use_grapple (obj) /* assert(obj == uwep); */ /* Prompt for a location */ - pline(where_to_hit); + plines(where_to_hit); cc.x = u.ux; cc.y = u.uy; if (getpos(&cc, TRUE, "the spot to hit") < 0) @@ -2505,10 +2505,10 @@ use_grapple (obj) pline("Too far!"); return (res); } else if (!cansee(cc.x, cc.y)) { - You(cant_see_spot); + You("%s", cant_see_spot); return (res); } else if (!couldsee(cc.x, cc.y)) { /* Eyes of the Overworld */ - You(cant_reach); + You("%s", cant_reach); return res; } @@ -2588,7 +2588,7 @@ use_grapple (obj) } break; } - pline(nothing_happens); + plines(nothing_happens); return (1); } @@ -2638,7 +2638,7 @@ do_break_wand(obj) setnotworn(obj); /* so we need to do this ourselves */ if (obj->spe <= 0) { - pline(nothing_else_happens); + plines(nothing_else_happens); goto discard_broken_wand; } obj->ox = u.ux; @@ -2654,7 +2654,7 @@ do_break_wand(obj) case WAN_ENLIGHTENMENT: case WAN_OPENING: case WAN_SECRET_DOOR_DETECTION: - pline(nothing_else_happens); + plines(nothing_else_happens); goto discard_broken_wand; case WAN_DEATH: case WAN_LIGHTNING: @@ -2989,7 +2989,7 @@ doapply() (const char *)0); makeknown(HORN_OF_PLENTY); } else - pline(nothing_happens); + plines(nothing_happens); break; case LAND_MINE: case BEARTRAP: diff --git a/src/artifact.c b/src/artifact.c index ef27bd5..8336d20 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1191,7 +1191,7 @@ arti_invoke(obj) if(obj->otyp == CRYSTAL_BALL) use_crystal_ball(obj); else - pline(nothing_happens); + plines(nothing_happens); return 1; } diff --git a/src/botl.c b/src/botl.c index 7defa38..dea4361 100644 --- a/src/botl.c +++ b/src/botl.c @@ -195,9 +195,9 @@ bot1() mbot[k] += 'A' - 'a'; k++; } - Sprintf(nb = eos(nb), mbot); + Sprintf(nb = eos(nb), "%s", mbot); } else - Sprintf(nb = eos(nb), rank()); + Sprintf(nb = eos(nb), "%s", rank()); Sprintf(nb = eos(nb)," "); i = mrank_sz + 15; diff --git a/src/cmd.c b/src/cmd.c index c85d851..22487f7 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -602,7 +602,7 @@ wiz_level_change() else ret = sscanf(buf, "%d", &newlevel); if (ret != 1) { - pline(Never_mind); + plines(Never_mind); return 0; } if (newlevel == u.ulevel) { @@ -2447,7 +2447,7 @@ coord *cc; { xchar new_x, new_y; if (!getdir(prompt)) { - pline(Never_mind); + plines(Never_mind); return 0; } new_x = x + u.dx; @@ -2456,7 +2456,7 @@ coord *cc; cc->x = new_x; cc->y = new_y; } else { - if (emsg) pline(emsg); + if (emsg) plines(emsg); return 0; } return 1; @@ -2727,7 +2727,7 @@ parse() if (multi > 9) { clear_nhwindow(WIN_MESSAGE); Sprintf(in_line, "Count: %d", multi); - pline(in_line); + plines(in_line); mark_synch(); } last_multi = multi; diff --git a/src/detect.c b/src/detect.c index 5da025f..6f5ca5e 100644 --- a/src/detect.c +++ b/src/detect.c @@ -808,7 +808,7 @@ struct obj *obj; case 3 : if (!resists_blnd(&youmonst)) { pline("%s your vision!", Tobjnam(obj, "damage")); make_blinded(Blinded + rnd(100),FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } else { pline("%s your vision.", Tobjnam(obj, "assault")); You("are unaffected!"); @@ -857,7 +857,7 @@ struct obj *obj; ch = yn_function("What do you look for?", (char *)0, '\0'); /* Don't filter out ' ' here; it has a use */ if ((ch != def_monsyms[S_GHOST]) && index(quitchars,ch)) { - if (flags.verbose) pline(Never_mind); + if (flags.verbose) plines(Never_mind); return; } You("peer into %s...", the(xname(obj))); diff --git a/src/dig.c b/src/dig.c index 4c40a59..a93bebd 100644 --- a/src/dig.c +++ b/src/dig.c @@ -379,7 +379,7 @@ dig() feel_location(dpx, dpy); else newsym(dpx, dpy); - if(digtxt && !digging.quiet) pline(digtxt); /* after newsym */ + if(digtxt && !digging.quiet) plines(digtxt); /* after newsym */ if(dmgtxt) pay_for_damage(dmgtxt, FALSE); diff --git a/src/do.c b/src/do.c index 858777f..42234a2 100644 --- a/src/do.c +++ b/src/do.c @@ -1310,7 +1310,7 @@ boolean at_stairs, falling, portal; Sprintf(buf, mesg, !Blind ? "looks" : "seems"); mesg = buf; } - if (mesg) pline(mesg); + if (mesg) plines(mesg); } #ifdef REINCARNATION @@ -1422,8 +1422,8 @@ final_level() } } -static char *dfr_pre_msg = 0, /* pline() before level change */ - *dfr_post_msg = 0; /* pline() after level change */ +static char *dfr_pre_msg = 0, /* plines() before level change */ + *dfr_post_msg = 0; /* plines() after level change */ /* change levels at the end of this turn, after monsters finish moving */ void @@ -1459,7 +1459,7 @@ deferred_goto() int typmask = u.utotype; /* save it; goto_level zeroes u.utotype */ assign_level(&dest, &u.utolev); - if (dfr_pre_msg) pline(dfr_pre_msg); + if (dfr_pre_msg) plines(dfr_pre_msg); goto_level(&dest, !!(typmask&1), !!(typmask&2), !!(typmask&4)); if (typmask & 0200) { /* remove portal */ struct trap *t = t_at(u.ux, u.uy); @@ -1469,7 +1469,7 @@ deferred_goto() newsym(u.ux, u.uy); } } - if (dfr_post_msg) pline(dfr_post_msg); + if (dfr_post_msg) plines(dfr_post_msg); } u.utotype = 0; /* our caller keys off of this */ if (dfr_pre_msg) diff --git a/src/dothrow.c b/src/dothrow.c index 2c4389a..325ea88 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -770,7 +770,7 @@ boolean hitsroof; pline("It blinds you!"); u.ucreamed += blindinc; make_blinded(Blinded + (long)blindinc, FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } break; default: diff --git a/src/dungeon.c b/src/dungeon.c index b87b8bb..ff5c394 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -674,7 +674,7 @@ init_dungeons() /* initialize the "dungeon" structs */ interject_assistance(1, INTERJECT_PANIC, (genericptr_t)tbuf, (genericptr_t)fqn_prefix[DATAPREFIX]); #endif - panic(tbuf); + panic("%s", tbuf); } /* validate the data's version against the program's version */ diff --git a/src/eat.c b/src/eat.c index 12e8d9b..27fe5bf 100644 --- a/src/eat.c +++ b/src/eat.c @@ -422,7 +422,7 @@ boolean message; occupation = 0; /* do this early, so newuhs() knows we're done */ newuhs(FALSE); if (nomovemsg) { - if (message) pline(nomovemsg); + if (message) plines(nomovemsg); nomovemsg = 0; } else if (message) You("finish eating %s.", food_xname(victual.piece, TRUE)); @@ -1208,7 +1208,7 @@ struct obj *obj; } else if(!rn2(4) && !Blind) { pline("Everything suddenly goes dark."); make_blinded((long)d(2,10),FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } else if(!rn2(3)) { const char *what, *where; if (!Blind) @@ -2360,7 +2360,7 @@ boolean incr; break; case WEAK: if (Hallucination) - pline((!incr) ? + plines((!incr) ? "You still have the munchies." : "The munchies are interfering with your motor capabilities."); else if (incr && diff --git a/src/engrave.c b/src/engrave.c index fe09b4f..11b1be4 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -890,7 +890,7 @@ doengrave() c = yn_function("Do you want to add to the current engraving?", ynqchars, 'y'); if (c == 'q') { - pline(Never_mind); + plines(Never_mind); return(0); } } @@ -983,7 +983,7 @@ doengrave() Tobjnam(otmp, "glow"), otense(otmp, "fade")); return(1); } else { - pline(Never_mind); + plines(Never_mind); return(0); } } @@ -1100,12 +1100,12 @@ doengrave() make_engr_at(u.ux, u.uy, buf, (moves - multi), type); - if (post_engr_text[0]) pline(post_engr_text); + if (post_engr_text[0]) plines(post_engr_text); if (doblind && !resists_blnd(&youmonst)) { You("are blinded by the flash!"); make_blinded((long)rnd(50),FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } return(1); diff --git a/src/hack.c b/src/hack.c index 0e89c3b..e636549 100644 --- a/src/hack.c +++ b/src/hack.c @@ -423,7 +423,7 @@ still_chewing(x,y) unblock_point(x, y); /* vision */ newsym(x, y); - if (digtxt) You(digtxt); /* after newsym */ + if (digtxt) You("%s", digtxt); /* after newsym */ if (dmgtxt) pay_for_damage(dmgtxt, FALSE); (void) memset((genericptr_t)&digging, 0, sizeof digging); return 0; @@ -2082,7 +2082,7 @@ const char *msg_override; multi = 0; /* caller will usually have done this already */ if (msg_override) nomovemsg = msg_override; else if (!nomovemsg) nomovemsg = You_can_move_again; - if (*nomovemsg) pline(nomovemsg); + if (*nomovemsg) plines(nomovemsg); nomovemsg = 0; u.usleep = 0; if (afternmv) (*afternmv)(); @@ -2257,7 +2257,7 @@ const char *str; { if(near_capacity() >= EXT_ENCUMBER) { if(str) - pline(str); + plines(str); else You_cant("do that while carrying so much stuff."); return 1; diff --git a/src/invent.c b/src/invent.c index a35da0a..ee401c5 100644 --- a/src/invent.c +++ b/src/invent.c @@ -976,7 +976,7 @@ register const char *let,*word; } if(index(quitchars,ilet)) { if(flags.verbose) - pline(Never_mind); + plines(Never_mind); return((struct obj *)0); } if(ilet == '-') { @@ -1035,7 +1035,7 @@ register const char *let,*word; } if(ilet == '\033') { if(flags.verbose) - pline(Never_mind); + plines(Never_mind); return((struct obj *)0); } /* they typed a letter (not a space) at the prompt */ @@ -2347,7 +2347,7 @@ boolean picked_some; Sprintf(fbuf, "There is %s here.", an(dfeature)); if (!otmp || is_lava(u.ux,u.uy) || (is_pool(u.ux,u.uy) && !Underwater)) { - if (dfeature) pline(fbuf); + if (dfeature) plines(fbuf); read_engr_at(u.ux, u.uy); /* Eric Backus */ if (!skip_objects && (Blind || !dfeature)) You("%s no objects here.", verb); @@ -2356,14 +2356,14 @@ boolean picked_some; /* we know there is something here */ if (skip_objects) { - if (dfeature) pline(fbuf); + if (dfeature) plines(fbuf); read_engr_at(u.ux, u.uy); /* Eric Backus */ There("are %s%s objects here.", (obj_cnt <= 10) ? "several" : "many", picked_some ? " more" : ""); } else if (!otmp->nexthere) { /* only one object */ - if (dfeature) pline(fbuf); + if (dfeature) plines(fbuf); read_engr_at(u.ux, u.uy); /* Eric Backus */ #ifdef INVISIBLE_OBJECTS if (otmp->oinvis && !See_invisible) verb = "feel"; @@ -2817,7 +2817,7 @@ doorganize() /* inventory organizer by Del Lamb */ Sprintf(qbuf, "Adjust letter to what [%s]?",buf); let = yn_function(qbuf, (char *)0, '\0'); if(index(quitchars,let)) { - pline(Never_mind); + plines(Never_mind); return(0); } if (let == '@' || !letter(let)) diff --git a/src/lock.c b/src/lock.c index 4d5d333..f73b503 100644 --- a/src/lock.c +++ b/src/lock.c @@ -862,7 +862,7 @@ int x, y; default: impossible("magic (%d) attempted on door.", otmp->otyp); break; } - if (msg && cansee(x,y)) pline(msg); + if (msg && cansee(x,y)) plines(msg); if (loudness > 0) { /* door was destroyed */ wake_nearto(x, y, loudness); diff --git a/src/mail.c b/src/mail.c index 9b1e4f6..dd8fb4a 100644 --- a/src/mail.c +++ b/src/mail.c @@ -321,7 +321,7 @@ md_rush(md,tx,ty) if (fx == tx && fy == ty) break; if ((mon = m_at(fx,fy)) != 0) /* save monster at this position */ - verbalize(md_exclamations()); + verbalize("%s", md_exclamations()); else if (fx == u.ux && fy == u.uy) verbalize("Excuse me."); diff --git a/src/makemon.c b/src/makemon.c index 89098dd..32ae932 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1779,7 +1779,7 @@ struct obj *bag; if (!bag || bag->otyp != BAG_OF_TRICKS) { impossible("bad bag o' tricks"); } else if (bag->spe < 1) { - pline(nothing_happens); + plines(nothing_happens); } else { boolean gotone = FALSE; int cnt = 1; diff --git a/src/mcastu.c b/src/mcastu.c index 93d3b8d..549caf4 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -590,7 +590,7 @@ int spellnum; (num_eyes == 1) ? body_part(EYE) : makeplural(body_part(EYE))); make_blinded(Half_spell_damage ? 100L : 200L, FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); dmg = 0; } else impossible("no reason for monster to cast blindness spell?"); diff --git a/src/mhitu.c b/src/mhitu.c index c0711fc..7df5b5e 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1036,7 +1036,7 @@ hitmu(mtmp, mattk) if (can_blnd(mtmp, &youmonst, mattk->aatyp, (struct obj*)0)) { if (!Blind) pline("%s blinds you!", Monnam(mtmp)); make_blinded(Blinded+(long)dmg,FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } dmg = 0; break; @@ -1742,7 +1742,7 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */ if(!Blind) { You_cant("see in here!"); make_blinded((long)tmp,FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } else /* keep him blind until disgorged */ make_blinded(Blinded+1,FALSE); @@ -1858,7 +1858,7 @@ common: if (mon_visible(mtmp) || (rnd(tmp /= 2) > u.ulevel)) { You("are blinded by a blast of light!"); make_blinded((long)tmp, FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } else if (flags.verbose) You("get the impression it was not terribly bright."); } @@ -1985,7 +1985,7 @@ gazemu(mtmp, mattk) /* monster gazes at you */ /* not blind at this point implies you're wearing the Eyes of the Overworld; make them block this particular stun attack too */ - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); else make_stunned((long)d(1,3),TRUE); } break; diff --git a/src/mon.c b/src/mon.c index c769953..74bb15c 100644 --- a/src/mon.c +++ b/src/mon.c @@ -2370,7 +2370,7 @@ struct monst *mon; You("cannot polymorph %s into that.", mon_nam(mon)); else break; } while(++tries < 5); - if (tries==5) pline(thats_enough_tries); + if (tries==5) plines(thats_enough_tries); } #endif /*WIZARD*/ if (mndx == NON_PM) mndx = rn1(SPECIAL_PM - LOW_PM, LOW_PM); diff --git a/src/mthrowu.c b/src/mthrowu.c index 3038ced..0ce7832 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -450,7 +450,7 @@ m_throw(mon, x, y, dx, dy, range, obj) if (blindinc) { u.ucreamed += blindinc; make_blinded(Blinded + (long)blindinc, FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } } diff --git a/src/muse.c b/src/muse.c index 86044e5..5628181 100644 --- a/src/muse.c +++ b/src/muse.c @@ -79,7 +79,7 @@ struct obj *obj; m_useup(mon, obj); mtmp = makemon(&mons[PM_GHOST], cc.x, cc.y, NO_MM_FLAGS); if (!mtmp) { - if (vis) pline(empty); + if (vis) plines(empty); } else { if (vis) { pline("As %s opens the bottle, an enormous %s emerges!", @@ -102,7 +102,7 @@ struct obj *obj; m_useup(mon, obj); mtmp = makemon(&mons[PM_DJINNI], cc.x, cc.y, NO_MM_FLAGS); if (!mtmp) { - if (vis) pline(empty); + if (vis) plines(empty); } else { if (vis) pline("In a cloud of smoke, %s emerges!", diff --git a/src/pline.c b/src/pline.c index 8210f8d..4f1149f 100644 --- a/src/pline.c +++ b/src/pline.c @@ -55,6 +55,12 @@ pline VA_DECL(const char *, line) Vsprintf(pbuf,line,VA_ARGS); line = pbuf; } + plines(line); +} + +void +plines(const char *line) { + if (!line || !*line) return; if (!iflags.window_inited) { raw_print(line); return; diff --git a/src/polyself.c b/src/polyself.c index b051acb..2f6552c 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -234,7 +234,7 @@ boolean forcecontrol; if(!Polymorph_control && !forcecontrol && !draconian && !iswere && !isvamp) { if (rn2(20) > ACURR(A_CON)) { - You(shudder_for_moment); + You("%s", shudder_for_moment); losehp(rnd(30), "system shock", KILLED_BY_AN); exercise(A_CON, FALSE); return; @@ -256,7 +256,7 @@ boolean forcecontrol; You("cannot polymorph into that."); else break; } while(++tries < 5); - if (tries==5) pline(thats_enough_tries); + if (tries==5) plines(thats_enough_tries); /* allow skin merging, even when polymorph is controlled */ if (draconian && (mntmp == armor_to_dragon(uarm->otyp) || tries == 5)) diff --git a/src/potion.c b/src/potion.c index 04abd41..d4baf04 100644 --- a/src/potion.c +++ b/src/potion.c @@ -932,7 +932,7 @@ register const char *txt; You("have a %s feeling for a moment, then it passes.", Hallucination ? "normal" : "strange"); else - pline(txt); + plines(txt); if(!obj) /* e.g., crystal ball finds no traps */ return; @@ -1280,7 +1280,7 @@ register struct obj *obj; pline("It suddenly gets dark."); } make_blinded(itimeout_incr(Blinded, rnd(5)), FALSE); - if (!Blind && !u.usleep) Your(vision_clears); + if (!Blind && !u.usleep) Your("%s", vision_clears); break; case POT_WATER: if(u.umonnum == PM_GREMLIN) { @@ -1633,7 +1633,7 @@ dodip() obj == uball || obj == uskin || obj_resists(obj->otyp == POT_POLYMORPH ? potion : obj, 5, 95)) { - pline(nothing_happens); + plines(nothing_happens); } else { boolean was_wep = FALSE, was_swapwep = FALSE, was_quiver = FALSE; short save_otyp = obj->otyp; diff --git a/src/pray.c b/src/pray.c index 3caa8c4..d34046e 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1333,7 +1333,7 @@ verbalize("In return for thy service, I grant thee the gift of Immortality!"); } /* fake Amulet */ if (value == 0) { - pline(nothing_happens); + plines(nothing_happens); return (1); } diff --git a/src/priest.c b/src/priest.c index 5681930..effd0db 100644 --- a/src/priest.c +++ b/src/priest.c @@ -363,8 +363,8 @@ register int roomno; msg1 = buf; } if (can_speak) { - verbalize(msg1); - if (msg2) verbalize(msg2); + verbalize("%s", msg1); + if (msg2) verbalize("%s", msg2); } if(!sanctum) { /* !tended -> !shrined */ @@ -433,7 +433,7 @@ register struct monst *priest; priest->mcanmove = 1; } priest->mpeaceful = 0; - verbalize(cranky_msg[rn2(3)]); + verbalize("%s", cranky_msg[rn2(3)]); return; } diff --git a/src/questpgr.c b/src/questpgr.c index b4b80af..130169f 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -364,7 +364,7 @@ struct qtmsg *qt_msg; for (size = 0; size < qt_msg->size; size += (long)strlen(in_line)) { (void) dlb_fgets(in_line, 80, msg_file); convert_line(); - pline(out_line); + plines(out_line); } } diff --git a/src/read.c b/src/read.c index ab530f0..743d13a 100644 --- a/src/read.c +++ b/src/read.c @@ -156,14 +156,14 @@ static void stripspe(obj) register struct obj *obj; { - if (obj->blessed) pline(nothing_happens); + if (obj->blessed) plines(nothing_happens); else { if (obj->spe > 0) { obj->spe = 0; if (obj->otyp == OIL_LAMP || obj->otyp == BRASS_LANTERN) obj->age = 0; Your("%s %s briefly.",xname(obj), otense(obj, "vibrate")); - } else pline(nothing_happens); + } else plines(nothing_happens); } } @@ -320,7 +320,7 @@ int curse_bless; if (obj->spe < 3) Your("marker seems permanently dried out."); else - pline(nothing_happens); + plines(nothing_happens); } else if (is_blessed) { n = rn1(16,15); /* 15..30 */ if (obj->spe + n <= 50) @@ -378,7 +378,7 @@ int curse_bless; if (obj->spe < 5) { obj->spe++; p_glow1(obj); - } else pline(nothing_happens); + } else plines(nothing_happens); } break; case HORN_OF_PLENTY: @@ -1284,7 +1284,7 @@ register struct obj *sobj; cc.x = u.ux; cc.y = u.uy; if (getpos(&cc, TRUE, "the desired position") < 0) { - pline(Never_mind); + plines(Never_mind); return 0; } if (!cansee(cc.x, cc.y) || distu(cc.x, cc.y) >= 32) { @@ -1433,7 +1433,7 @@ do_class_genocide() for(j=0; ; j++) { if (j >= 5) { - pline(thats_enough_tries); + plines(thats_enough_tries); return; } do { @@ -1602,7 +1602,7 @@ int how; } else { for(i = 0; ; i++) { if(i >= 5) { - pline(thats_enough_tries); + plines(thats_enough_tries); return; } getlin("What monster do you want to genocide? [type the name]", @@ -1725,7 +1725,7 @@ int how; if (cnt) pline("Sent in some %s.", makeplural(buf)); else - pline(nothing_happens); + plines(nothing_happens); } } @@ -1845,7 +1845,7 @@ create_particular() } while (++tries < 5); if (tries == 5) { - pline(thats_enough_tries); + plines(thats_enough_tries); } else { (void) cant_create(&which, FALSE); whichpm = &mons[which]; diff --git a/src/region.c b/src/region.c index e4d12af..ec598e1 100644 --- a/src/region.c +++ b/src/region.c @@ -445,7 +445,7 @@ xchar !regions[i]->attach_2_u && !inside_region(regions[i], x, y)) { clear_hero_inside(regions[i]); if (regions[i]->leave_msg != NULL) - pline(regions[i]->leave_msg); + plines(regions[i]->leave_msg); if ((f_indx = regions[i]->leave_f) != NO_CALLBACK) (void) (*callbacks[f_indx])(regions[i], (genericptr_t) 0); } @@ -456,7 +456,7 @@ xchar !regions[i]->attach_2_u && inside_region(regions[i], x, y)) { set_hero_inside(regions[i]); if (regions[i]->enter_msg != NULL) - pline(regions[i]->enter_msg); + plines(regions[i]->enter_msg); if ((f_indx = regions[i]->enter_f) != NO_CALLBACK) (void) (*callbacks[f_indx])(regions[i], (genericptr_t) 0); } diff --git a/src/restore.c b/src/restore.c index aaabbed..cb7b581 100644 --- a/src/restore.c +++ b/src/restore.c @@ -737,7 +737,7 @@ boolean ghostly; else Sprintf(trickbuf, "This is level %d, not %d!", dlvl, lev); #ifdef WIZARD - if (wizard) pline(trickbuf); + if (wizard) plines(trickbuf); #endif trickery(trickbuf); } diff --git a/src/rumors.c b/src/rumors.c index 3272d1c..fb2065a 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -152,7 +152,7 @@ int mechanism; return; else if (Blind) { if (mechanism == BY_COOKIE) - pline(fortune_msg); + plines(fortune_msg); pline("What a pity that you cannot read it!"); return; } @@ -170,7 +170,7 @@ int mechanism; exercise(A_WIS, TRUE); return; case BY_COOKIE: - pline(fortune_msg); + plines(fortune_msg); /* FALLTHRU */ case BY_PAPER: pline("It reads:"); diff --git a/src/shk.c b/src/shk.c index 53c868b..fc30c7b 100644 --- a/src/shk.c +++ b/src/shk.c @@ -516,7 +516,7 @@ register char *enterstring; if (!index(empty_shops, *enterstring) && in_rooms(u.ux, u.uy, SHOPBASE) != in_rooms(u.ux0, u.uy0, SHOPBASE)) - pline(no_shk); + plines(no_shk); Strcpy(empty_shops, u.ushops); u.ushops[0] = '\0'; return; @@ -528,7 +528,7 @@ register char *enterstring; /* dump core when referenced */ eshkp->bill_p = (struct bill_x *) -1000; if (!index(empty_shops, *enterstring)) - pline(no_shk); + plines(no_shk); Strcpy(empty_shops, u.ushops); u.ushops[0] = '\0'; return; @@ -1345,7 +1345,7 @@ proceed: else Strcat(sbuf, "for gold picked up and the use of merchandise."); } else Strcat(sbuf, "for the use of merchandise."); - pline(sbuf); + plines(sbuf); #ifndef GOLDOBJ if (u.ugold + eshkp->credit < dtmp) { #else diff --git a/src/sounds.c b/src/sounds.c index ebd51aa..0740ab4 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -53,7 +53,7 @@ dosounds() "the splashing of a naiad.", "a soda fountain!", }; - You_hear(fountain_msg[rn2(3)+hallu]); + You_hear("%s", fountain_msg[rn2(3)+hallu]); } #ifdef SINK if (level.flags.nsinks && !rn2(300)) { @@ -62,7 +62,7 @@ dosounds() "a gurgling noise.", "dishes being washed!", }; - You_hear(sink_msg[rn2(2)+hallu]); + You_hear("%s", sink_msg[rn2(2)+hallu]); } #endif if (level.flags.has_court && !rn2(200)) { @@ -81,7 +81,7 @@ dosounds() /* finding one is enough, at least for now */ int which = rn2(3)+hallu; - if (which != 2) You_hear(throne_msg[which]); + if (which != 2) You_hear("%s", throne_msg[which]); else pline(throne_msg[2], uhis()); return; } @@ -93,7 +93,7 @@ dosounds() "smell marsh gas!", /* so it's a smell...*/ "hear Donald Duck!", }; - You(swamp_msg[rn2(2)+hallu]); + You("%s", swamp_msg[rn2(2)+hallu]); return; } if (level.flags.has_vault && !rn2(200)) { @@ -201,7 +201,7 @@ dosounds() mon_in_room(mtmp, BARRACKS) && /* sleeping implies not-yet-disturbed (usually) */ (mtmp->msleeping || ++count > 5)) { - You_hear(barracks_msg[rn2(3)+hallu]); + You_hear("%s", barracks_msg[rn2(3)+hallu]); return; } } @@ -216,7 +216,7 @@ dosounds() if (DEADMONSTER(mtmp)) continue; if ((mtmp->msleeping || is_animal(mtmp->data)) && mon_in_room(mtmp, ZOO)) { - You_hear(zoo_msg[rn2(2)+hallu]); + You_hear("%s", zoo_msg[rn2(2)+hallu]); return; } } @@ -234,7 +234,7 @@ dosounds() "the chime of a cash register.", "Neiman and Marcus arguing!", }; - You_hear(shop_msg[rn2(2)+hallu]); + You_hear("%s", shop_msg[rn2(2)+hallu]); } return; } @@ -252,7 +252,7 @@ dosounds() "someone say \"No more woodchucks!\"", "a loud ZOT!" /* both rec.humor.oracle */ }; - You_hear(ora_msg[rn2(3)+hallu*2]); + You_hear("%s", ora_msg[rn2(3)+hallu*2]); } return; } @@ -816,7 +816,7 @@ register struct monst *mtmp; } if (pline_msg) pline("%s %s", Monnam(mtmp), pline_msg); - else if (verbl_msg) verbalize(verbl_msg); + else if (verbl_msg) verbalize("%s", verbl_msg); return(1); } diff --git a/src/spell.c b/src/spell.c index bd57569..afacac0 100644 --- a/src/spell.c +++ b/src/spell.c @@ -948,7 +948,7 @@ boolean atme; break; case SPE_JUMPING: if (!jump(max(role_skill,1))) - pline(nothing_happens); + plines(nothing_happens); break; default: impossible("Unknown spell %d attempted.", spell); diff --git a/src/steed.c b/src/steed.c index 52e97dc..e9eeda2 100644 --- a/src/steed.c +++ b/src/steed.c @@ -58,7 +58,7 @@ use_saddle(otmp) /* Select an animal */ if (u.uswallow || Underwater || !getdir((char *)0)) { - pline(Never_mind); + plines(Never_mind); return 0; } if (!u.dx && !u.dy) { diff --git a/src/teleport.c b/src/teleport.c index c913e3c..e7c1e9f 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -552,7 +552,7 @@ dotele() else tele(); (void) next_to_u(); } else { - You(shudder_for_moment); + You("%s", shudder_for_moment); return(0); } if (!trap) morehungry(100); @@ -663,7 +663,7 @@ level_tele() * we let negative values requests fall into the "heaven" loop. */ if (Is_knox(&u.uz) && newlev > 0) { - You(shudder_for_moment); + You("%s", shudder_for_moment); return; } /* if in Quest, the player sees "Home 1", etc., on the status @@ -680,13 +680,13 @@ level_tele() random_levtport: newlev = random_teleport_level(); if (newlev == depth(&u.uz)) { - You(shudder_for_moment); + You("%s", shudder_for_moment); return; } } if (!next_to_u()) { - You(shudder_for_moment); + You("%s", shudder_for_moment); return; } #ifdef WIZARD @@ -812,7 +812,7 @@ register struct trap *ttmp; struct d_level target_level; if (!next_to_u()) { - You(shudder_for_moment); + You("%s", shudder_for_moment); return; } @@ -846,7 +846,7 @@ struct trap *trap; shieldeff(u.ux, u.uy); You_feel("a wrenching sensation."); } else if (!next_to_u()) { - You(shudder_for_moment); + You("%s", shudder_for_moment); } else if (trap->once) { deltrap(trap); newsym(u.ux,u.uy); /* get rid of trap symbol */ diff --git a/src/timeout.c b/src/timeout.c index 6a336d6..0ad7550 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -31,7 +31,7 @@ stoned_dialogue() register long i = (Stoned & TIMEOUT); if (i > 0L && i <= SIZE(stoned_texts)) - pline(stoned_texts[SIZE(stoned_texts) - i]); + plines(stoned_texts[SIZE(stoned_texts) - i]); if (i == 5L) HFast = 0L; if (i == 3L) @@ -55,7 +55,7 @@ vomiting_dialogue() if ((((Vomiting & TIMEOUT) % 3L) == 2) && (i >= 0) && (i < SIZE(vomiting_texts))) - You(vomiting_texts[SIZE(vomiting_texts) - i - 1]); + You("%s", vomiting_texts[SIZE(vomiting_texts) - i - 1]); switch ((int) i) { case 0: @@ -102,7 +102,7 @@ choke_dialogue() if (index(str, '%')) pline(str, hcolor(NH_BLUE)); else - pline(str); + plines(str); } } exercise(A_STR, FALSE); @@ -132,7 +132,7 @@ slime_dialogue() } else pline(str, an(Hallucination ? rndmonnam() : "green slime")); } else - pline(str); + plines(str); } if (i == 3L) { /* limbs becoming oozy */ HFast = 0L; /* lose intrinsic speed */ diff --git a/src/trap.c b/src/trap.c index d336276..1724267 100644 --- a/src/trap.c +++ b/src/trap.c @@ -359,7 +359,7 @@ boolean td; /* td == TRUE : trap door or hole */ dont_fall = "are jerked back by your pet!"; } if (dont_fall) { - You(dont_fall); + You("%s", dont_fall); /* hero didn't fall through, but any objects here might */ impact_drop((struct obj *)0, u.ux, u.uy, 0); if (!td) { @@ -2498,7 +2498,7 @@ domagictrap() if (!resists_blnd(&youmonst)) { You("are momentarily blinded by a flash of light!"); make_blinded((long)rn1(5,10),FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } else if (!Blind) { You("see a flash of light!"); } else diff --git a/src/uhitm.c b/src/uhitm.c index 4a980d6..b418a43 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -858,7 +858,7 @@ int thrown; mon->mblinded = 127; else mon->mblinded += tmp; } else { - pline(obj->otyp==CREAM_PIE ? "Splat!" : "Splash!"); + plines(obj->otyp==CREAM_PIE ? "Splat!" : "Splash!"); setmangry(mon); } if (thrown) obfree(obj, (struct obj *)0); diff --git a/src/zap.c b/src/zap.c index 991c429..0f23b62 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1835,7 +1835,7 @@ dozap() check_unpaid(obj); /* zappable addition done by GAN 11/03/86 */ - if(!zappable(obj)) pline(nothing_happens); + if(!zappable(obj)) plines(nothing_happens); else if(obj->cursed && !rn2(100)) { backfire(obj); /* the wand blows up in your face! */ exercise(A_STR, FALSE); @@ -1912,7 +1912,7 @@ boolean ordinary; if (!resists_blnd(&youmonst)) { You(are_blinded_by_the_flash); make_blinded((long)rnd(100),FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } break; @@ -2050,7 +2050,7 @@ boolean ordinary; case WAN_DEATH: case SPE_FINGER_OF_DEATH: if (nonliving(youmonst.data) || is_demon(youmonst.data)) { - pline((obj->otyp == WAN_DEATH) ? + plines((obj->otyp == WAN_DEATH) ? "The wand shoots an apparently harmless beam at you." : "You seem no deader than before."); break; @@ -2093,7 +2093,7 @@ boolean ordinary; You(are_blinded_by_the_flash); make_blinded((long)damage, FALSE); makeknown(obj->otyp); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } damage = 0; /* reset */ break; @@ -2373,7 +2373,7 @@ struct obj *obj; /* wand or spell */ case SPE_STONE_TO_FLESH: if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) || Underwater || (Is_qstart(&u.uz) && u.dz < 0)) { - pline(nothing_happens); + plines(nothing_happens); } else if (u.dz < 0) { /* we should do more... */ pline("Blood drips on your %s.", body_part(FACE)); } else if (u.dz > 0 && !OBJ_AT(u.ux, u.uy)) { @@ -2384,7 +2384,7 @@ struct obj *obj; /* wand or spell */ e = engr_at(u.ux, u.uy); if (!(e && e->engr_type == ENGRAVE)) { if (is_pool(u.ux, u.uy) || is_ice(u.ux, u.uy)) - pline(nothing_happens); + plines(nothing_happens); else pline("Blood %ss %s your %s.", is_lava(u.ux, u.uy) ? "boil" : "pool", @@ -3463,7 +3463,7 @@ register int dx,dy; if (abstype == ZT_LIGHTNING && !resists_blnd(&youmonst)) { You(are_blinded_by_the_flash); make_blinded((long)d(nd,50),FALSE); - if (!Blind) Your(vision_clears); + if (!Blind) Your("%s", vision_clears); } stop_occupation(); nomul(0); @@ -3597,7 +3597,7 @@ boolean *shopdamage; if (ttmp) ttmp->tseen = 1; if (cansee(x,y)) msgtxt = "The water evaporates."; } - Norep(msgtxt); + Norep("%s", msgtxt); if (lev->typ == ROOM) newsym(x,y); } else if(IS_FOUNTAIN(lev->typ)) { if (cansee(x,y)) @@ -3721,12 +3721,12 @@ boolean *shopdamage; lev->doormask = new_doormask; unblock_point(x, y); /* vision */ if (cansee(x, y)) { - pline(see_txt); + plines(see_txt); newsym(x, y); } else if (sense_txt) { - You(sense_txt); + You("%s", sense_txt); } else if (hear_txt) { - if (flags.soundok) You_hear(hear_txt); + if (flags.soundok) You_hear("%s", hear_txt); } if (picking_at(x, y)) { stop_occupation(); @@ -4111,7 +4111,7 @@ retry: if (!otmp) { pline("Nothing fitting that description exists in the game."); if (++tries < 5) goto retry; - pline(thats_enough_tries); + plines(thats_enough_tries); otmp = readobjnam((char *)0, (struct obj *)0, TRUE); if (!otmp) return; /* for safety; should never happen */ } else if (otmp == ¬hing) { debian/patches/0001-Make-sure-the-user-calling-recover-owns-the-file.patch0000644000000000000000000000435411765144123023342 0ustar From 859d2d7416614a16a0d23835a512792ccbdad0bb Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Mon, 13 Nov 2006 17:42:00 -0800 Subject: Make sure the user calling recover owns the file. --- util/recover.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/util/recover.c b/util/recover.c index cc1b819..5bb9f2f 100644 --- a/util/recover.c +++ b/util/recover.c @@ -16,6 +16,12 @@ #include "win32api.h" #endif +#ifdef SECURE +#include +#include +#include +#endif + #ifdef VMS extern int FDECL(vms_creat, (const char *,unsigned)); extern int FDECL(vms_open, (const char *,int,unsigned)); @@ -107,15 +113,23 @@ char *argv[]; } #if defined(SECURE) && !defined(VMS) if (dir -# ifdef HACKDIR +# ifdef VAR_PLAYGROUND + && strcmp(dir, VAR_PLAYGROUND) +# else +# ifdef HACKDIR && strcmp(dir, HACKDIR) -# endif +# endif +# endif /* VAR_PLAYGROUND */ ) { (void) setgid(getgid()); (void) setuid(getuid()); } #endif /* SECURE && !VMS */ +#ifdef VAR_PLAYGROUND + if (!dir) dir = VAR_PLAYGROUND; +#endif + #ifdef HACKDIR if (!dir) dir = HACKDIR; #endif @@ -158,11 +172,19 @@ int lev; #endif } +#ifdef SECURE +static uid_t save_uid = -1; +#endif + int open_levelfile(lev) int lev; { int fd; +#ifdef SECURE + struct stat level_stat; + uid_t uid; +#endif set_levelfile_name(lev); #if defined(MICRO) || defined(WIN32) || defined(MSDOS) @@ -170,6 +192,21 @@ int lev; #else fd = open(lock, O_RDONLY, 0); #endif + /* Security check: does the user calling recover own the file? */ +#ifdef SECURE + if (fd != -1) { + uid = getuid(); + if (fstat(fd, &level_stat) == -1) { + Fprintf(stderr, "No permission to stat level file %s.\n", lock); + return -1; + } + if (uid != 0 && level_stat.st_uid != uid) { + Fprintf(stderr, "You are not the owner of level file %s.\n", lock); + return -1; + } + save_uid = level_stat.st_uid; + } +#endif return fd; } @@ -183,6 +220,13 @@ create_savefile() #else fd = creat(savename, FCMASK); #endif + +#ifdef SECURE + if (fchown(fd, save_uid, -1) == -1) { + Fprintf(stderr, "could not chown %s to %i!\n", savename, + save_uid); + } +#endif return fd; } debian/patches/0007-Be-a-little-bit-more-useful-with-recover-s-error-mes.patch0000644000000000000000000000563211765144123024075 0ustar From 79479bd8fb3fb6818f0c0ea08c192012b6f29a0a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Be a little bit more useful with recover's error messages --- util/recover.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/util/recover.c b/util/recover.c index 5bb9f2f..183474e 100644 --- a/util/recover.c +++ b/util/recover.c @@ -39,7 +39,7 @@ void FDECL(copy_bytes, (int,int)); #define Fprintf (void)nhce_message static void nhce_message(FILE*, const char*, ...); #endif - +#define Perror (void)perror #define Close (void)close #ifdef UNIX @@ -65,6 +65,7 @@ extern unsigned _stklen = STKSIZ; #endif char savename[SAVESIZE]; /* holds relative path of save file from playground */ +const char *dir = (char*)0; int main(argc, argv) @@ -72,7 +73,6 @@ int argc; char *argv[]; { int argno; - const char *dir = (char *)0; #ifdef AMIGA char *startdir = (char *)0; #endif @@ -138,7 +138,8 @@ char *argv[]; startdir = getcwd(0,255); #endif if (dir && chdir((char *) dir) < 0) { - Fprintf(stderr, "%s: cannot chdir to %s.\n", argv[0], dir); + Fprintf(stderr, "%s: cannot chdir:", argv[0]); + Perror(dir); exit(EXIT_FAILURE); } @@ -275,7 +276,9 @@ char *basename; Fprintf(stderr, "\nTrouble accessing level 0 (errno = %d).\n", errno); #endif - Fprintf(stderr, "Cannot open level 0 for %s.\n", basename); + Fprintf(stderr, "Cannot open level 0 for %s in directory %s: ", + basename, dir); + Perror(lock); return(-1); } if (read(gfd, (genericptr_t) &hpid, sizeof hpid) != sizeof hpid) { @@ -297,7 +300,8 @@ char *basename; != sizeof savename) || (read(gfd, (genericptr_t) &version_data, sizeof version_data) != sizeof version_data)) { - Fprintf(stderr, "Error reading %s -- can't recover.\n", lock); + Fprintf(stderr, "Error reading, can't recover: "); + Perror(lock); Close(gfd); return(-1); } @@ -310,14 +314,16 @@ char *basename; */ sfd = create_savefile(); if (sfd < 0) { - Fprintf(stderr, "Cannot create savefile %s.\n", savename); + Fprintf(stderr, "Cannot create savefile in %s: ", dir); + Perror(savename); Close(gfd); return(-1); } lfd = open_levelfile(savelev); if (lfd < 0) { - Fprintf(stderr, "Cannot open level of save for %s.\n", basename); + Fprintf(stderr, "Cannot open level of save for %s: ", basename); + Perror(lock); Close(gfd); Close(sfd); return(-1); @@ -325,7 +331,8 @@ char *basename; if (write(sfd, (genericptr_t) &version_data, sizeof version_data) != sizeof version_data) { - Fprintf(stderr, "Error writing %s; recovery failed.\n", savename); + Fprintf(stderr, "Error writing, recovery failed: "); + Perror(savename); Close(gfd); Close(sfd); return(-1); debian/patches/0004-Add-LISP-based-windowing-system.patch0000644000000000000000000017267211765144123020100 0ustar From 83199fe0ca33c2442d3ea6cb26f62561ce812a41 Mon Sep 17 00:00:00 2001 From: Ben Gertzfield Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Add LISP-based windowing system --- include/winlisp.h | 70 ++ src/windows.c | 7 + win/lisp/ChangeLog | 326 +++++++++ win/lisp/winlisp.c | 1937 ++++++++++++++++++++++++++++++++++++++++++++++++++++ win/tty/termcap.c | 5 + 5 files changed, 2345 insertions(+) create mode 100644 include/winlisp.h create mode 100644 win/lisp/ChangeLog create mode 100644 win/lisp/winlisp.c diff --git a/include/winlisp.h b/include/winlisp.h new file mode 100644 index 0000000..f1815b7 --- /dev/null +++ b/include/winlisp.h @@ -0,0 +1,70 @@ +#ifndef WINLISP_H +#define WINLISP_H + +#ifndef E +#define E extern +#endif + +#if defined(BOS) || defined(NHSTDC) +#define DIMENSION_P int +#else +# ifdef WIDENED_PROTOTYPES +#define DIMENSION_P unsigned int +# else +#define DIMENSION_P Dimension +# endif +#endif + +extern struct window_procs tty_procs; + +/* ### winlisp.c ### */ +E void NDECL(win_lisp_init); +E void FDECL(lisp_init_nhwindows, (int *, char **)); +E void NDECL(lisp_player_selection); +E void NDECL(lisp_askname); +E void NDECL(lisp_get_nh_event) ; +E void FDECL(lisp_exit_nhwindows, (const char *)); +E void FDECL(lisp_suspend_nhwindows, (const char *)); +E void NDECL(lisp_resume_nhwindows); +E winid FDECL(lisp_create_nhwindow, (int)); +E void FDECL(lisp_clear_nhwindow, (winid)); +E void FDECL(lisp_display_nhwindow, (winid, BOOLEAN_P)); +E void FDECL(lisp_destroy_nhwindow, (winid)); +E void FDECL(lisp_curs, (winid,int,int)); +E void FDECL(lisp_putstr, (winid, int, const char *)); +E void FDECL(lisp_display_file, (const char *, BOOLEAN_P)); +E void FDECL(lisp_start_menu, (winid)); +E void FDECL(lisp_add_menu, (winid,int,const ANY_P *, + CHAR_P, CHAR_P, int, const char *, BOOLEAN_P)); +E void FDECL(lisp_end_menu, (winid, const char *)); +E int FDECL(lisp_select_menu, (winid, int, MENU_ITEM_P **)); +E char FDECL(lisp_message_menu, (char, int, const char *mesg)); +E void NDECL(lisp_update_inventory); +E void NDECL(lisp_mark_synch); +E void NDECL(lisp_wait_synch); +#ifdef CLIPPING +E void FDECL(lisp_cliparound, (int, int)); +#endif +#ifdef POSITIONBAR +E void FDECL(lisp_update_positionbar, (char *)); +#endif +E void FDECL(lisp_print_glyph, (winid,XCHAR_P,XCHAR_P,int)); +E void FDECL(lisp_raw_print, (const char *)); +E void FDECL(lisp_raw_print_bold, (const char *)); +E int NDECL(lisp_nhgetch); +E int FDECL(lisp_nh_poskey, (int *, int *, int *)); +E void NDECL(lisp_nhbell); +E int NDECL(lisp_doprev_message); +E char FDECL(lisp_yn_function, (const char *, const char *, CHAR_P)); +E void FDECL(lisp_getlin, (const char *,char *)); +E int NDECL(lisp_get_ext_cmd); +E void FDECL(lisp_number_pad, (int)); +E void NDECL(lisp_delay_output); + +/* other defs that really should go away (they're tty specific) */ +E void NDECL(lisp_start_screen); +E void NDECL(lisp_end_screen); + +E void FDECL(lisp_outrip, (winid,int)); + +#endif /* WINLISP_H */ diff --git a/src/windows.c b/src/windows.c index 3c59080..d65710c 100644 --- a/src/windows.c +++ b/src/windows.c @@ -40,6 +40,10 @@ extern struct window_procs Gnome_procs; #ifdef MSWIN_GRAPHICS extern struct window_procs mswin_procs; #endif +#ifdef LISP_GRAPHICS +#include "winlisp.h" +extern struct window_procs lisp_procs; +#endif STATIC_DCL void FDECL(def_raw_print, (const char *s)); @@ -81,6 +85,9 @@ struct win_choices { #ifdef MSWIN_GRAPHICS { &mswin_procs, 0 }, #endif +#ifdef LISP_GRAPHICS + { &lisp_procs, win_lisp_init }, +#endif { 0, 0 } /* must be last */ }; diff --git a/win/lisp/ChangeLog b/win/lisp/ChangeLog new file mode 100644 index 0000000..8686f14 --- /dev/null +++ b/win/lisp/ChangeLog @@ -0,0 +1,326 @@ +2005-02-27 + + * winlisp.c (CMD_LISP): new define + (cmd_index): new "travel" command, new "options" command. + (lisp_coord): new macro + (lisp_boolean): likewise + (read_int): flush stdout. + (read_string): likewise + (get_options): new function + (lisp_nhgetch): hande CMD_LISP commands + (lisp_nhgetch): call impossible if the command is not a CMD_KEY or + CMD_EXT type. + (lisp_display_nhwindow): read a dummy string, not a menu string. + +2004-02-09 Shawn Betts + + * winlisp.c (lisp_yn_function): catch the chat prompt too. + +2003-09-19 Shawn Betts + + * winlisp.c: add extra element to lisp_procs (structure change in 3.4.2). + +2003-06-03 Shawn Betts + + * winlisp.c (lisp_print_glyph): Pass special to the print-glyph + lisp function as a symbol. delete the MG_PET bit in special if + iflags.hilite_pet is not set. + (special_glyph_to_string): new function + +2003-05-14 Shawn Betts + + * winlisp.c (lisp_string): Also escape the backslash character. + +2002-09-19 Ryan Yeske + + * winlisp.c (lisp_cmd): nethack-api-* renamed to nhapi-*. + +2002-09-16 Ryan Yeske + + * ../tty/termcap.c (has_color): Add condition for LISP_GRAPHICS + which returns TRUE. + +2002-09-12 Ryan Yeske + + * winlisp.c (lisp_display_nhwindow): Add call to + `nethack-api-end'. + + * ../../include/config.h: Default to LISP_GRAPHICS. + + * ../../sys/unix/Makefile.src (WINSRC,WINOBJ,WINLIB): Set to + WINLISP* values. + (depend): Add winlisp.o dependancies. + + * winlisp.c (lisp_curs): Don't send winid. Add error check. + (lisp_putstr): Call `nethack-api-message' or + `nethack-api-menu-putstr' when appropriate. + (lisp_nhgetch): Update error message call. + (lisp_create_nhwindow): Don't send winids when creating message, + map, or status windows. + (lisp_clear_nhwindow): Call clear-message or clear-map instead of + clear-nhwindow. + (lisp_display_nhwindow): Call display-menu instead of + display-nhwindow. Call block when handling case of blocking on + displaying the map window. + (lisp_destroy_nhwindow): Use WIN_* values instead of hardcoded + numbers. + (lisp_print_glyph): Don't send winid. Add error check for bad + winids. + (lisp_outrip): Change reference to Enethack to nethack-el. + +2002-04-23 Shawn + + * winlisp.c (lisp_player_selection): Update to use new 3.4.0 + functionality. + (lisp_print_glyph): likewise + +2002-02-16 Shawn Betts + + * winlisp.c (read_string): take a pointer to a string as the + second argument. All callers updated. Rewritten to dynamically + resize the string in order to read an entire line. + (read_command): free the string returned from read_string + (lisp_askname): likewise + (lisp_display_nhwindow): likewise + (lisp_delay_output): likewise + (lisp_yn_function): likewise + +2002-02-14 Shawn Betts + + * winlisp.c (lisp_print_glyph): Handle warning glyphs. + +2002-01-27 Ryan C Yeske + + * winlisp.c (generate_status_line): Send flag values + individually. Always send values for all attributes. + +2002-01-21 Ryan C Yeske + + * winlisp.c (lisp_add_menu): Add tile argument. + +2002-01-22 shawn + + * winlisp.c (lisp_player_selection): use the existing menu system + to select a player. + (lisp_menu_item_t): add a new member, accelerator. + (lisp_current_accelerator): new static global. + (lisp_add_menu): pick our own selector when ch is 0. + (lisp_start_menu): reset lisp_current_accelerator to 'a'. + (lisp_add_menu): remove the identifier argument to the lisp_cmd + "add_menu". + (lisp_get_menu_identifier): first argument is now a char. + +2002-01-20 Ryan C Yeske + + * winlisp.c (cmd_index): Add remaining functions. + +2002-01-16 Ryan C Yeske + + * winlisp.c (lisp_exit_nhwindows): Don't wait for a dummy return + value. + (lisp_destroy_nhwindow): Don't destroy the status, message or map + windows. + +2002-01-15 Ryan C Yeske + + * winlisp.c (lisp_exit_nhwindows): Don't wait for a dummy return + value. + +2002-01-10 shawn + + * winlisp.c (win_lisp_init): new function + +2002-01-09 Ryan C Yeske + + * winlisp.c (cmd_index): Add redraw command. + (C): New macro. + +2002-01-01 shawn + + * winlisp.c (winid_list): new static global + (winid_list_len): likewise + (winid_list_max): likewise + (find_empty_cell): new function + (winid_is_taken): likewise + (add_winid): likewise + (get_unique_winid): likewise + (return_winid): likewise + (init_winid_list): likewise + +2001-12-20 shawn + + * winlisp.c (read_command): return the command count as a string. + (num_digits): remove function + (power_of_ten): likewise + (lisp_nhgetch): command count works. + (enc_stat): extern reference + (hunger_stat): new constant + (generate_status_line): new function + (lisp_putstr): use generate_status_line to create the status line + call. + +2001-12-19 shawn + + * winlisp.c: add extern declaration for glyph2tile and + total_tiles_used. + (lisp_print_glyph): pass the glyph's graphics tile index as an argument. + +2001-12-02 Ryan Yeske + + * winlisp.c (lisp_cmd, lisp_list, lisp_t, lisp_nil, lisp_literal) + (lisp_cons, lisp_int, lisp_string): Update macros. Update all api + functions to use these macros. + (read_int, read_string, read_command): New functions. Update all + api functions to use these functions. + (lisp_create_nhwindow): Send specific window creation commands. + (lisp_cliparound): Comment out body. + +2001-10-23 Ryan Yeske + + * winlisp.c (lisp_nhgetch): Don't silently loop on invalid + commands, send back a warning. + (lisp_yn_function): Make sure special handling is done for all + direction questions. Include prompt in call to + nethack-api-ask-direction. Include up, down and self directions. + If no default is set for a direction question, return space. + +2001-10-19 shawn + + * winlisp.c (lisp_init_nhwindows): turn on showexp and time flags. + +2001-10-17 Ryan Yeske + + * winlisp.c (lisp_display_nhwindow): Wait for a string if we are + blocking. + +2001-07-19 shawn + + * winlisp.c (lisp_player_selection): terminate if we read a -1 as + a selection. + +2001-07-16 Ryan Yeske + + * winlisp.c (lisp_delay_output): expect a return value from the + client. + +2001-07-14 Ryan Yeske + + * winlisp.c (lisp_add_menu): Quote the attribute. + (lisp_outrip): Add a newline to output. + +2001-07-06 shawn + + * winlisp.c (num_digits): new function + (power_of_ten): likewise + (lisp_nhgetch): handles repeated commands. + +2001-07-05 shawn + + * winlisp.c (WINLISP_VOID_RETVAL): flushes stdout + +2001-07-04 Ryan Yeske + + * winlisp.c (lisp_add_menu): Convert printf to lisp_* macros, + fixing a string quote bug. + +2001-06-28 shawn + + * winlisp.c (zap_color): new define + (cmap_color): likewise + (obj_color): likewise + (mon_color): likewise + (invis_color): likewise + (pet_color): likewise + (lisp_print_glyph): export the color. export the ascii character + as a number. + +2001-06-27 shawn + + * winlisp.c: fix a typo cmd_index + (lisp_yn_function): pass characters as numbers instead of ascii + characters. specially handle the "In what direction?" question. + (lisp_outrip): prints a properly formed lisp expression. + +2001-06-21 Shawn Betts + + * winlisp.c (lisp_add_menu): items that are not selectable are + sent with an identifier of -1. + (lisp_select_menu): handle failed memory + allocation. + +2001-05-06 shawn + + * winlisp.c (LINESIZ): new define + (lisp_menu_item_t): new struct + (lisp_menu_item_list): new static global + (lisp_menu_list_size): likewise + (lisp_menu_list_num): likewise + (cmd_index): fixed ddrop entry + (read_int): new function + (lisp_player_selection): use read_int + (lisp_askname): read the entire line to a string and parse data + from it. + (lisp_nhgetch): likewise + (lisp_create_nhwindow): likewise + (lisp_getlin): likewise + (lisp_yn_function): likewise + (lisp_start_menu): set lisp_menu_list_num to 0 + (lisp_add_menu): add an entry to lisp_menu_item_list + (lisp_add_menu): pass the item's ID to the client instead of the + actual identifier. + (lisp_get_menu_identifier): new function + (lisp_select_menu): parse the list of selected menu items + (lisp_print_glyph): escape backslashes in output + +2000-10-01 Ryan Yeske + + * winlisp.c (cmd_index): renamed "ddoremarm" to "remarm" and + "ddoinv" to "inv". + +2000-09-25 Shawn + + * winlisp.c: Added more key commands. + (lisp_player_selection): honours default player selections as + specified in the nethackrc file. + +2000-09-22 Shawn + + * winlisp.c (lisp_nhgetch): changed while loop stop condition. + +2000-09-19 Ryan yeske + + * winlisp.c (lisp_nh_getch): renamed from lisp_nh_getcmd() since + this is really called by the core when nethack wants a key. + (cmd_index): added gowest, gosouth, gonorth, goeast. + +2000-09-12 shawn + + * winlisp.c (lisp_nh_poskey): Added code to read in an x,y,mod + combination instead of calling lisp_nhgetcmd. Currently commented + out until the lisp side catches up. added cmd_index structure to + translate incoming command strings to extended commands or + keystrokes. Changed lisp_nhgetch to lisp_nhgetcmd and changed the + lisp command it calls to 'nethack-get-command'. + +2000-09-11 Ryan Yeske + + * winlisp.c (lisp_cmd, lisp_close_cmd, lisp_open, lisp_close, + lisp_quote, lisp_int, lisp_string, lisp_dot): created macros. + +2000-09-10 Ryan Yeske + + * winlisp.c (lisp_outrip): added closing paren. + +2000-08-21 Ryan Yeske + + * winlisp.c (lisp_nhgetch): change ch type to int from char. + +2000-08-20 Ryan Yeske + + * winlisp.c (lisp_player_selection): role/race/gender/alignment + selection now sends (nethack-apix-choose-X ALIST) instead of + simply an alist. + (lisp_update_inventory): + s/nethack-api-updated-inventory/nethack-api-update-inventory/ + (WINLISP_VOID_RETVAL): added macro, called for every void + function. diff --git a/win/lisp/winlisp.c b/win/lisp/winlisp.c new file mode 100644 index 0000000..290a457 --- /dev/null +++ b/win/lisp/winlisp.c @@ -0,0 +1,1937 @@ +/* Copyright (c) Shawn Betts, Ryan Yeske, 2001 */ +/* NetHack may be freely redistributed. See license for details. */ + +/* + * "Main" file for the lisp/emacs window-port. This contains most of + * the interface routines. Please see doc/window.doc for an + * description of the window interface. + */ + +#ifdef MSDOS /* from compiler */ +#define SHORT_FILENAMES +#endif + +#include "hack.h" +#include "winlisp.h" +#include "func_tab.h" + +#include "dlb.h" +#ifdef SHORT_FILENAMES +#include "patchlev.h" +#else +#include "patchlevel.h" +#endif + +#define CMD_KEY 0 +#define CMD_EXT 1 +#define CMD_LISP 2 /* These are commands specific to the lisp port */ + +/* from tile.c */ +extern short glyph2tile[]; +extern int total_tiles_used; + +typedef struct +{ + anything identifier; + char accelerator; +} lisp_menu_item_t; + +/* An iterator for assigning accelerator keys. */ +static char lisp_current_accelerator; + +/* Helper structures to map menu id's to nethack anything's */ +static lisp_menu_item_t lisp_menu_item_list[1000]; +static int lisp_menu_list_size = 1000; +static int lisp_menu_list_num; + +extern char *enc_stat[]; +const char *hunger_stat[] = { + "Satiated", + "", + "Hungry", + "Weak", + "Fainting", + "Fainted", + "Starved" +}; + +typedef struct +{ + char *name; + int type; + int cmd; /* The command (a keystroke) */ +}cmd_index_t; + +#ifndef C +#define C(c) (0x1f & (c)) +#endif + +/* Taken from cmd.c */ +cmd_index_t cmd_index[] = { {"gowest", CMD_KEY, 'h'}, + {"gowestontop", CMD_KEY, 'H'}, + {"gowestnear", CMD_KEY, C('h')}, + + {"gosouth", CMD_KEY, 'j'}, + {"gosouthontop", CMD_KEY, 'J'}, + {"gosouthnear", CMD_KEY, C('j')}, + + {"gonorth", CMD_KEY, 'k'}, + {"gonorthontop", CMD_KEY, 'K'}, + {"gonorthnear", CMD_KEY, C('k')}, + + {"goeast", CMD_KEY, 'l'}, + {"goeastontop", CMD_KEY, 'L'}, + {"goeastnear", CMD_KEY, C('l')}, + + {"gonorthwest", CMD_KEY, 'y'}, + {"gonorthwestontop", CMD_KEY, 'Y'}, + {"gonorthwestnear", CMD_KEY, C('y')}, + + {"gonortheast", CMD_KEY, 'u'}, + {"gonortheastontop", CMD_KEY, 'U'}, + {"gonortheastnear", CMD_KEY, C('u')}, + + {"gosouthwest", CMD_KEY, 'b'}, + {"gosouthwestontop", CMD_KEY, 'B'}, + {"gosouthwestnear", CMD_KEY, C('b')}, + + {"gosoutheast", CMD_KEY, 'n'}, + {"gosoutheastontop", CMD_KEY, 'N'}, + {"gosoutheastnear", CMD_KEY, C('n')}, + + {"travel", CMD_KEY, '_'}, + + {"idtrap", CMD_KEY, '^'}, + {"apply", CMD_KEY, 'a'}, + {"remarm", CMD_KEY, 'A'}, + {"close", CMD_KEY, 'c'}, + {"drop", CMD_KEY, 'd'}, + + {"ddrop", CMD_KEY, 'D'}, + {"eat", CMD_KEY, 'e'}, + {"engrave", CMD_KEY, 'E'}, + {"fire", CMD_KEY, 'f'}, + {"inv", CMD_KEY, 'i'}, + + {"typeinv", CMD_KEY, 'I'}, + {"open", CMD_KEY, 'o'}, + {"set", CMD_KEY, 'O'}, + {"pay", CMD_KEY, 'p'}, + {"puton", CMD_KEY, 'P'}, + + {"drink", CMD_KEY, 'q'}, + {"wieldquiver", CMD_KEY, 'Q'}, + {"read", CMD_KEY, 'r'}, + {"remring", CMD_KEY, 'R'}, + {"search", CMD_KEY, 's'}, + + {"save", CMD_KEY, 'S'}, + {"throw", CMD_KEY, 't'}, + {"takeoff", CMD_KEY, 'T'}, + {"simpleversion", CMD_KEY, 'v'}, + {"history", CMD_KEY, 'V'}, + + {"wield", CMD_KEY, 'w'}, + {"wear", CMD_KEY, 'W'}, + {"swapweapon", CMD_KEY, 'x'}, + {"enter_explore_mode", CMD_KEY, 'X'}, + {"zap", CMD_KEY, 'z'}, + + {"cast", CMD_KEY, 'Z'}, + {"up", CMD_KEY, '<'}, + {"down", CMD_KEY, '>'}, + {"whatis", CMD_KEY, '/'}, + {"help", CMD_KEY, '?'}, + + {"whatdoes", CMD_KEY, '&'}, + {"sh", CMD_KEY, '!'}, + {"discovered", CMD_KEY, '\\'}, + {"null", CMD_KEY, '.'}, + {"look", CMD_KEY, ':'}, + + {"quickwhatis", CMD_KEY, ';'}, + {"pickup", CMD_KEY, ','}, + {"togglepickup", CMD_KEY, '@'}, + {"prinuse", CMD_KEY, '*'}, + {"countgold", CMD_KEY, '$'}, + + {"kick", CMD_KEY, C('d')}, + {"listspells", CMD_KEY, '+'}, + {"redraw", CMD_KEY, C('r')}, + {"teleport", CMD_KEY, C('t')}, + {"callmon", CMD_KEY, 'C'}, + {"fight", CMD_KEY, 'F'}, + {"movenear", CMD_KEY, 'g'}, + {"move", CMD_KEY, 'G'}, + {"movenopickuporfight", CMD_KEY, 'm'}, + {"movenopickup", CMD_KEY, 'M'}, + {"showweapon", CMD_KEY, ')'}, + {"showarmor", CMD_KEY, '['}, + {"showrings", CMD_KEY, '='}, + {"showamulet", CMD_KEY, '"'}, + {"showtool", CMD_KEY, '('}, + {"attributes", CMD_KEY, C('x')}, +#ifdef REDO + {"again", CMD_KEY, DOAGAIN}, +#endif /* REDO */ + + /* wizard commands */ + {"wiz_detect", CMD_KEY, C('e')}, + {"wiz_map", CMD_KEY, C('f')}, + {"wiz_genesis", CMD_KEY, C('g')}, + {"wiz_identify", CMD_KEY, C('i')}, + {"wiz_where", CMD_KEY, C('o')}, + {"wiz_level_tele", CMD_KEY, C('v')}, + {"wiz_wish", CMD_KEY, C('w')}, + + /* wizard extended commands */ +#ifdef WIZARD + {"light sources", CMD_EXT, 0}, + {"seenv", CMD_EXT, 0}, + {"stats", CMD_EXT, 0}, + {"timeout", CMD_EXT, 0}, + {"vision", CMD_EXT, 0}, +#ifdef DEBUG + {"wizdebug", CMD_EXT, 0}, +#endif /* DEBUG */ + {"wmode", CMD_EXT, 0}, +#endif /* WIZARD */ + {"pray", CMD_EXT, 0}, + {"adjust", CMD_EXT, 0}, + {"chat", CMD_EXT, 0}, + {"conduct", CMD_EXT, 0}, + {"dip", CMD_EXT, 0}, + + {"enhance", CMD_EXT, 0}, + {"force", CMD_EXT, 0}, + {"invoke", CMD_EXT, 0}, + {"jump", CMD_EXT, 0}, + {"loot", CMD_EXT, 0}, + + {"monster", CMD_EXT, 0}, + {"name", CMD_EXT, 0}, + {"offer", CMD_EXT, 0}, + {"quit", CMD_EXT, 0}, + {"ride", CMD_EXT, 0}, + + {"rub", CMD_EXT, 0}, + {"sit", CMD_EXT, 0}, + {"turn", CMD_EXT, 0}, + {"twoweapon", CMD_EXT, 0}, + {"untrap", CMD_EXT, 0}, + + {"version", CMD_EXT, 0}, + {"wipe", CMD_EXT, 0}, + + /* Lisp port specific commands */ + {"options", CMD_LISP, 0}, + + {0, CMD_KEY, '\0'} }; + +/* This variable is set when the user has selected an extended command. */ +static int extended_cmd_id; + +/* Interface definition, for windows.c */ +struct window_procs lisp_procs = { + "lisp", + WC_COLOR|WC_HILITE_PET, + 0L, + lisp_init_nhwindows, + lisp_player_selection, + lisp_askname, + lisp_get_nh_event, + lisp_exit_nhwindows, + lisp_suspend_nhwindows, + lisp_resume_nhwindows, + lisp_create_nhwindow, + lisp_clear_nhwindow, + lisp_display_nhwindow, + lisp_destroy_nhwindow, + lisp_curs, + lisp_putstr, + lisp_display_file, + lisp_start_menu, + lisp_add_menu, + lisp_end_menu, + lisp_select_menu, + genl_message_menu, + lisp_update_inventory, + lisp_mark_synch, + lisp_wait_synch, +#ifdef CLIPPING + lisp_cliparound, +#endif +#ifdef POSITIONBAR + lisp_update_positionbar, +#endif + lisp_print_glyph, + lisp_raw_print, + lisp_raw_print_bold, + lisp_nhgetch, + lisp_nh_poskey, + lisp_nhbell, + lisp_doprev_message, + lisp_yn_function, + lisp_getlin, + lisp_get_ext_cmd, + lisp_number_pad, + lisp_delay_output, +#ifdef CHANGE_COLOR /* the Mac uses a palette device */ + donull, + donull, +#endif + /* other defs that really should go away (they're tty specific) */ + lisp_start_screen, + lisp_end_screen, + lisp_outrip, + genl_preference_update, +}; + +/* macros for printing lisp output */ +#define lisp_cmd(s,body) \ + do \ + { \ + printf("(nhapi-%s ",s); \ + body; \ + printf(")\n"); \ + } \ + while (0) +/* #define lisp_cmd0(s) printf ("(nhapi-%s)\n", s) */ +#define lisp_list(body) \ + do \ + { \ + printf("("); \ + body; \ + printf(") "); \ + } \ + while (0) + +#define lisp_open printf("(") +#define lisp_close printf(") ") +#define lisp_quote printf("'") +#define lisp_dot printf(". ") +#define lisp_t printf("t ") +#define lisp_nil printf("nil ") +#define lisp_literal(x) \ + do \ + { \ + lisp_quote; \ + printf ("%s ", x); \ + } \ + while (0) +#define lisp_cons(x,y) \ + do \ + { \ + lisp_open; \ + x; \ + lisp_dot; \ + y; \ + lisp_close; \ + } \ + while (0) +#define lisp_int(i) printf("%d ",i) +#define lisp_coord(c) printf("'(%d,%d) ",c.x,c.y) +#define lisp_boolean(i) printf("%s ",i?"t":"nil") +#define lisp_string(s) \ + do \ + { \ + int nhi; \ + printf ("\""); \ + if (s) \ + for (nhi=0;nhi ", prompt); + fflush(stdout); + fgets (line, BUFSZ, stdin); + rv = sscanf (line, "%d", i); + if (rv != 1) *i = -1; + return rv; +} + +static int +read_string (prompt, str) + const char* prompt; + char **str; +{ + char* rv; + int len; + int size; + char tmp[BUFSZ]; + + len = 0; + size = BUFSZ * 2; + *str = malloc (size); + (*str)[0] = '\0'; + + printf ("%s> ", prompt); + fflush(stdout); + do + { + /* Read the string */ + rv = fgets (tmp, BUFSZ, stdin); + if (rv == NULL) + break; + + len += strlen (tmp); + if (len >= size - 1) + { + size *= 2; + *str = realloc (*str, size); + if (*str == NULL) + panic ("Memory allocation failure; cannot get %u bytes", size); + } + strcat (*str, tmp); + } while (tmp[strlen (tmp) - 1] != '\n'); + + /* Did we read a string or error out? */ + if (rv == NULL) + { + free (*str); + return -1; + } + else + { + /* chop the newline */ + (*str) [strlen (*str) - 1] = '\0'; + return 0; + } +} + + +static int +read_command (prompt, cmd, count) + const char *prompt; + char *cmd; + char *count; +{ + char *buf; + int rv; + cmd[0] = '\0'; + *count = 0; + if (read_string (prompt, &buf) == -1) + return -1; + rv = sscanf (buf, "%s %s", cmd, count); + free (buf); + if (rv != 2) *count = 0; + return rv; +} + +void +bail(mesg) + const char *mesg; +{ + clearlocks (); + lisp_exit_nhwindows (mesg); + terminate (EXIT_SUCCESS); + /*NOTREACHED*/ +} + +void +win_lisp_init () +{ + /* Code to be executed on startup. */ +} + +void +lisp_player_selection () +{ + int i, k, n; + char pick4u = 'n', thisch, lastch = 0; + char pbuf[QBUFSZ], plbuf[QBUFSZ]; + winid win; + anything any; + menu_item *selected = 0; + + /* prevent an unnecessary prompt */ + rigid_role_checks(); + + /* Should we randomly pick for the player? */ + if (!flags.randomall && + (flags.initrole == ROLE_NONE || flags.initrace == ROLE_NONE || + flags.initgend == ROLE_NONE || flags.initalign == ROLE_NONE)) { + + pick4u = lisp_yn_function ("Shall I pick a character for you? [ynq] ", "ynq", 'y'); + + if (pick4u != 'y' && pick4u != 'n') + { + give_up: /* Quit */ + if (selected) free((genericptr_t) selected); + bail((char *)0); + /*NOTREACHED*/ + return; + } + + } + + (void) root_plselection_prompt(plbuf, QBUFSZ - 1, + flags.initrole, flags.initrace, flags.initgend, flags.initalign); + + /* Select a role, if necessary */ + /* we'll try to be compatible with pre-selected race/gender/alignment, + * but may not succeed */ + if (flags.initrole < 0) { + char rolenamebuf[QBUFSZ]; + /* Process the choice */ + if (pick4u == 'y' || flags.initrole == ROLE_RANDOM || flags.randomall) { + /* Pick a random role */ + flags.initrole = pick_role(flags.initrace, flags.initgend, + flags.initalign, PICK_RANDOM); + if (flags.initrole < 0) { +/* lisp_putstr(BASE_WINDOW, 0, "Incompatible role!"); */ + flags.initrole = randrole(); + } + } else { + /* Prompt for a role */ + win = create_nhwindow(NHW_MENU); + start_menu(win); + any.a_void = 0; /* zero out all bits */ + for (i = 0; roles[i].name.m; i++) { + if (ok_role(i, flags.initrace, flags.initgend, + flags.initalign)) { + any.a_int = i+1; /* must be non-zero */ + thisch = lowc(roles[i].name.m[0]); + if (thisch == lastch) thisch = highc(thisch); + if (flags.initgend != ROLE_NONE && flags.initgend != ROLE_RANDOM) { + if (flags.initgend == 1 && roles[i].name.f) + Strcpy(rolenamebuf, roles[i].name.f); + else + Strcpy(rolenamebuf, roles[i].name.m); + } else { + if (roles[i].name.f) { + Strcpy(rolenamebuf, roles[i].name.m); + Strcat(rolenamebuf, "/"); + Strcat(rolenamebuf, roles[i].name.f); + } else + Strcpy(rolenamebuf, roles[i].name.m); + } + add_menu(win, NO_GLYPH, &any, thisch, + 0, ATR_NONE, an(rolenamebuf), MENU_UNSELECTED); + lastch = thisch; + } + } + any.a_int = pick_role(flags.initrace, flags.initgend, + flags.initalign, PICK_RANDOM)+1; + if (any.a_int == 0) /* must be non-zero */ + any.a_int = randrole()+1; + add_menu(win, NO_GLYPH, &any , '*', 0, ATR_NONE, + "Random", MENU_UNSELECTED); + any.a_int = i+1; /* must be non-zero */ + add_menu(win, NO_GLYPH, &any , 'q', 0, ATR_NONE, + "Quit", MENU_UNSELECTED); + Sprintf(pbuf, "Pick a role for your %s", plbuf); + end_menu(win, pbuf); + n = select_menu(win, PICK_ONE, &selected); + destroy_nhwindow(win); + + /* Process the choice */ + if (n != 1 || selected[0].item.a_int == any.a_int) + goto give_up; /* Selected quit */ + + flags.initrole = selected[0].item.a_int - 1; + free((genericptr_t) selected), selected = 0; + } + (void) root_plselection_prompt(plbuf, QBUFSZ - 1, + flags.initrole, flags.initrace, flags.initgend, flags.initalign); + } + + /* Select a race, if necessary */ + /* force compatibility with role, try for compatibility with + * pre-selected gender/alignment */ + if (flags.initrace < 0 || !validrace(flags.initrole, flags.initrace)) { + /* pre-selected race not valid */ + if (pick4u == 'y' || flags.initrace == ROLE_RANDOM || flags.randomall) { + flags.initrace = pick_race(flags.initrole, flags.initgend, + flags.initalign, PICK_RANDOM); + if (flags.initrace < 0) { +/* lisp_putstr(BASE_WINDOW, 0, "Incompatible race!"); */ + flags.initrace = randrace(flags.initrole); + } + } else { /* pick4u == 'n' */ + /* Count the number of valid races */ + n = 0; /* number valid */ + k = 0; /* valid race */ + for (i = 0; races[i].noun; i++) { + if (ok_race(flags.initrole, i, flags.initgend, + flags.initalign)) { + n++; + k = i; + } + } + if (n == 0) { + for (i = 0; races[i].noun; i++) { + if (validrace(flags.initrole, i)) { + n++; + k = i; + } + } + } + + /* Permit the user to pick, if there is more than one */ + if (n > 1) { + win = create_nhwindow(NHW_MENU); + start_menu(win); + any.a_void = 0; /* zero out all bits */ + for (i = 0; races[i].noun; i++) + if (ok_race(flags.initrole, i, flags.initgend, + flags.initalign)) { + any.a_int = i+1; /* must be non-zero */ + add_menu(win, NO_GLYPH, &any, races[i].noun[0], + 0, ATR_NONE, races[i].noun, MENU_UNSELECTED); + } + any.a_int = pick_race(flags.initrole, flags.initgend, + flags.initalign, PICK_RANDOM)+1; + if (any.a_int == 0) /* must be non-zero */ + any.a_int = randrace(flags.initrole)+1; + add_menu(win, NO_GLYPH, &any , '*', 0, ATR_NONE, + "Random", MENU_UNSELECTED); + any.a_int = i+1; /* must be non-zero */ + add_menu(win, NO_GLYPH, &any , 'q', 0, ATR_NONE, + "Quit", MENU_UNSELECTED); + Sprintf(pbuf, "Pick the race of your %s", plbuf); + end_menu(win, pbuf); + n = select_menu(win, PICK_ONE, &selected); + destroy_nhwindow(win); + if (n != 1 || selected[0].item.a_int == any.a_int) + goto give_up; /* Selected quit */ + + k = selected[0].item.a_int - 1; + free((genericptr_t) selected), selected = 0; + } + flags.initrace = k; + } + (void) root_plselection_prompt(plbuf, QBUFSZ - 1, + flags.initrole, flags.initrace, flags.initgend, flags.initalign); + } + + /* Select a gender, if necessary */ + /* force compatibility with role/race, try for compatibility with + * pre-selected alignment */ + if (flags.initgend < 0 || !validgend(flags.initrole, flags.initrace, + flags.initgend)) { + /* pre-selected gender not valid */ + if (pick4u == 'y' || flags.initgend == ROLE_RANDOM || flags.randomall) { + flags.initgend = pick_gend(flags.initrole, flags.initrace, + flags.initalign, PICK_RANDOM); + if (flags.initgend < 0) { +/* lisp_putstr(BASE_WINDOW, 0, "Incompatible gender!"); */ + flags.initgend = randgend(flags.initrole, flags.initrace); + } + } else { /* pick4u == 'n' */ + /* Count the number of valid genders */ + n = 0; /* number valid */ + k = 0; /* valid gender */ + for (i = 0; i < ROLE_GENDERS; i++) { + if (ok_gend(flags.initrole, flags.initrace, i, + flags.initalign)) { + n++; + k = i; + } + } + if (n == 0) { + for (i = 0; i < ROLE_GENDERS; i++) { + if (validgend(flags.initrole, flags.initrace, i)) { + n++; + k = i; + } + } + } + + /* Permit the user to pick, if there is more than one */ + if (n > 1) { + win = create_nhwindow(NHW_MENU); + start_menu(win); + any.a_void = 0; /* zero out all bits */ + for (i = 0; i < ROLE_GENDERS; i++) + if (ok_gend(flags.initrole, flags.initrace, i, + flags.initalign)) { + any.a_int = i+1; + add_menu(win, NO_GLYPH, &any, genders[i].adj[0], + 0, ATR_NONE, genders[i].adj, MENU_UNSELECTED); + } + any.a_int = pick_gend(flags.initrole, flags.initrace, + flags.initalign, PICK_RANDOM)+1; + if (any.a_int == 0) /* must be non-zero */ + any.a_int = randgend(flags.initrole, flags.initrace)+1; + add_menu(win, NO_GLYPH, &any , '*', 0, ATR_NONE, + "Random", MENU_UNSELECTED); + any.a_int = i+1; /* must be non-zero */ + add_menu(win, NO_GLYPH, &any , 'q', 0, ATR_NONE, + "Quit", MENU_UNSELECTED); + Sprintf(pbuf, "Pick the gender of your %s", plbuf); + end_menu(win, pbuf); + n = select_menu(win, PICK_ONE, &selected); + destroy_nhwindow(win); + if (n != 1 || selected[0].item.a_int == any.a_int) + goto give_up; /* Selected quit */ + + k = selected[0].item.a_int - 1; + free((genericptr_t) selected), selected = 0; + } + flags.initgend = k; + } + (void) root_plselection_prompt(plbuf, QBUFSZ - 1, + flags.initrole, flags.initrace, flags.initgend, flags.initalign); + } + + /* Select an alignment, if necessary */ + /* force compatibility with role/race/gender */ + if (flags.initalign < 0 || !validalign(flags.initrole, flags.initrace, + flags.initalign)) { + /* pre-selected alignment not valid */ + if (pick4u == 'y' || flags.initalign == ROLE_RANDOM || flags.randomall) { + flags.initalign = pick_align(flags.initrole, flags.initrace, + flags.initgend, PICK_RANDOM); + if (flags.initalign < 0) { +/* lisp_putstr(BASE_WINDOW, 0, "Incompatible alignment!"); */ + flags.initalign = randalign(flags.initrole, flags.initrace); + } + } else { /* pick4u == 'n' */ + /* Count the number of valid alignments */ + n = 0; /* number valid */ + k = 0; /* valid alignment */ + for (i = 0; i < ROLE_ALIGNS; i++) { + if (ok_align(flags.initrole, flags.initrace, flags.initgend, + i)) { + n++; + k = i; + } + } + if (n == 0) { + for (i = 0; i < ROLE_ALIGNS; i++) { + if (validalign(flags.initrole, flags.initrace, i)) { + n++; + k = i; + } + } + } + + /* Permit the user to pick, if there is more than one */ + if (n > 1) { + win = create_nhwindow(NHW_MENU); + start_menu(win); + any.a_void = 0; /* zero out all bits */ + for (i = 0; i < ROLE_ALIGNS; i++) + if (ok_align(flags.initrole, flags.initrace, + flags.initgend, i)) { + any.a_int = i+1; + add_menu(win, NO_GLYPH, &any, aligns[i].adj[0], + 0, ATR_NONE, aligns[i].adj, MENU_UNSELECTED); + } + any.a_int = pick_align(flags.initrole, flags.initrace, + flags.initgend, PICK_RANDOM)+1; + if (any.a_int == 0) /* must be non-zero */ + any.a_int = randalign(flags.initrole, flags.initrace)+1; + add_menu(win, NO_GLYPH, &any , '*', 0, ATR_NONE, + "Random", MENU_UNSELECTED); + any.a_int = i+1; /* must be non-zero */ + add_menu(win, NO_GLYPH, &any , 'q', 0, ATR_NONE, + "Quit", MENU_UNSELECTED); + Sprintf(pbuf, "Pick the alignment of your %s", plbuf); + end_menu(win, pbuf); + n = select_menu(win, PICK_ONE, &selected); + destroy_nhwindow(win); + if (n != 1 || selected[0].item.a_int == any.a_int) + goto give_up; /* Selected quit */ + + k = selected[0].item.a_int - 1; + free((genericptr_t) selected), selected = 0; + } + flags.initalign = k; + } + } + /* Success! */ +/* lisp_display_nhwindow(BASE_WINDOW, FALSE); */ +} + +/* Reads from standard in, the player's name. */ +void +lisp_askname () +{ + char *line; + lisp_cmd ("askname",); + read_string ("string", &line); + strncpy (plname, line, PL_NSIZ); + plname[PL_NSIZ-1] = '\0'; + free (line); +} + +/* This is a noop for tty and X, so should it be a noop for us too? */ +void +lisp_get_nh_event () +{ +/* lisp_cmd ("get-event",); */ +} + +/* Global Functions */ +void +lisp_raw_print(str) + const char *str; +{ + lisp_cmd ("raw-print", lisp_string (str)); +} + +void +lisp_raw_print_bold(str) + const char *str; +{ + lisp_cmd ("raw-print-bold", lisp_string (str)); +} + +void +lisp_curs(window, x, y) + winid window; + int x, y; +{ + if (window == WIN_MAP) + lisp_cmd ("curs", + lisp_int (x); + lisp_int (y)); + else if (window == WIN_STATUS) + { + /* do nothing */ + } + else + lisp_cmd ("error", lisp_string("lisp_curs bad window"); lisp_int (window)); +} + +/* Send the options to the lisp process */ +static void +get_options() +{ + lisp_cmd ("options", + lisp_boolean(iflags.cbreak); /* in cbreak mode, rogue format */ + lisp_boolean(iflags.DECgraphics); /* use DEC VT-xxx extended character set */ + lisp_boolean(iflags.echo); /* 1 to echo characters */ + lisp_boolean(iflags.IBMgraphics); /* use IBM extended character set */ + lisp_int(iflags.msg_history); /* hint: # of top lines to save */ + lisp_boolean(iflags.num_pad); /* use numbers for movement commands */ + lisp_boolean(iflags.news); /* print news */ + lisp_boolean(iflags.window_inited); /* true if init_nhwindows() completed */ + lisp_boolean(iflags.vision_inited); /* true if vision is ready */ + lisp_boolean(iflags.menu_tab_sep); /* Use tabs to separate option menu fields */ + lisp_boolean(iflags.menu_requested); /* Flag for overloaded use of 'm' prefix + * on some non-move commands */ + lisp_int(iflags.num_pad_mode); + lisp_int(iflags.purge_monsters); /* # of dead monsters still on fmon list */ +/* lisp_int(*iflags.opt_booldup); /\* for duplication of boolean opts in config file *\/ */ +/* lisp_int(*iflags.opt_compdup); /\* for duplication of compound opts in config file *\/ */ + lisp_int(iflags.bouldersym); /* symbol for boulder display */ + lisp_coord(iflags.travelcc); /* coordinates for travel_cache */ +#ifdef WIZARD + lisp_boolean(iflags.sanity_check); /* run sanity checks */ + lisp_boolean(iflags.mon_polycontrol); /* debug: control monster polymorphs */ +#endif + ); +} + +static void +generate_status_line () +{ + /* Ripped from botl.c */ + int hp, hpmax; + + hp = Upolyd ? u.mh : u.uhp; + hpmax = Upolyd ? u.mhmax : u.uhpmax; + if(hp < 0) hp = 0; + + printf ("(nhapi-update-status "); + lisp_quote; + printf ("("); + lisp_list (lisp_string ("name"); + lisp_string (plname);); + if (Upolyd) + { + char mbot[BUFSZ]; + int k = 0; + + lisp_list (lisp_string ("rank"); + lisp_nil); + lisp_list (lisp_string ("monster"); + lisp_string (mons[u.umonnum].mname)); + } + else + { + lisp_list (lisp_string ("rank"); + lisp_string (rank_of(u.ulevel, Role_switch, flags.female)););; + lisp_list (lisp_string ("monster"); + lisp_nil); + } + + lisp_list (lisp_string ("St"); + lisp_int (ACURR(A_STR));); + lisp_list (lisp_string ("Dx"); + lisp_int (ACURR(A_DEX));); + lisp_list (lisp_string ("Co"); + lisp_int (ACURR(A_CON));); + lisp_list (lisp_string ("In"); + lisp_int (ACURR(A_INT));); + lisp_list (lisp_string ("Wi"); + lisp_int (ACURR(A_WIS));); + lisp_list (lisp_string ("Ch"); + lisp_int (ACURR(A_CHA));); + lisp_list (lisp_string ("Align"); + if (u.ualign.type == A_CHAOTIC) + lisp_string ("Chaotic"); + else if (u.ualign.type == A_NEUTRAL) + lisp_string ("Neutral"); + else + lisp_string ("Lawful");); + +#ifdef SCORE_ON_BOTL + lisp_list (lisp_string ("Score"); + lisp_int (botl_score());); +#endif + + if (In_endgame(&u.uz)) + { + lisp_list (lisp_string ("Dungeon"); + if (Is_astralevel(&u.uz)) + lisp_string ("Astral Plane"); + else + lisp_string ("End Game");); + } + else + { + lisp_list (lisp_string ("Dungeon"); + lisp_string (dungeons[u.uz.dnum].dname);); + } + + lisp_list (lisp_string ("Dlvl"); + lisp_int (depth(&u.uz));); + + lisp_list (lisp_string ("$"); + lisp_int (u.ugold);); + lisp_list (lisp_string ("HP"); + lisp_int (hp);); + lisp_list (lisp_string ("HPmax"); + lisp_int (hpmax);); + lisp_list (lisp_string ("PW"); + lisp_int (u.uen);); + lisp_list (lisp_string ("PWmax"); + lisp_int (u.uenmax);); + lisp_list (lisp_string ("AC"); + lisp_int (u.uac);); + + if (Upolyd) + { + lisp_list (lisp_string ("HD"); + lisp_int (mons[u.umonnum].mlevel);); + } + else + { + lisp_list (lisp_string ("HD"); + lisp_nil); + } + + lisp_list (lisp_string ("Level"); + lisp_int (u.ulevel);); +#ifdef EXP_ON_BOTL + lisp_list (lisp_string ("XP"); + lisp_int (u.uexp);); +#endif + lisp_list (lisp_string ("T"); + lisp_int (moves);); + + if (Confusion) + lisp_list (lisp_string ("confusion"); lisp_string ("Conf")); + else + lisp_list (lisp_string ("confusion"); lisp_nil); + + if (u.uhs != 1) + lisp_list (lisp_string ("hunger"); lisp_string (hunger_stat[u.uhs])); + else + lisp_list (lisp_string ("hunger"); lisp_nil); + + if (Sick) + { + if (u.usick_type & SICK_VOMITABLE) + lisp_list (lisp_string ("sick"); lisp_string ("FoodPois")); + if (u.usick_type & SICK_NONVOMITABLE) + lisp_list (lisp_string ("sick"); lisp_string ("Ill")); + } + else + lisp_list (lisp_string ("sick"); lisp_nil); + + if (Blind) + lisp_list (lisp_string ("blind"); lisp_string ("Blind")); + else + lisp_list (lisp_string ("blind"); lisp_nil); + + if (Stunned) + lisp_list (lisp_string ("stunned"); lisp_string ("Stun")); + else + lisp_list (lisp_string ("stunned"); lisp_nil); + + if (Hallucination) + lisp_list (lisp_string ("hallucination"); lisp_string ("Hallu")); + else + lisp_list (lisp_string ("hallucination"); lisp_nil); + + if (Slimed) + lisp_list (lisp_string ("slimed"); lisp_string ("Slime")); + else + lisp_list (lisp_string ("slimed"); lisp_nil); + + if (near_capacity() > UNENCUMBERED) + lisp_list (lisp_string ("encumbrance"); + lisp_string (enc_stat[near_capacity()])); + else + lisp_list (lisp_string ("encumbrance"); lisp_nil); + + printf (" ))\n"); +} + +void +lisp_putstr(window, attr, str) + winid window; + int attr; + const char *str; +{ + static char statline1[BUFSZ] = ""; + if (window == WIN_STATUS) + { + if (statline1[0]=='\0') + Strcpy (statline1, str); + else + { + generate_status_line (); + statline1[0]='\0'; + } + } + else if (window == WIN_MESSAGE) + lisp_cmd ("message", + lisp_literal (attr_to_string (attr)); + lisp_string (str)); + else + lisp_cmd ("menu-putstr", + lisp_int (window); + lisp_literal (attr_to_string (attr)); + lisp_string (str)); +} + +void +lisp_start_menu(window) + winid window; +{ + lisp_menu_list_num = 0; + lisp_current_accelerator = 'a'; + lisp_cmd ("start-menu", lisp_int (window)); +} + +void +lisp_add_menu(window, glyph, identifier, ch, gch, attr, str, preselected) + winid window; /* window to use, must be of type NHW_MENU */ + int glyph; /* glyph to display with item (unused) */ + const anything *identifier; /* what to return if selected */ + char ch; /* keyboard accelerator (0 = pick our own) */ + char gch; /* group accelerator (0 = no group) */ + int attr; /* attribute for string (like tty_putstr()) */ + const char *str; /* menu string */ + boolean preselected; /* item is marked as selected */ +{ + if (identifier->a_void) + { + lisp_menu_item_list[lisp_menu_list_num].identifier = *identifier; + if (ch == 0) + { + ch = lisp_menu_item_list[lisp_menu_list_num].accelerator = lisp_current_accelerator; + if (lisp_current_accelerator == 'z') + lisp_current_accelerator = 'A'; + else + lisp_current_accelerator++; + } + else + lisp_menu_item_list[lisp_menu_list_num].accelerator = ch; + + lisp_menu_list_num++; + } + else + ch = -1; + + lisp_cmd ("add-menu", + lisp_int (window); + lisp_int (glyph); + lisp_int (glyph2tile[glyph]); + lisp_int (ch); + lisp_int (gch); + lisp_literal (attr_to_string (attr)); + lisp_string (str); + preselected ? lisp_t : lisp_nil); +} + +void +lisp_end_menu(window, prompt) + winid window; /* menu to use */ + const char *prompt; /* prompt to for menu */ +{ + lisp_cmd ("end-menu", + lisp_int (window); + lisp_string (prompt)); +} + +static int +lisp_get_menu_identifier(ch, identifier) + char ch; + anything *identifier; +{ + int i; + + for(i=0; i < lisp_menu_list_num; i++) + { + if( lisp_menu_item_list[i].accelerator == ch ) + { + *identifier = lisp_menu_item_list[i].identifier; + return 1; + } + } + + return 0; +} + +int +lisp_select_menu(window, how, menu_list) + winid window; + int how; + menu_item **menu_list; +{ + const char *delim = "() \n"; + char *list; + char *token; + int size = 0; + int toggle; + + lisp_cmd ("select-menu", + lisp_int (window); + lisp_literal (how_to_string (how))); + + read_string ("menu", &list); + +/* lisp_prompt ("menu"); */ +/* fgets (list, LINESIZ, stdin); */ + + /* The client should submit a structure like this: + + ((ch count) (ch count) (ch count) ...) + + where ch is the accelerator for the menu item and count is the + number of them to select. + + We strtok it so we just get id count id count id count. */ + + token = strtok (list, delim); + + /* Start with some memory so realloc doesn't fail. */ + *menu_list = malloc (sizeof (menu_item)); + if (*menu_list == NULL) + { + panic ("Memory allocation failure; cannot get %u bytes", + sizeof (menu_item)); + } + size = 0; + + while (token != NULL) + { + /* Make more room in the array for the new item */ + size++; + if ((*menu_list = realloc (*menu_list, size * sizeof (menu_item))) == NULL) + { + panic ("Memory allocation failure; cannot get %u bytes", + size * sizeof (menu_item)); + } + + /* assign the item ID */ + lisp_get_menu_identifier (atoi (token), &(*menu_list)[size-1].item ); + + /* Read the item count */ + token = strtok (NULL, delim); + (*menu_list)[size-1].count = atoi (token); + + /* read the next item ID */ + token = strtok (NULL, delim); + } + + free (list); + + return size; +} + +/* This is a tty-specific hack. Do we need it? */ +char +lisp_message_menu(let, how, mesg) + char let; + int how; + const char *mesg; +{ + lisp_cmd ("message-menu", + lisp_int (let); + lisp_literal (how_to_string (how)); + lisp_string (mesg)); + return '\0'; +} + +static int +lisp_get_cmd(str) + const char *str; +{ + int i; + + for (i=0; cmd_index[i].name != (char *)0; i++) + { + if (!strcmp (str, cmd_index[i].name)) + return i; + } + + return -1; +} + +static int +lisp_get_ext_cmd_id (str) + const char *str; +{ + int i; + + for (i=0; extcmdlist[i].ef_txt != (char *)0; i++) { + if (!strcmp (str, extcmdlist[i].ef_txt)) return i; + } + + return -1; +} + +/* static int */ +/* num_digits(n) */ +/* int n; */ +/* { */ +/* int i; */ +/* int ret = 1; */ + +/* for (i=10;n / i; i *= 10) */ +/* { */ +/* ret++; */ +/* } */ + +/* return ret; */ +/* } */ + +/* static */ +/* int */ +/* power_of_ten (n) */ +/* int n; */ +/* { */ +/* int i; */ +/* int power = 1; */ + +/* for (i=0; i= 0) + { + cmd = count_cmd; + count_cmd = -1; + } + else + { + char cmdstr[BUFSZ]; + int nh_cmd = 0; + + while (!nh_cmd) + { + read_command ("command", cmdstr, count_buf); + + count_pos = count_buf; + cmd = lisp_get_cmd (cmdstr); + if (cmd == -1) + { + printf ("(nhapi-message 'atr-none \"undefined-command %s\")\n", cmdstr); + } + else if (cmd_index[cmd].type == CMD_LISP) + { + /* We have to handle Lisp commands in this inner loop, because + they don't interact with the nethack layer. */ + /* FIXME: Maybe this should go in an array? */ + if (!strcmp(cmd_index[cmd].name, "options")) + { + get_options(); + } + } else { + /* We have a nh command. */ + nh_cmd = 1; + } + } + + if (atoi (count_pos) > 1) + { + char* tmp = count_pos; + count_pos++; + count_cmd = cmd; + return *tmp; + } + else + { + /* Since the count is 1, zero out the string. */ + *count_pos = 0; + } + } + + if (cmd_index[cmd].type == CMD_KEY) + { + return cmd_index[cmd].cmd; + } + else if (cmd_index[cmd].type == CMD_EXT) + { + if ((extended_cmd_id = lisp_get_ext_cmd_id (cmd_index[cmd].name)) == -1) + { + /* Can never happen. */ + printf ("%s:%d: Bad extended command name\n", __FILE__, __LINE__); + } + return '#'; + } + else + { + impossible ("Impossible command type: %d", cmd_index[cmd].type); + } +} + +int +lisp_nh_poskey(x, y, mod) + int *x, *y, *mod; +{ +/* char scratch[256]; */ + +/* printf ("(nethack-api-poskey)\n"); */ + +/* scanf ("( %d %d '%255s )", x, y, scratch); */ +/* if (!strcmp (scratch, "click-1")) *mod = CLICK_1; */ +/* else *mod = CLICK_2; */ + +/* return 0; */ + + return lisp_nhgetch(); +} + +static boolean inven_win_created = FALSE; + +/* These globals are used to keep track of window IDs. */ +static winid *winid_list = NULL; +static int winid_list_len = 0; +static int winid_list_max = 0; + +/* returns index into winid_list that can be used. */ +static int +find_empty_cell () +{ + int i; + + /* Check for a vacant spot in the list. */ + for (i=0; i= winid_list_max) + { + winid_list_max *= 2; + winid_list = realloc (winid_list, sizeof (int) * winid_list_max); + if (winid_list == NULL) + bail ("Out of memory\n"); + } + winid_list_len++; + + return winid_list_len-1; +} + +static int +winid_is_taken (winid n) +{ + int i; + + for (i=0; i Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Common config.h for all binary packages. --- include/config.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) --- a/include/config.h +++ b/include/config.h @@ -42,12 +42,19 @@ * Define all of those you want supported in your binary. * Some combinations make no sense. See the installation document. */ + +#ifndef LISP_GRAPHICS #define TTY_GRAPHICS /* good old tty based graphics */ /* #define X11_GRAPHICS */ /* X11 interface */ /* #define QT_GRAPHICS */ /* Qt interface */ /* #define GNOME_GRAPHICS */ /* Gnome interface */ /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ +/* Debian default window system is always tty; they have to set their + * own if they want another one (or just use the scripts */ +#define DEFAULT_WINDOW_SYS "tty" +#endif + /* * Define the default window system. This should be one that is compiled * into your system (see defines above). Known window systems are: @@ -83,11 +90,7 @@ #endif #ifdef QT_GRAPHICS -# define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */ # define USER_SOUNDS /* Use sounds */ -# ifndef __APPLE__ -# define USER_SOUNDS_REGEX -# endif # define USE_XPM /* Use XPM format for images (required) */ # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ # ifndef DEFAULT_WINDOW_SYS @@ -126,7 +129,7 @@ * would allow: * xpmtoppm x11tiles_big.xpm */ -/* # define USE_XPM */ /* Disable if you do not have the XPM library */ +# define USE_XPM /* Disable if you do not have the XPM library */ # ifdef USE_XPM # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ # endif @@ -143,16 +146,15 @@ #ifndef WIZARD /* allow for compile-time or Makefile changes */ # ifndef KR1ED -# define WIZARD "wizard" /* the person allowed to use the -D option */ +# define WIZARD "root" /* the person allowed to use the -D option */ # else # define WIZARD -# define WIZARD_NAME "wizard" +# define WIZARD_NAME "root" # endif #endif #define LOGFILE "logfile" /* larger file for debugging purposes */ #define NEWS "news" /* the file containing the latest hack news */ -#define PANICLOG "paniclog" /* log of panic and impossible events */ /* * If COMPRESS is defined, it should contain the full path name of your @@ -169,11 +171,8 @@ #ifdef UNIX /* path and file name extension for compression program */ -#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ -#define COMPRESS_EXTENSION ".Z" /* compress's extension */ -/* An example of one alternative you might want to use: */ -/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ -/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ +#define COMPRESS "/bin/gzip" /* FSF gzip compression */ +#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */ #endif #ifndef COMPRESS @@ -185,7 +184,7 @@ * a tar-like file, thus making a neater installation. See *conf.h * for detailed configuration. */ -/* #define DLB */ /* not supported on all platforms */ +#define DLB /* not supported on all platforms */ /* * Defining INSURANCE slows down level changes, but allows games that @@ -204,7 +203,7 @@ * otherwise it will be the current directory. */ # ifndef HACKDIR -# define HACKDIR "/usr/games/lib/nethackdir" +# define HACKDIR "/usr/lib/games/nethack" # endif /* @@ -214,7 +213,9 @@ * since the user might create files in a directory of his choice. * Of course SECURE is meaningful only if HACKDIR is defined. */ -/* #define SECURE */ /* do setuid(getuid()) after chdir() */ +#define SECURE /* do setuid(getuid()) after chdir() */ +#define PIXMAPDIR "/usr/share/pixmaps/nethack/" +#define SIMPLE_MAIL /* * If it is desirable to limit the number of people that can play Hack @@ -338,6 +339,7 @@ #endif #define EXP_ON_BOTL /* Show experience on bottom line */ +#define PARANOID /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ /* @@ -349,7 +351,7 @@ */ /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ -/*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */ +#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ /* End of Section 5 */ debian/patches/0013-93_enh_dump.dpatch-by-Tom-Friedetzky-Jukka-Lahtinen-.patch0000644000000000000000000013443511765325416023762 0ustar From b64e2bc3f3e5b1dae2d7b091fee4182c7f719bed Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: =?UTF-8?q?93=5Fenh=5Fdump.dpatch=20by=20Tom=20Friedetzky,=20Jukka=20?= =?UTF-8?q?Lahtinen,=20Darshan=20Shaligram=0ADump=20patch=20by=20Jukka=20Lah?= =?UTF-8?q?tinen.?= --- dat/opthelp | 3 + doc/Guidebook.mn | 6 + doc/Guidebook.tex | 7 + doc/Guidebook.txt | 7 + include/config.h | 2 + include/decl.h | 3 + include/extern.h | 21 +++ src/botl.c | 30 +++++ src/cmd.c | 387 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/decl.c | 9 ++ src/display.c | 100 ++++++++++++++ src/end.c | 230 +++++++++++++++++++++++++++++-- src/invent.c | 73 +++++++++- src/options.c | 25 ++++ src/spell.c | 29 ++++ src/topten.c | 47 ++++++- src/weapon.c | 68 ++++++++++ win/tty/wintty.c | 4 +- 18 files changed, 1031 insertions(+), 20 deletions(-) --- a/dat/opthelp +++ b/dat/opthelp @@ -101,6 +101,9 @@ boulder override the default boulder symbol with another default: [`] disclose the types of information you want offered at the end of the game [ni na nv ng nc] +dumpfile the name of the file where to dump the disclosure information + when the game ends (only if the patch has been compiled in) + [none] fruit the name of a fruit you enjoy eating [slime mold] (basically a whimsy which NetHack uses from time to time). menustyle user interface for selection of multiple objects: --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1770,6 +1770,12 @@ .lp dogname Name your starting dog (ex. ``dogname:Fang''). Cannot be set with the `O' command. +.lp dumpfile +The name of a file where the disclosure information is written when the +game ends. You may use the macro %n that will be replaced with the name +of your player character. The game must have write permissions to the +directory where the file is written. Normally /tmp may be used for unix +systems. .lp dungeon Set the graphics symbols for displaying the dungeon (default \&``\ |--------||.-|++##.##<><>_|\e\e#{}.}..##\ #}''). --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2209,6 +2209,13 @@ Name your starting dog (ex.\ ``{\tt dogname:Fang}''). Cannot be set with the `{\tt O}' command. %.lp +\item[\ib{dumpfile}] +The name of a file where the disclosure information is written when the +game ends. You may use the macro %n that will be replaced with the name +of your player character. The game must have write permissions to the +directory where the file is written. Normally /tmp may be used for unix +systems. +%.lp \item[\ib{dungeon}] Set the graphics symbols for displaying the dungeon (default ``\verb& |--------||.-|++##& \verb&.##<><>_|\\#{}.}..## #}&''). --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -2274,6 +2274,13 @@ Name your starting dog (ex. ``dogname:Fang''). Cannot be set with the `O' command. + dumpfile + The name of a file where the disclosure information is + written when the game ends. You may use the macro %n that + will be replaced with the name of your player character. + The game must have write permissions to the directory where + the file is written. Normally /tmp may be used for unixes. + dungeon Set the graphics symbols for displaying the dungeon (default `` |--------||.-|++##.##<><>_|\\#{}.}..## #}''). The dungeon --- a/include/config.h +++ b/include/config.h @@ -366,6 +366,8 @@ /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ #define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ +#define DUMP_LOG +#define DUMP_FN "/var/games/nethack/dumps/%n.lastgame.txt" /* End of Section 5 */ --- a/include/decl.h +++ b/include/decl.h @@ -184,6 +184,9 @@ E long done_money; #endif E char killer_buf[BUFSZ]; +#ifdef DUMP_LOG +E char dump_fn[]; /* dumpfile name (dump patch) */ +#endif E const char *configfile; E NEARDATA char plname[PL_NSIZ]; E NEARDATA char dogname[]; --- a/include/extern.h +++ b/include/extern.h @@ -131,6 +131,10 @@ E int FDECL(describe_level, (char *)); E const char *FDECL(rank_of, (int,SHORT_P,BOOLEAN_P)); E void NDECL(bot); +#ifdef DUMP_LOG +E void FDECL(bot1str, (char *)); +E void FDECL(bot2str, (char *)); +#endif /* ### cmd.c ### */ @@ -166,6 +170,10 @@ E int NDECL(extcmd_via_menu); E void FDECL(enlightenment, (int)); E void FDECL(show_conduct, (int)); +#ifdef DUMP_LOG +E void FDECL(dump_enlightenment, (int)); +E void FDECL(dump_conduct, (int)); +#endif E int FDECL(xytod, (SCHAR_P,SCHAR_P)); E void FDECL(dtoxy, (coord *,int)); E int FDECL(movecmd, (CHAR_P)); @@ -281,6 +289,9 @@ E void FDECL(row_refresh, (int,int,int)); E void NDECL(cls); E void FDECL(flush_screen, (int)); +#ifdef DUMP_LOG +E void NDECL(dump_screen); +#endif E int FDECL(back_to_glyph, (XCHAR_P,XCHAR_P)); E int FDECL(zapdir_to_glyph, (int,int,int)); E int FDECL(glyph_at, (XCHAR_P,XCHAR_P)); @@ -553,6 +564,10 @@ #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) E void FDECL(done, (int)); E void FDECL(container_contents, (struct obj *,BOOLEAN_P,BOOLEAN_P)); +#ifdef DUMP_LOG +E void FDECL(dump, (char *, char *)); +E void FDECL(do_containerconts, (struct obj *,BOOLEAN_P,BOOLEAN_P,BOOLEAN_P)); +#endif E void FDECL(terminate, (int)); E int NDECL(num_genocides); @@ -790,6 +805,9 @@ E char *FDECL(xprname, (struct obj *,const char *,CHAR_P,BOOLEAN_P,long,long)); E int NDECL(ddoinv); E char FDECL(display_inventory, (const char *,BOOLEAN_P)); +#ifdef DUMP_LOG +E char FDECL(dump_inventory, (const char *,BOOLEAN_P)); +#endif E int FDECL(display_binventory, (int,int,BOOLEAN_P)); E struct obj *FDECL(display_cinventory,(struct obj *)); E struct obj *FDECL(display_minventory,(struct monst *,int,char *)); @@ -2240,6 +2258,9 @@ E int NDECL(abon); E int NDECL(dbon); E int NDECL(enhance_weapon_skill); +#ifdef DUMP_LOG +E void NDECL(dump_weapon_skill); +#endif E void FDECL(unrestrict_weapon_skill, (int)); E void FDECL(use_skill, (int,int)); E void FDECL(add_weapon_skill, (int)); --- a/src/botl.c +++ b/src/botl.c @@ -166,10 +166,16 @@ } #endif +#ifdef DUMP_LOG +void bot1str(char *newbot1) +#else STATIC_OVL void bot1() +#endif { +#ifndef DUMP_LOG char newbot1[MAXCO]; +#endif register char *nb; register int i,j; @@ -216,6 +222,15 @@ if (flags.showscore) Sprintf(nb = eos(nb), " S:%ld", botl_score()); #endif +#ifdef DUMP_LOG +} +STATIC_OVL void +bot1() +{ + char newbot1[MAXCO]; + + bot1str(newbot1); +#endif curs(WIN_STATUS, 1, 0); putstr(WIN_STATUS, 0, newbot1); } @@ -243,10 +258,17 @@ return ret; } +#ifdef DUMP_LOG +void bot2str(newbot2) +char* newbot2; +#else STATIC_OVL void bot2() +#endif { +#ifndef DUMP_LOG char newbot2[MAXCO]; +#endif register char *nb; int hp, hpmax; #if defined(HPMON) && !defined(LISP_GRAPHICS) @@ -338,6 +360,14 @@ if(Slimed) Sprintf(nb = eos(nb), " Slime"); if(cap > UNENCUMBERED) Sprintf(nb = eos(nb), " %s", enc_stat[cap]); +#ifdef DUMP_LOG +} +STATIC_OVL void +bot2() +{ + char newbot2[MAXCO]; + bot2str(newbot2); +#endif curs(WIN_STATUS, 1, 1); putstr(WIN_STATUS, 0, newbot2); } --- a/src/cmd.c +++ b/src/cmd.c @@ -1126,6 +1126,300 @@ return; } +#ifdef DUMP_LOG +void +dump_enlightenment(final) +int final; +{ + int ltmp; + char buf[BUFSZ]; + char buf2[BUFSZ]; + char *youwere = " You were "; + char *youhave = " You have "; + char *youhad = " You had "; + char *youcould = " You could "; + + dump("", "Final attributes"); + +#ifdef ELBERETH + if (u.uevent.uhand_of_elbereth) { + static const char * const hofe_titles[3] = { + "the Hand of Elbereth", + "the Envoy of Balance", + "the Glory of Arioch" + }; + dump(youwere, + (char *)hofe_titles[u.uevent.uhand_of_elbereth - 1]); + } +#endif + + if (u.ualign.record >= 20) + dump(youwere, "piously aligned"); + else if (u.ualign.record > 13) + dump(youwere, "devoutly aligned"); + else if (u.ualign.record > 8) + dump(youwere, "fervently aligned"); + else if (u.ualign.record > 3) + dump(youwere, "stridently aligned"); + else if (u.ualign.record == 3) + dump(youwere, "aligned"); + else if (u.ualign.record > 0) + dump(youwere, "haltingly aligned"); + else if (u.ualign.record == 0) + dump(youwere, "nominally aligned"); + else if (u.ualign.record >= -3) dump(youhave, "strayed"); + else if (u.ualign.record >= -8) dump(youhave, "sinned"); + else dump(" You have ", "transgressed"); +#ifdef WIZARD + if (wizard) { + Sprintf(buf, " %d", u.ualign.record); + dump(" Your alignment was ", buf); + } +#endif + + /*** Resistances to troubles ***/ + if (Fire_resistance) dump(youwere, "fire resistant"); + if (Cold_resistance) dump(youwere, "cold resistant"); + if (Sleep_resistance) dump(youwere, "sleep resistant"); + if (Disint_resistance) dump(youwere, "disintegration-resistant"); + if (Shock_resistance) dump(youwere, "shock resistant"); + if (Poison_resistance) dump(youwere, "poison resistant"); + if (Drain_resistance) dump(youwere, "level-drain resistant"); + if (Sick_resistance) dump(youwere, "immune to sickness"); + if (Antimagic) dump(youwere, "magic-protected"); + if (Acid_resistance) dump(youwere, "acid resistant"); + if (Stone_resistance) dump(youwere, "petrification resistant"); + if (Invulnerable) dump(youwere, "invulnerable"); + if (u.uedibility) dump(youcould, "recognize detrimental food"); + + /*** Troubles ***/ + if (Halluc_resistance) dump(" ", "You resisted hallucinations"); + if (Hallucination) dump(youwere, "hallucinating"); + if (Stunned) dump(youwere, "stunned"); + if (Confusion) dump(youwere, "confused"); + if (Blinded) dump(youwere, "blinded"); + if (Sick) { + if (u.usick_type & SICK_VOMITABLE) + dump(youwere, "sick from food poisoning"); + if (u.usick_type & SICK_NONVOMITABLE) + dump(youwere, "sick from illness"); + } + if (Stoned) dump(youwere, "turning to stone"); + if (Slimed) dump(youwere, "turning into slime"); + if (Strangled) + dump(youwere, (u.uburied) ? "buried" : "being strangled"); + if (Glib) { + Sprintf(buf, "slippery %s", makeplural(body_part(FINGER))); + dump(youhad, buf); + } + if (Fumbling) dump(" ", "You fumbled"); + if (Wounded_legs +#ifdef STEED + && !u.usteed +#endif + ) { + Sprintf(buf, "wounded %s", makeplural(body_part(LEG))); + dump(youhad, buf); + } +#ifdef STEED + if (Wounded_legs && u.usteed) { + Strcpy(buf, x_monnam(u.usteed, ARTICLE_YOUR, (char *)0, + SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION, FALSE)); + *buf = highc(*buf); + Strcat(buf, " had wounded legs"); + dump(" ", buf); + } +#endif + if (Sleeping) dump(" ", "You fell asleep"); + if (Hunger) dump(" ", "You hungered rapidly"); + + /*** Vision and senses ***/ + if (See_invisible) dump(" ", "You saw invisible"); + if (Blind_telepat) dump(youwere, "telepathic"); + if (Warning) dump(youwere, "warned"); + if (Warn_of_mon && flags.warntype) { + Sprintf(buf, "aware of the presence of %s", + (flags.warntype & M2_ORC) ? "orcs" : + (flags.warntype & M2_DEMON) ? "demons" : + something); + dump(youwere, buf); + } + if (Undead_warning) dump(youwere, "warned of undead"); + if (Searching) dump(youhad, "automatic searching"); + if (Clairvoyant) dump(youwere, "clairvoyant"); + if (Infravision) dump(youhad, "infravision"); + if (Detect_monsters) + dump(youwere, "sensing the presence of monsters"); + if (u.umconf) dump(youwere, "going to confuse monsters"); + + /*** Appearance and behavior ***/ + if (Adornment) { + int adorn = 0; + if(uleft && uleft->otyp == RIN_ADORNMENT) adorn += uleft->spe; + if(uright && uright->otyp == RIN_ADORNMENT) adorn += uright->spe; + if (adorn < 0) + dump(youwere, "poorly adorned"); + else + dump(youwere, "adorned"); + } + if (Invisible) dump(youwere, "invisible"); + else if (Invis) dump(youwere, "invisible to others"); + /* ordinarily "visible" is redundant; this is a special case for + the situation when invisibility would be an expected attribute */ + else if ((HInvis || EInvis || pm_invisible(youmonst.data)) && BInvis) + dump(youwere, "visible"); + if (Displaced) dump(youwere, "displaced"); + if (Stealth) dump(youwere, "stealthy"); + if (Aggravate_monster) dump(" ", "You aggravated monsters"); + if (Conflict) dump(" ", "You caused conflict"); + + /*** Transportation ***/ + if (Jumping) dump(youcould, "jump"); + if (Teleportation) dump(youcould, "teleport"); + if (Teleport_control) dump(youhad, "teleport control"); + if (Lev_at_will) dump(youwere, "levitating, at will"); + else if (Levitation) + dump(youwere, "levitating"); /* without control */ + else if (Flying) dump(youcould, "fly"); + if (Wwalking) dump(youcould, "walk on water"); + if (Swimming) dump(youcould, "swim"); + if (Breathless) dump(youcould, "survive without air"); + else if (Amphibious) dump(youcould, "breathe water"); + if (Passes_walls) dump(youcould, "walk through walls"); +#ifdef STEED + if (u.usteed && (final < 2 || strcmp(killer, "riding accident"))) { + Sprintf(buf, "riding %s", y_monnam(u.usteed)); + dump(youwere, buf); + } +#endif + if (u.uswallow) { + Sprintf(buf, "swallowed by %s", a_monnam(u.ustuck)); +#ifdef WIZARD + if (wizard) Sprintf(eos(buf), " (%u)", u.uswldtim); +#endif + dump(youwere, buf); + } else if (u.ustuck) { + Sprintf(buf, "%s %s", + (Upolyd && sticks(youmonst.data)) ? "holding" : "held by", + a_monnam(u.ustuck)); + dump(youwere, buf); + } + + /*** Physical attributes ***/ + if (u.uhitinc) + dump(youhad, + enlght_combatinc("to hit", u.uhitinc, final, buf)); + if (u.udaminc) + dump(youhad, + enlght_combatinc("damage", u.udaminc, final, buf)); + if (Slow_digestion) dump(youhad, "slower digestion"); + if (Regeneration) dump(" ", "You regenerated"); + if (u.uspellprot || Protection) { + int prot = 0; + + if(uleft && uleft->otyp == RIN_PROTECTION) prot += uleft->spe; + if(uright && uright->otyp == RIN_PROTECTION) prot += uright->spe; + if (HProtection & INTRINSIC) prot += u.ublessed; + prot += u.uspellprot; + + if (prot < 0) + dump(youwere, "ineffectively protected"); + else + dump(youwere, "protected"); + } + if (Protection_from_shape_changers) + dump(youwere, "protected from shape changers"); + if (Polymorph) dump(youwere, "polymorphing"); + if (Polymorph_control) dump(youhad, "polymorph control"); + if (u.ulycn >= LOW_PM) { + Strcpy(buf, an(mons[u.ulycn].mname)); + dump(youwere, buf); + } + if (Upolyd) { + if (u.umonnum == u.ulycn) Strcpy(buf, "in beast form"); + else Sprintf(buf, "polymorphed into %s", + an(youmonst.data->mname)); +#ifdef WIZARD + if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone); +#endif + dump(youwere, buf); + } + if (Unchanging) + dump(youcould, "not change from your current form"); + if (Fast) dump(youwere, Very_fast ? "very fast" : "fast"); + if (Reflecting) dump(youhad, "reflection"); + if (Free_action) dump(youhad, "free action"); + if (Fixed_abil) dump(youhad, "fixed abilities"); + if (Lifesaved) + dump(" ", "Your life would have been saved"); + if (u.twoweap) dump(youwere, "wielding two weapons at once"); + + /*** Miscellany ***/ + if (Luck) { + ltmp = abs((int)Luck); + Sprintf(buf, "%s%slucky (%d)", + ltmp >= 10 ? "extremely " : ltmp >= 5 ? "very " : "", + Luck < 0 ? "un" : "", Luck); + dump(youwere, buf); + } +#ifdef WIZARD + else if (wizard) dump(" ", "Your luck was zero"); +#endif + if (u.moreluck > 0) dump(youhad, "extra luck"); + else if (u.moreluck < 0) dump(youhad, "reduced luck"); + if (carrying(LUCKSTONE) || stone_luck(TRUE)) { + ltmp = stone_luck(FALSE); + if (ltmp <= 0) + dump(" ", "Bad luck did not time out for you"); + if (ltmp >= 0) + dump(" ", "Good luck did not time out for you"); + } + + if (u.ugangr) { + Sprintf(buf, " %sangry with you", + u.ugangr > 6 ? "extremely " : u.ugangr > 3 ? "very " : ""); +#ifdef WIZARD + if (wizard) Sprintf(eos(buf), " (%d)", u.ugangr); +#endif + Sprintf(buf2, "%s was %s", u_gname(), buf); + dump(" ", buf2); + } + + { + const char *p; + + buf[0] = '\0'; + if (final < 2) { /* quit/escaped/ascended */ + p = "survived after being killed "; + switch (u.umortality) { + case 0: p = "survived"; break; + case 1: Strcpy(buf, "once"); break; + case 2: Strcpy(buf, "twice"); break; + case 3: Strcpy(buf, "thrice"); break; + default: Sprintf(buf, "%d times", u.umortality); + break; + } + } else { /* game ended in character's death */ + p = "are dead"; + switch (u.umortality) { + case 0: impossible("dead without dying?"); + case 1: break; /* just "are dead" */ + default: Sprintf(buf, " (%d%s time!)", u.umortality, + ordin(u.umortality)); + break; + } + } + if (p) { + Sprintf(buf2, "You %s %s", p, buf); + dump(" ", buf2); + } + } + dump("", ""); + return; + +} /* dump_enlightenment */ +#endif + /* * Courtesy function for non-debug, non-explorer mode players * to help refresh them about who/what they are. @@ -1341,6 +1635,99 @@ destroy_nhwindow(en_win); } +#ifdef DUMP_LOG +void +dump_conduct(final) +int final; +{ + char buf[BUFSZ]; + int ngenocided; + + dump("", "Voluntary challenges"); + + if (!u.uconduct.food) + dump("", " You went without food"); + /* But beverages are okay */ + else if (!u.uconduct.unvegan) + dump("", " You followed a strict vegan diet"); + else if (!u.uconduct.unvegetarian) + dump("", " You were a vegetarian"); + else if (Role_if(PM_MONK) && u.uconduct.unvegetarian < 10) { + sprintf(buf, " You ate non-vegetarian food %ld time%s.", + u.uconduct.unvegetarian, plur(u.uconduct.unvegetarian)); + dump("", buf); + } + + if (!u.uconduct.gnostic) + dump("", " You were an atheist"); + + if (!u.uconduct.weaphit) + dump("", " You never hit with a wielded weapon"); + else if (Role_if(PM_MONK) && u.uconduct.weaphit < 10) { + Sprintf(buf, " You hit with a wielded weapon %ld time%s", + u.uconduct.weaphit, plur(u.uconduct.weaphit)); + dump("", buf); + } +#ifdef WIZARD + else if (wizard) { + Sprintf(buf, "hit with a wielded weapon %ld time%s", + u.uconduct.weaphit, plur(u.uconduct.weaphit)); + dump(" You ", buf); + } +#endif + if (!u.uconduct.killer) + dump("", " You were a pacifist"); + + if (!u.uconduct.literate) + dump("", " You were illiterate"); +#ifdef WIZARD + else if (wizard) { + Sprintf(buf, "read items or engraved %ld time%s", + u.uconduct.literate, plur(u.uconduct.literate)); + dump(" You ", buf); + } +#endif + + ngenocided = num_genocides(); + if (ngenocided == 0) { + dump("", " You never genocided any monsters"); + } else { + Sprintf(buf, "genocided %d type%s of monster%s", + ngenocided, plur(ngenocided), plur(ngenocided)); + dump(" You ", buf); + } + + if (!u.uconduct.polypiles) + dump("", " You never polymorphed an object"); + else { + Sprintf(buf, "polymorphed %ld item%s", + u.uconduct.polypiles, plur(u.uconduct.polypiles)); + dump(" You ", buf); + } + + if (!u.uconduct.polyselfs) + dump("", " You never changed form"); + else { + Sprintf(buf, "changed form %ld time%s", + u.uconduct.polyselfs, plur(u.uconduct.polyselfs)); + dump(" You ", buf); + } + + if (!u.uconduct.wishes) + dump("", " You used no wishes"); + else { + Sprintf(buf, "used %ld wish%s", + u.uconduct.wishes, (u.uconduct.wishes > 1L) ? "es" : ""); + dump(" You ", buf); + + if (!u.uconduct.wisharti) + dump("", " You did not wish for any artifacts"); + } + + dump("", ""); +} +#endif /* DUMP_LOG */ + #endif /* OVLB */ #ifdef OVL1 --- a/src/decl.c +++ b/src/decl.c @@ -209,6 +209,15 @@ NEARDATA struct mvitals mvitals[NUMMONS]; +/* originally from end.c */ +#ifdef DUMP_LOG +#ifdef DUMP_FN +char dump_fn[] = DUMP_FN; +#else +char dump_fn[PL_PSIZ] = DUMMY; +#endif +#endif /* DUMP_LOG */ + NEARDATA struct c_color_names c_color_names = { "black", "amber", "golden", "light blue", "red", "green", --- a/src/display.c +++ b/src/display.c @@ -117,6 +117,7 @@ */ #include "hack.h" #include "region.h" +#include STATIC_DCL void FDECL(display_monster,(XCHAR_P,XCHAR_P,struct monst *,int,XCHAR_P)); STATIC_DCL int FDECL(swallow_to_glyph, (int, int)); @@ -1370,6 +1371,105 @@ /* ========================================================================= */ +#ifdef DUMP_LOG +/* D: Added to dump screen to output file */ +STATIC_PTR uchar get_glyph_char(glyph) +int glyph; +{ + uchar ch; + register int offset; + + assert (!(glyph >= NO_GLYPH)); + + /* + * Map the glyph back to a character. + * + * Warning: For speed, this makes an assumption on the order of + * offsets. The order is set in display.h. + */ + if ((offset = (glyph - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */ + ch = def_warnsyms[offset].sym; + } else if ((offset = (glyph - GLYPH_SWALLOW_OFF)) >= 0) { /* swallow */ + /* see swallow_to_glyph() in display.c */ + ch = (uchar) defsyms[S_sw_tl + (offset & 0x7)].sym; + } else if ((offset = (glyph - GLYPH_ZAP_OFF)) >= 0) { /* zap beam */ + /* see zapdir_to_glyph() in display.c */ + ch = defsyms[S_vbeam + (offset & 0x3)].sym; + } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */ + ch = defsyms[offset].sym; + } else if ((offset = (glyph - GLYPH_OBJ_OFF)) >= 0) { /* object */ + ch = def_oc_syms[(int)objects[offset].oc_class]; + } else if ((offset = (glyph - GLYPH_RIDDEN_OFF)) >= 0) { /* mon ridden */ + ch = def_monsyms[(int)mons[offset].mlet]; + } else if ((offset = (glyph - GLYPH_BODY_OFF)) >= 0) { /* a corpse */ + ch = def_oc_syms[(int)objects[CORPSE].oc_class]; + } else if ((offset = (glyph - GLYPH_DETECT_OFF)) >= 0) { /* mon detect */ + ch = def_monsyms[(int)mons[offset].mlet]; + } else if ((offset = (glyph - GLYPH_INVIS_OFF)) >= 0) { /* invisible */ + ch = DEF_INVISIBLE; + } else if ((offset = (glyph - GLYPH_PET_OFF)) >= 0) { /* a pet */ + ch = def_monsyms[(int)mons[offset].mlet]; + } else { /* a monster */ + ch = monsyms[(int)mons[glyph].mlet]; + } + return ch; +} + +#ifdef TTY_GRAPHICS +extern const char * FDECL(compress_str, (const char *)); +#else +const char* +compress_str(str) /* copied from win/tty/wintty.c */ +const char *str; +{ + static char cbuf[BUFSZ]; + /* compress in case line too long */ + if((int)strlen(str) >= 80) { + register const char *bp0 = str; + register char *bp1 = cbuf; + + do { + if(*bp0 != ' ' || bp0[1] != ' ') + *bp1++ = *bp0; + } while(*bp0++); + } else + return str; + return cbuf; +} +#endif /* TTY_GRAPHICS */ + +/* Take a screen dump */ +void dump_screen() +{ + register int x,y; + int lastc; + /* D: botl.c has a closer approximation to the size, but we'll go with + * this */ + char buf[300], *ptr; + + for (y = 0; y < ROWNO; y++) { + lastc = 0; + ptr = buf; + for (x = 1; x < COLNO; x++) { + uchar c = get_glyph_char(gbuf[y][x].glyph); + *ptr++ = c; + if (c != ' ') + lastc = x; + } + buf[lastc] = '\0'; + dump("", buf); + } + dump("", ""); + bot1str(buf); + ptr = (char *) compress_str((const char *) buf); + dump("", ptr); + bot2str(buf); + dump("", buf); + dump("", ""); + dump("", ""); +} +#endif /* DUMP_LOG */ + /* * back_to_glyph() * --- a/src/end.c +++ b/src/end.c @@ -40,7 +40,13 @@ STATIC_DCL void FDECL(artifact_score, (struct obj *,BOOLEAN_P,winid)); STATIC_DCL void FDECL(savelife, (int)); STATIC_DCL void FDECL(list_vanquished, (CHAR_P,BOOLEAN_P)); +#ifdef DUMP_LOG +extern void NDECL(dump_spells); +void FDECL(do_vanquished, (int, BOOLEAN_P, BOOLEAN_P)); +STATIC_DCL void FDECL(list_genocided, (int, BOOLEAN_P, BOOLEAN_P)); +#else STATIC_DCL void FDECL(list_genocided, (CHAR_P,BOOLEAN_P)); +#endif /* DUMP_LOG */ STATIC_DCL boolean FDECL(should_query_disclose_option, (int,char *)); #if defined(__BEOS__) || defined(MICRO) || defined(WIN32) || defined(OS2) @@ -86,6 +92,62 @@ extern const char * const killed_by_prefix[]; /* from topten.c */ +#ifdef DUMP_LOG +FILE *dump_fp = (FILE *)0; /* file pointer for dumps */ +/* functions dump_init, dump_exit and dump are from the dump patch */ + +void +dump_init () +{ + if (dump_fn[0]) { + char *p = (char *) strstr(dump_fn, "%n"); + if (p) { + int new_dump_fn_len = strlen(dump_fn)+strlen(plname)-2; /* %n */ + char *new_dump_fn = (char *) alloc((unsigned)(new_dump_fn_len+1)); + char *q = new_dump_fn; + strncpy(q, dump_fn, p-dump_fn); + q += p-dump_fn; + strncpy(q, plname, strlen(plname) + 1); + regularize(q); + q[strlen(plname)] = '\0'; + q += strlen(q); + p += 2; /* skip "%n" */ + strncpy(q, p, strlen(p)); + new_dump_fn[new_dump_fn_len] = '\0'; + + dump_fp = fopen(new_dump_fn, "w"); + if (!dump_fp) { + pline("Can't open %s for output.", new_dump_fn); + pline("Dump file not created."); + } + free(new_dump_fn); + + } else { + dump_fp = fopen (dump_fn, "w"); + + if (!dump_fp) { + pline("Can't open %s for output.", dump_fn); + pline("Dump file not created."); + } + } + } +} + +void +dump_exit () +{ + if (dump_fp) + fclose (dump_fp); +} + +void dump (pre, str) + char *pre, *str; +{ + if (dump_fp) + fprintf (dump_fp, "%s%s\n", pre, str); +} +#endif /* DUMP_LOG */ + /*ARGSUSED*/ void done1(sig_unused) /* called as signal() handler, so sent at least one arg */ @@ -373,8 +435,13 @@ makeknown(obj->otyp); obj->known = obj->bknown = obj->dknown = obj->rknown = 1; } +#ifdef DUMP_LOG + (void) dump_inventory((char *)0, TRUE); + do_containerconts(invent, TRUE, TRUE, TRUE); +#else (void) display_inventory((char *)0, TRUE); container_contents(invent, TRUE, TRUE); +#endif /* DUMP_LOG */ } if (c == 'q') done_stopprint++; } @@ -388,14 +455,28 @@ enlightenment(how >= PANICKED ? 1 : 2); /* final */ if (c == 'q') done_stopprint++; } +#ifdef DUMP_LOG + if (dump_fp) { + dump_enlightenment((int) (how >= PANICKED ? 1 : 2)); + dump_spells(); + } +#endif ask = should_query_disclose_option('v', &defquery); if (!done_stopprint) +#ifdef DUMP_LOG + do_vanquished(defquery, ask, TRUE); +#else list_vanquished(defquery, ask); +#endif ask = should_query_disclose_option('g', &defquery); if (!done_stopprint) +#ifdef DUMP_LOG + list_genocided(defquery, ask,TRUE); +#else list_genocided(defquery, ask); +#endif ask = should_query_disclose_option('c', &defquery); if (!done_stopprint) { @@ -405,6 +486,12 @@ show_conduct(how >= PANICKED ? 1 : 2); if (c == 'q') done_stopprint++; } +#ifdef DUMP_LOG + if (dump_fp) { + dump_conduct(how >= PANICKED ? 1 : 2); + dump_weapon_skill(); + } +#endif } /* try to get the player back in a viable state after being killed */ @@ -524,6 +611,10 @@ OBJ_NAME(objects[otmp->otyp]), value, currency(value), points); putstr(endwin, 0, pbuf); +#ifdef DUMP_LOG + if (dump_fp) + dump("", pbuf); +#endif } } if (Has_contents(otmp)) @@ -614,6 +705,22 @@ program_state.gameover = 1; /* in case of a subsequent panic(), there's no point trying to save */ program_state.something_worth_saving = 0; +#ifdef DUMP_LOG + /* D: Grab screen dump right here */ + if (dump_fn[0]) { + dump_init(); + Sprintf(pbuf, "%s, %s %s %s %s", plname, + aligns[1 - u.ualign.type].adj, + genders[flags.female].adj, + urace.adj, + (flags.female && urole.name.f)? + urole.name.f : urole.name.m); + dump("", pbuf); + /* D: Add a line for clearance from the screen dump */ + dump("", ""); + dump_screen(); + } +#endif /* DUMP_LOG */ /* render vision subsystem inoperative */ iflags.vision_inited = 0; /* might have been killed while using a disposable item, so make sure @@ -770,15 +877,18 @@ /* don't bother counting to see whether it should be plural */ } + Sprintf(pbuf, "%s %s the %s...", Goodbye(), plname, + how != ASCENDED ? + (const char *) ((flags.female && urole.name.f) ? + urole.name.f : urole.name.m) : + (const char *) (flags.female ? "Demigoddess" : "Demigod")); if (!done_stopprint) { - Sprintf(pbuf, "%s %s the %s...", Goodbye(), plname, - how != ASCENDED ? - (const char *) ((flags.female && urole.name.f) ? - urole.name.f : urole.name.m) : - (const char *) (flags.female ? "Demigoddess" : "Demigod")); putstr(endwin, 0, pbuf); putstr(endwin, 0, ""); } +#ifdef DUMP_LOG + if (dump_fp) dump("", pbuf); +#endif if (how == ESCAPED || how == ASCENDED) { register struct monst *mtmp; @@ -805,25 +915,30 @@ keepdogs(TRUE); viz_array[0][0] |= IN_SIGHT; /* need visibility for naming */ mtmp = mydogs; - if (!done_stopprint) Strcpy(pbuf, "You"); + Strcpy(pbuf, "You"); if (mtmp) { while (mtmp) { - if (!done_stopprint) - Sprintf(eos(pbuf), " and %s", mon_nam(mtmp)); + Sprintf(eos(pbuf), " and %s", mon_nam(mtmp)); if (mtmp->mtame) u.urexp += mtmp->mhp; mtmp = mtmp->nmon; } if (!done_stopprint) putstr(endwin, 0, pbuf); +#ifdef DUMP_LOG + if (dump_fp) dump("", pbuf); +#endif pbuf[0] = '\0'; } else { if (!done_stopprint) Strcat(pbuf, " "); } - if (!done_stopprint) { - Sprintf(eos(pbuf), "%s with %ld point%s,", + Sprintf(eos(pbuf), "%s with %ld point%s,", how==ASCENDED ? "went to your reward" : "escaped from the dungeon", u.urexp, plur(u.urexp)); +#ifdef DUMP_LOG + if (dump_fp) dump("", pbuf); +#endif + if (!done_stopprint) { putstr(endwin, 0, pbuf); } @@ -855,6 +970,9 @@ count, plur(count)); } putstr(endwin, 0, pbuf); +#ifdef DUMP_LOG + if (dump_fp) dump("", pbuf); +#endif } } @@ -879,12 +997,22 @@ Sprintf(eos(pbuf), " with %ld point%s,", u.urexp, plur(u.urexp)); putstr(endwin, 0, pbuf); +#ifdef DUMP_LOG + if (dump_fp) dump("", pbuf); +#endif } if (!done_stopprint) { Sprintf(pbuf, "and %ld piece%s of gold, after %ld move%s.", umoney, plur(umoney), moves, plur(moves)); putstr(endwin, 0, pbuf); +#ifdef DUMP_LOG + if (dump_fp) { + dump("", pbuf); + Sprintf(pbuf, "Killer: %s", killer); + dump("", pbuf); + } +#endif } if (!done_stopprint) { Sprintf(pbuf, @@ -892,6 +1020,9 @@ u.ulevel, u.uhpmax, plur(u.uhpmax), ends[how]); putstr(endwin, 0, pbuf); putstr(endwin, 0, ""); +#ifdef DUMP_LOG + if (dump_fp) dump("", pbuf); +#endif } if (!done_stopprint) display_nhwindow(endwin, TRUE); @@ -909,6 +1040,9 @@ exit_nhwindows((char *)0); topten(how); } +#ifdef DUMP_LOG + if (dump_fp) dump_exit(); +#endif if(done_stopprint) { raw_print(""); raw_print(""); } terminate(EXIT_SUCCESS); @@ -919,6 +1053,16 @@ container_contents(list, identified, all_containers) struct obj *list; boolean identified, all_containers; +#ifdef DUMP_LOG +{ + do_containerconts(list, identified, all_containers, FALSE); +} + +void do_containerconts(list, identified, all_containers, want_dump) +struct obj *list; +boolean identified, all_containers, want_dump; +#endif +/* The original container_contents function */ { register struct obj *box, *obj; char buf[BUFSZ]; @@ -932,6 +1076,9 @@ Sprintf(buf, "Contents of %s:", the(xname(box))); putstr(tmpwin, 0, buf); putstr(tmpwin, 0, ""); +#ifdef DUMP_LOG + if (dump_fp) dump("", buf); +#endif for (obj = box->cobj; obj; obj = obj->nobj) { if (identified) { makeknown(obj->otyp); @@ -939,14 +1086,32 @@ obj->dknown = obj->rknown = 1; } putstr(tmpwin, 0, doname(obj)); +#ifdef DUMP_LOG + if (want_dump) dump(" ", doname(obj)); +#endif } +#ifdef DUMP_LOG + if (want_dump) dump("",""); +#endif display_nhwindow(tmpwin, TRUE); destroy_nhwindow(tmpwin); - if (all_containers) + if (all_containers) { +#ifdef DUMP_LOG + do_containerconts(box->cobj, identified, TRUE, + want_dump); +#else container_contents(box->cobj, identified, TRUE); +#endif /* DUMP_LOG */ + } } else { pline("%s empty.", Tobjnam(box, "are")); display_nhwindow(WIN_MESSAGE, FALSE); +#ifdef DUMP_LOG + if (want_dump) { + dump(The(xname(box)), " is empty."); + dump("", ""); + } +#endif } } if (!all_containers) @@ -977,6 +1142,17 @@ list_vanquished(defquery, ask) char defquery; boolean ask; +#ifdef DUMP_LOG +{ + do_vanquished(defquery, ask, FALSE); +} + +void +do_vanquished(defquery, ask, want_dump) +int defquery; +boolean ask; +boolean want_dump; +#endif { register int i, lev; int ntypes = 0, max_lev = 0, nkilled; @@ -1003,6 +1179,9 @@ klwin = create_nhwindow(NHW_MENU); putstr(klwin, 0, "Vanquished creatures:"); putstr(klwin, 0, ""); +#ifdef DUMP_LOG + if (want_dump) dump("", "Vanquished creatures"); +#endif /* countdown by monster "toughness" */ for (lev = max_lev; lev >= 0; lev--) @@ -1031,6 +1210,9 @@ nkilled, makeplural(mons[i].mname)); } putstr(klwin, 0, buf); +#ifdef DUMP_LOG + if (want_dump) dump(" ", buf); +#endif } /* * if (Hallucination) @@ -1040,9 +1222,15 @@ putstr(klwin, 0, ""); Sprintf(buf, "%ld creatures vanquished.", total_killed); putstr(klwin, 0, buf); +#ifdef DUMP_LOG + if (want_dump) dump(" ", buf); +#endif } display_nhwindow(klwin, TRUE); destroy_nhwindow(klwin); +#ifdef DUMP_LOG + if (want_dump) dump("", ""); +#endif } } } @@ -1059,10 +1247,18 @@ return n; } +#ifdef DUMP_LOG +STATIC_OVL void +list_genocided(defquery, ask, want_dump) +int defquery; +boolean ask; +boolean want_dump; +#else STATIC_OVL void list_genocided(defquery, ask) char defquery; boolean ask; +#endif { register int i; int ngenocided; @@ -1079,8 +1275,12 @@ if (c == 'q') done_stopprint++; if (c == 'y') { klwin = create_nhwindow(NHW_MENU); - putstr(klwin, 0, "Genocided species:"); + Sprintf(buf, "Genocided species:"); + putstr(klwin, 0, buf); putstr(klwin, 0, ""); +#ifdef DUMP_LOG + if (want_dump) dump("", buf); +#endif for (i = LOW_PM; i < NUMMONS; i++) if (mvitals[i].mvflags & G_GENOD) { @@ -1091,11 +1291,17 @@ else Strcpy(buf, makeplural(mons[i].mname)); putstr(klwin, 0, buf); +#ifdef DUMP_LOG + if (want_dump) dump(" ", buf); +#endif } putstr(klwin, 0, ""); Sprintf(buf, "%d species genocided.", ngenocided); putstr(klwin, 0, buf); +#ifdef DUMP_LOG + if (want_dump) dump(" ", buf); +#endif display_nhwindow(klwin, TRUE); destroy_nhwindow(klwin); --- a/src/invent.c +++ b/src/invent.c @@ -19,7 +19,12 @@ STATIC_DCL boolean FDECL(putting_on, (const char *)); STATIC_PTR int FDECL(ckunpaid,(struct obj *)); STATIC_PTR int FDECL(ckvalidcat,(struct obj *)); +#ifdef DUMP_LOG +static char FDECL(display_pickinv, + (const char *,BOOLEAN_P, long *, BOOLEAN_P)); +#else static char FDECL(display_pickinv, (const char *,BOOLEAN_P, long *)); +#endif /* DUMP_LOG */ #ifdef OVLB STATIC_DCL boolean FDECL(this_type_only, (struct obj *)); STATIC_DCL void NDECL(dounpaid); @@ -1017,7 +1022,11 @@ if (ilet == '?' && !*lets && *altlets) allowed_choices = altlets; ilet = display_pickinv(allowed_choices, TRUE, - allowcnt ? &ctmp : (long *)0); + allowcnt ? &ctmp : (long *)0 +#ifdef DUMP_LOG + , FALSE +#endif + ); if(!ilet) continue; if (allowcnt && ctmp >= 0) { cnt = ctmp; @@ -1689,11 +1698,20 @@ * inventory and return a count as well as a letter. If out_cnt is not null, * any count returned from the menu selection is placed here. */ +#ifdef DUMP_LOG +static char +display_pickinv(lets, want_reply, out_cnt, want_dump) +register const char *lets; +boolean want_reply; +long* out_cnt; +boolean want_dump; +#else static char display_pickinv(lets, want_reply, out_cnt) register const char *lets; boolean want_reply; long* out_cnt; +#endif { struct obj *otmp; char ilet, ret; @@ -1713,6 +1731,10 @@ } else win = WIN_INVEN; +#ifdef DUMP_LOG + if (want_dump) dump("", "Your inventory"); +#endif + /* Exit early if no inventory -- but keep going if we are doing a permanent inventory update. We need to keep going so the @@ -1730,6 +1752,16 @@ #else pline("Not carrying anything."); #endif +#ifdef DUMP_LOG + if (want_dump) { +#ifdef GOLDOBJ + dump(" ", "Not carrying anything"); +#else + dump(" Not carrying anything", + u.ugold ? " except gold." : "."); +#endif + } +#endif return 0; } @@ -1747,6 +1779,14 @@ want_reply ? PICK_ONE : PICK_NONE, xprname(otmp, (char *)0, lets[0], TRUE, 0L, 0L)); if (out_cnt) *out_cnt = -1L; /* select all */ +#ifdef DUMP_LOG + if (want_dump) { + char letbuf[7]; + sprintf(letbuf, " %c - ", lets[0]); + dump(letbuf, + xprname(otmp, (char *)0, lets[0], TRUE, 0L, 0L)); + } +#endif break; } } @@ -1765,12 +1805,23 @@ any.a_void = 0; /* zero */ add_menu(win, NO_GLYPH, &any, 0, 0, iflags.menu_headings, let_to_name(*invlet, FALSE), MENU_UNSELECTED); +#ifdef DUMP_LOG + if (want_dump) + dump(" ", let_to_name(*invlet, FALSE)); +#endif classcount++; } any.a_char = ilet; add_menu(win, obj_to_glyph(otmp), &any, ilet, 0, ATR_NONE, doname(otmp), MENU_UNSELECTED); +#ifdef DUMP_LOG + if (want_dump) { + char letbuf[7]; + sprintf(letbuf, " %c - ", ilet); + dump(letbuf, doname(otmp)); + } +#endif } } } @@ -1792,6 +1843,9 @@ free((genericptr_t)selected); } else ret = !n ? '\0' : '\033'; /* cancelled */ +#ifdef DUMP_LOG + if (want_dump) dump("", ""); +#endif return ret; } @@ -1808,8 +1862,23 @@ register const char *lets; boolean want_reply; { - return display_pickinv(lets, want_reply, (long *)0); + return display_pickinv(lets, want_reply, (long *)0 +#ifdef DUMP_LOG + , FALSE +#endif + ); +} + +#ifdef DUMP_LOG +/* See display_inventory. This is the same thing WITH dumpfile creation */ +char +dump_inventory(lets, want_reply) +register const char *lets; +boolean want_reply; +{ + return display_pickinv(lets, want_reply, (long *)0, TRUE); } +#endif /* * Returns the number of unpaid items within the given list. This includes --- a/src/options.c +++ b/src/options.c @@ -239,6 +239,14 @@ SET_IN_GAME }, { "dogname", "the name of your (first) dog (e.g., dogname:Fang)", PL_PSIZ, DISP_IN_GAME }, +#ifdef DUMP_LOG + { "dumpfile", "where to dump data (e.g., dumpfile:/tmp/dump.nh)", +#ifdef DUMP_FN + PL_PSIZ, DISP_IN_GAME }, +#else + PL_PSIZ, SET_IN_GAME }, +#endif +#endif { "dungeon", "the symbols to use in drawing the dungeon map", MAXDCHARS+1, SET_IN_FILE }, { "effects", "the symbols to use in drawing special effects", @@ -1207,6 +1215,19 @@ return; } +#ifdef DUMP_LOG + fullname = "dumpfile"; + if (match_optname(opts, fullname, 3, TRUE)) { +#ifndef DUMP_FN + if (negated) bad_negation(fullname, FALSE); + else if ((op = string_for_opt(opts, !tfrom_file)) != 0 + && strlen(op) > 1) + nmcpy(dump_fn, op, PL_PSIZ); +#endif + return; + } +#endif + fullname = "horsename"; if (match_optname(opts, fullname, 5, TRUE)) { if (negated) bad_negation(fullname, FALSE); @@ -3075,6 +3096,10 @@ } else if (!strcmp(optname, "dogname")) Sprintf(buf, "%s", dogname[0] ? dogname : none ); +#ifdef DUMP_LOG + else if (!strcmp(optname, "dumpfile")) + Sprintf(buf, "%s", dump_fn[0] ? dump_fn: none ); +#endif else if (!strcmp(optname, "dungeon")) Sprintf(buf, "%s", to_be_done); else if (!strcmp(optname, "effects")) --- a/src/spell.c +++ b/src/spell.c @@ -1114,6 +1114,35 @@ return FALSE; } +#ifdef DUMP_LOG +void +dump_spells() +{ + int i; + char buf[BUFSZ]; + + if (spellid(0) == NO_SPELL) { + dump("", "You didn't know any spells."); + dump("", ""); + return; + } + dump("", "Spells known in the end"); + + Sprintf(buf, "%-20s Level %-12s Fail", " Name", "Category"); + dump(" ",buf); + for (i = 0; i < MAXSPELL && spellid(i) != NO_SPELL; i++) { + Sprintf(buf, "%c - %-20s %2d%s %-12s %3d%%", + spellet(i), spellname(i), spellev(i), + spellknow(i) ? " " : "*", + spelltypemnemonic(spell_skilltype(spellid(i))), + 100 - percent_success(i)); + dump(" ", buf); + } + dump("",""); + +} /* dump_spells */ +#endif + /* Integer square root function without using floating point. */ STATIC_OVL int isqrt(val) --- a/src/topten.c +++ b/src/topten.c @@ -358,6 +358,12 @@ "Since you were in %s mode, the score list will not be checked.", wizard ? "wizard" : "discover"); topten_print(pbuf); +#ifdef DUMP_LOG + if (dump_fn[0]) { + dump("", pbuf); + dump("", ""); + } +#endif } goto showwin; } @@ -378,6 +384,9 @@ } HUP topten_print(""); +#ifdef DUMP_LOG + dump("", ""); +#endif /* assure minimum number of points */ if(t0->points < POINTSMIN) t0->points = 0; @@ -422,6 +431,10 @@ t1->points); topten_print(pbuf); topten_print(""); +#ifdef DUMP_LOG + dump("", pbuf); + dump("", ""); +#endif } } if(occ_cnt < 0) { @@ -453,16 +466,25 @@ } #endif /* UPDATE_RECORD_IN_PLACE */ if(!done_stopprint) if(rank0 > 0){ - if(rank0 <= 10) + if(rank0 <= 10) { topten_print("You made the top ten list!"); - else { +#ifdef DUMP_LOG + dump("", "You made the top ten list!"); +#endif + } else { char pbuf[BUFSZ]; Sprintf(pbuf, "You reached the %d%s place on the top %d list.", rank0, ordin(rank0), ENTRYMAX); topten_print(pbuf); +#ifdef DUMP_LOG + dump("", pbuf); +#endif } topten_print(""); +#ifdef DUMP_LOG + dump("", ""); +#endif } } if(rank0 == 0) rank0 = rank1; @@ -488,8 +510,12 @@ )) continue; if (rank == rank0 - flags.end_around && rank0 > flags.end_top + flags.end_around + 1 && - !flags.end_own) + !flags.end_own) { topten_print(""); +#ifdef DUMP_LOG + dump("", ""); +#endif + } if(rank != rank0) outentry(rank, t1, FALSE); else if(!rank1) @@ -547,6 +573,9 @@ while(bp < linebuf + COLNO - 9) *bp++ = ' '; Strcpy(bp, "Hp [max]"); topten_print(linebuf); +#ifdef DUMP_LOG + dump("", linebuf); +#endif } /* so>0: standout line; so=0: ordinary line */ @@ -665,8 +694,15 @@ while (bp < linebuf + (COLNO-1)) *bp++ = ' '; *bp = 0; topten_print_bold(linebuf); - } else +#ifdef DUMP_LOG + dump("*", linebuf[0]==' '? linebuf+1: linebuf); +#endif + } else { topten_print(linebuf); +#ifdef DUMP_LOG + dump(" ", linebuf[0]==' '? linebuf+1: linebuf); +#endif + } Sprintf(linebuf, "%15s %s", "", linebuf3); lngr = strlen(linebuf); } @@ -691,6 +727,9 @@ topten_print_bold(linebuf); } else topten_print(linebuf); +#ifdef DUMP_LOG + dump(" ", linebuf[0]==' '? linebuf+1: linebuf); +#endif } STATIC_OVL int --- a/src/weapon.c +++ b/src/weapon.c @@ -9,6 +9,10 @@ */ #include "hack.h" +#ifdef DUMP_LOG +STATIC_DCL int FDECL(enhance_skill, (boolean)); +#endif + /* Categories whose names don't come from OBJ_NAME(objects[type]) */ #define PN_BARE_HANDED (-1) /* includes martial arts */ @@ -851,6 +855,23 @@ */ int enhance_weapon_skill() +#ifdef DUMP_LOG +{ + return enhance_skill(FALSE); +} + +void dump_weapon_skill() +{ + enhance_skill(TRUE); +} + +int enhance_skill(boolean want_dump) +/* This is the original enhance_weapon_skill() function slightly modified + * to write the skills to the dump file. I added the wrapper functions just + * because it looked like the easiest way to add a parameter to the + * function call. - Jukka Lahtinen, August 2001 + */ +#endif { int pass, i, n, len, longest, to_advance, eventually_advance, maxxed_cnt; @@ -860,8 +881,15 @@ anything any; winid win; boolean speedy = FALSE; +#ifdef DUMP_LOG + char buf2[BUFSZ]; + boolean logged = FALSE; +#endif #ifdef WIZARD +#ifdef DUMP_LOG + if (!want_dump) +#endif if (wizard && yn("Advance skills without practice?") == 'y') speedy = TRUE; #endif @@ -878,6 +906,11 @@ else if (peaked_skill(i)) maxxed_cnt++; } +#ifdef DUMP_LOG + if (want_dump) + dump("","Your skills at the end"); + else { +#endif win = create_nhwindow(NHW_MENU); start_menu(win); @@ -905,6 +938,9 @@ add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); } +#ifdef DUMP_LOG + } /* want_dump or not */ +#endif /* List the skills, making ones that could be advanced selectable. List the miscellaneous skills first. @@ -916,8 +952,28 @@ /* Print headings for skill types */ any.a_void = 0; if (i == skill_ranges[pass].first) +#ifdef DUMP_LOG + { + if (want_dump) { + dump(" ",(char *)skill_ranges[pass].name); + logged=FALSE; + } else +#endif add_menu(win, NO_GLYPH, &any, 0, 0, iflags.menu_headings, skill_ranges[pass].name, MENU_UNSELECTED); +#ifdef DUMP_LOG + } + if (want_dump) { + if (P_SKILL(i) > P_UNSKILLED) { + Sprintf(buf2,"%-*s [%s]", + longest, P_NAME(i),skill_level_name(i, buf)); + dump(" ",buf2); + logged=TRUE; + } else if (i == skill_ranges[pass].last && !logged) { + dump(" ","(none)"); + } + } else { +#endif if (P_RESTRICTED(i)) continue; /* @@ -962,6 +1018,9 @@ any.a_int = can_advance(i, speedy) ? i+1 : 0; add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); +#ifdef DUMP_LOG + } /* !want_dump */ +#endif } Strcpy(buf, (to_advance > 0) ? "Pick a skill to advance:" : @@ -971,6 +1030,12 @@ Sprintf(eos(buf), " (%d slot%s available)", u.weapon_slots, plur(u.weapon_slots)); #endif +#ifdef DUMP_LOG + if (want_dump) { + dump("",""); + n=0; + } else { +#endif end_menu(win, buf); n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected); destroy_nhwindow(win); @@ -987,6 +1052,9 @@ } } } +#ifdef DUMP_LOG + } +#endif } while (speedy && n > 0); return 0; } --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -166,7 +166,7 @@ STATIC_DCL void FDECL(process_menu_window, (winid,struct WinDesc *)); STATIC_DCL void FDECL(process_text_window, (winid,struct WinDesc *)); STATIC_DCL tty_menu_item *FDECL(reverse, (tty_menu_item *)); -STATIC_DCL const char * FDECL(compress_str, (const char *)); +const char * FDECL(compress_str, (const char *)); STATIC_DCL void FDECL(tty_putsym, (winid, int, int, CHAR_P)); static char *FDECL(copy_of, (const char *)); STATIC_DCL void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */ @@ -1765,7 +1765,7 @@ } -STATIC_OVL const char* +const char* compress_str(str) const char *str; { debian/patches/0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch0000644000000000000000000003673411765325122024121 0ustar From e322d347a77bca305979201e4cfb552f0ea01a0e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: Pasi Kallinen's patch to add colors to inventory items. --- README.menucolor | 96 ++++++++++++++++++++++++++++++++++++++ dat/opthelp | 18 ++++++++ include/color.h | 18 ++++++++ include/config.h | 9 ++++ include/extern.h | 3 ++ include/flag.h | 3 ++ src/decl.c | 4 ++ src/files.c | 4 ++ src/options.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/save.c | 26 +++++++++++ util/makedefs.c | 7 +++ win/tty/wintty.c | 43 +++++++++++++++++ 12 files changed, 367 insertions(+) create mode 100644 README.menucolor --- /dev/null +++ b/README.menucolor @@ -0,0 +1,96 @@ + + This is version 1.3 of the menucolors patch. + + This patch allows the user to define in what color menus are shown. + For example, putting + + OPTIONS=menucolors + MENUCOLOR=" blessed "=green + MENUCOLOR=" holy "=green + MENUCOLOR=" cursed "=red + MENUCOLOR=" unholy "=red + MENUCOLOR=" cursed .* (being worn)"=orange&underline + + in the configuration file makes all known blessed items + show up in green, all cursed items show up in red and + all cursed worn items show up in orange and underlined + when viewing inventory. + + If you do not have GNU regex.h, comment + #define MENU_COLOR_REGEX out from include/config.h + and replace the MENUCOLOR lines in your config file with these: + + MENUCOLOR="* blessed *"=green + MENUCOLOR="* holy *"=green + MENUCOLOR="* cursed *"=red + MENUCOLOR="* unholy *"=red + MENUCOLOR="* cursed * (being worn)"=orange&underline + + + Colors: black, red, green, brown, blue, magenta, cyan, gray, orange, + lightgreen, yellow, lightblue, lightmagenta, lightcyan, white. + Attributes: none, bold, dim, underline, blink, inverse. + + Note that the terminal is free to interpret the attributes however + it wants. + + + TODO/BUGS: + + o Only works with TTY + o You can't use '=' or '&' in the match-string. + o Maybe add color-field to tty_menu_item in include/wintty.h + (so there's no need to find the color for the line again) + o Guidebook is not up to date + o Better place to put the functions, colornames[] and attrnames[]? + o Some menus do not need coloring; maybe add new parameter + to process_menu_window()? + + + FIXES: + + v1.3: + o Updated to use 3.4.3 codebase. + o Added a text to #version to show menucolors is compiled in. + + v1.2: + o Updated to use 3.4.2 codebase. + + v1.1: + o Updated to use 3.4.1 codebase. + o replaced USE_REGEX_MATCH with MENU_COLOR_REGEX + + v1.04: + o Oops! 1.03 worked only on *nixes... (GNU regex.h) + o Compile-time option USE_REGEX_MATCH: if it's defined, use regex, + otherwise use globbing. ('?' and '*' wildcards) + + v1.03: + + o Now using Nethack 3.4.0 codebase + o Compile-time option MENU_COLOR + o Strings match using regular expressions instead of globbing + o You can use attribute with color (attr must come after '&') + o Use ``MENUCOLOR="foo"=color'' instead of ``OPTIONS=menucolor=...'' + (Both work, but OPTIONS complains if you define menucolor + more than once) + + v1.02: + + o Should now work with OS/2, thanks to Jukka Lahtinen + o Strings match now using simple globbing. ('?' and '*' wildcards) + + v1.01: + + o Moved 'menucolors' boolean option, so now the options-menu + is in alphabetical order. + o Fixed 'menucolor' description in dat/opthelp. + o menu_colorings is now initialized to null in src/decl.c. + + v1.0: + + o Initial release + +-- + Pasi Kallinen + pkalli@cs.joensuu.fi --- a/dat/opthelp +++ b/dat/opthelp @@ -74,6 +74,9 @@ Boolean option if HPMON was set at compile time: hpmon color HP readout depending on how low it is [FALSE] +Boolean option if TEXTCOLOR and MENU_COLOR were set at compile time: +menucolors use different colors for menus [TRUE for micros] + Boolean option if TIMED_DELAY was set at compile time (tty interface only): timed_delay on unix and VMS, use a timer instead of sending extra screen output when attempting to pause for @@ -172,6 +175,21 @@ still denote your gender using the "male" and "female" options, the "gender" option will take precedence. [RANDOM] horsename the name of your first horse [NONE] +menucolor Set colors for menus. (menucolor:"regex_string"=color) + If boolean option ``menucolors'' is true, menus will be shown + with different colors. + For example, setting ``menucolor:" blessed "=green'' shows + all lines in a menu with the text " blessed " in green. + The string is matched using regular expressions. + Valid values for the color are black, red, green, brown, blue, + magenta, cyan, gray, orange, lightgreen, yellow, lightblue, + lightmagenta, lightcyan and white. + You can define menucolor as many times as you wish; those + defined later will take precedence. + Instead of using this with OPTIONS, consider using + MENUCOLOR="regex_string"=color in the configuration file. + Setting menucolor has effect only if TEXTCOLOR and MENU_COLOR + were set at compile time. [NONE] menu_* create single character accelerators for menu commands. Below is a list of all commands. Each is followed by a list of window- ports that implement them: 'x' is X11, 't' is tty, 'g' is Gem, --- a/include/color.h +++ b/include/color.h @@ -5,6 +5,12 @@ #ifndef COLOR_H #define COLOR_H +#ifdef MENU_COLOR +# ifdef MENU_COLOR_REGEX +# include +# endif +#endif + /* * The color scheme used is tailored for an IBM PC. It consists of the * standard 8 colors, folowed by their bright counterparts. There are @@ -49,4 +55,16 @@ #define DRAGON_SILVER CLR_BRIGHT_CYAN #define HI_ZAP CLR_BRIGHT_BLUE +#ifdef MENU_COLOR +struct menucoloring { +# ifdef MENU_COLOR_REGEX + struct re_pattern_buffer match; +# else + char *match; +# endif + int color, attr; + struct menucoloring *next; +}; +#endif /* MENU_COLOR */ + #endif /* COLOR_H */ --- a/include/config.h +++ b/include/config.h @@ -353,6 +353,17 @@ * bugs left here. */ +#ifdef TTY_GRAPHICS +# define MENU_COLOR +#ifdef __linux__ +# define MENU_COLOR_REGEX +/* if MENU_COLOR_REGEX is defined, use regular expressions (GNU regex.h) + * otherwise use pmatch() to match menu color lines. + * pmatch() provides basic globbing: '*' and '?' wildcards. + */ +#endif +#endif + /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ #define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ --- a/include/extern.h +++ b/include/extern.h @@ -1405,6 +1405,9 @@ E int FDECL(add_autopickup_exception, (const char *)); E void NDECL(free_autopickup_exceptions); #endif /* AUTOPICKUP_EXCEPTIONS */ +#ifdef MENU_COLOR +E boolean FDECL(add_menu_coloring, (char *)); +#endif /* MENU_COLOR */ /* ### pager.c ### */ --- a/include/flag.h +++ b/include/flag.h @@ -186,6 +186,9 @@ char prevmsg_window; /* type of old message window to use */ boolean extmenu; /* extended commands use menu interface */ #endif +#ifdef MENU_COLOR + boolean use_menu_color; /* use color in menus; only if wc_color */ +#endif #ifdef MFLOPPY boolean checkspace; /* check disk space before writing files */ /* (in iflags to allow restore after moving --- a/src/decl.c +++ b/src/decl.c @@ -235,6 +235,10 @@ "white", /* CLR_WHITE */ }; +#ifdef MENU_COLOR +struct menucoloring *menu_colorings = 0; +#endif + struct c_common_strings c_common_strings = { "Nothing happens.", "That's enough tries!", "That is a silly thing to %s.", "shudder for a moment.", --- a/src/files.c +++ b/src/files.c @@ -1794,6 +1794,10 @@ } else if (match_varname(buf, "BOULDER", 3)) { (void) get_uchars(fp, buf, bufp, &iflags.bouldersym, TRUE, 1, "BOULDER"); + } else if (match_varname(buf, "MENUCOLOR", 9)) { +#ifdef MENU_COLOR + (void) add_menu_coloring(bufp); +#endif } else if (match_varname(buf, "GRAPHICS", 4)) { len = get_uchars(fp, buf, bufp, translate, FALSE, MAXPCHARS, "GRAPHICS"); --- a/src/options.c +++ b/src/options.c @@ -128,6 +128,15 @@ #else {"mail", (boolean *)0, TRUE, SET_IN_FILE}, #endif +#ifdef MENU_COLOR +# ifdef MICRO + {"menucolors", &iflags.use_menu_color, TRUE, SET_IN_GAME}, +# else + {"menucolors", &iflags.use_menu_color, FALSE, SET_IN_GAME}, +# endif +#else + {"menucolors", (boolean *)0, FALSE, SET_IN_GAME}, +#endif #ifdef WIZARD /* for menu debugging only*/ {"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME}, @@ -249,6 +258,7 @@ { "horsename", "the name of your (first) horse (e.g., horsename:Silver)", PL_PSIZ, DISP_IN_GAME }, { "map_mode", "map display mode under Windows", 20, DISP_IN_GAME }, /*WC*/ + { "menucolor", "set menu colors", PL_PSIZ, SET_IN_FILE }, { "menustyle", "user interface for object selection", MENUTYPELEN, SET_IN_GAME }, { "menu_deselect_all", "deselect all items in a menu", 4, SET_IN_FILE }, @@ -967,6 +977,120 @@ } } +#ifdef MENU_COLOR +extern struct menucoloring *menu_colorings; + +static const struct { + const char *name; + const int color; +} colornames[] = { + {"black", CLR_BLACK}, + {"red", CLR_RED}, + {"green", CLR_GREEN}, + {"brown", CLR_BROWN}, + {"blue", CLR_BLUE}, + {"magenta", CLR_MAGENTA}, + {"cyan", CLR_CYAN}, + {"gray", CLR_GRAY}, + {"orange", CLR_ORANGE}, + {"lightgreen", CLR_BRIGHT_GREEN}, + {"yellow", CLR_YELLOW}, + {"lightblue", CLR_BRIGHT_BLUE}, + {"lightmagenta", CLR_BRIGHT_MAGENTA}, + {"lightcyan", CLR_BRIGHT_CYAN}, + {"white", CLR_WHITE} +}; + +static const struct { + const char *name; + const int attr; +} attrnames[] = { + {"none", ATR_NONE}, + {"bold", ATR_BOLD}, + {"dim", ATR_DIM}, + {"underline", ATR_ULINE}, + {"blink", ATR_BLINK}, + {"inverse", ATR_INVERSE} + +}; + +/* parse '"regex_string"=color&attr' and add it to menucoloring */ +boolean +add_menu_coloring(str) +char *str; +{ + int i, c = NO_COLOR, a = ATR_NONE; + struct menucoloring *tmp; + char *tmps, *cs = strchr(str, '='); + const char *err = (char *)0; + + if (!cs || !str) return FALSE; + + tmps = cs; + tmps++; + while (*tmps && isspace(*tmps)) tmps++; + + for (i = 0; i < SIZE(colornames); i++) + if (strstri(tmps, colornames[i].name) == tmps) { + c = colornames[i].color; + break; + } + if ((i == SIZE(colornames)) && (*tmps >= '0' && *tmps <='9')) + c = atoi(tmps); + + if (c > 15) return FALSE; + + tmps = strchr(str, '&'); + if (tmps) { + tmps++; + while (*tmps && isspace(*tmps)) tmps++; + for (i = 0; i < SIZE(attrnames); i++) + if (strstri(tmps, attrnames[i].name) == tmps) { + a = attrnames[i].attr; + break; + } + if ((i == SIZE(attrnames)) && (*tmps >= '0' && *tmps <='9')) + a = atoi(tmps); + } + + *cs = '\0'; + tmps = str; + if ((*tmps == '"') || (*tmps == '\'')) { + cs--; + while (isspace(*cs)) cs--; + if (*cs == *tmps) { + *cs = '\0'; + tmps++; + } + } + + tmp = (struct menucoloring *)alloc(sizeof(struct menucoloring)); +#ifdef MENU_COLOR_REGEX + tmp->match.translate = 0; + tmp->match.fastmap = 0; + tmp->match.buffer = 0; + tmp->match.allocated = 0; + tmp->match.regs_allocated = REGS_FIXED; + err = re_compile_pattern(tmps, strlen(tmps), &tmp->match); +#else + tmp->match = (char *)alloc(strlen(tmps)+1); + (void) memcpy((genericptr_t)tmp->match, (genericptr_t)tmps, strlen(tmps)+1); +#endif + if (err) { + raw_printf("\nMenucolor regex error: %s\n", err); + wait_synch(); + free(tmp); + return FALSE; + } else { + tmp->next = menu_colorings; + tmp->color = c; + tmp->attr = a; + menu_colorings = tmp; + return TRUE; + } +} +#endif /* MENU_COLOR */ + void parseoptions(opts, tinitial, tfrom_file) register char *opts; @@ -1136,6 +1260,18 @@ return; } + /* menucolor:"regex_string"=color */ + fullname = "menucolor"; + if (match_optname(opts, fullname, 9, TRUE)) { +#ifdef MENU_COLOR + if (negated) bad_negation(fullname, FALSE); + else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) + if (!add_menu_coloring(op)) + badoption(opts); +#endif + return; + } + fullname = "msghistory"; if (match_optname(opts, fullname, 3, TRUE)) { op = string_for_env_opt(fullname, opts, negated); --- a/src/save.c +++ b/src/save.c @@ -48,6 +48,10 @@ #define HUP #endif +#ifdef MENU_COLOR +extern struct menucoloring *menu_colorings; +#endif + /* need to preserve these during save to avoid accessing freed memory */ static unsigned ustuck_id = 0, usteed_id = 0; @@ -953,12 +957,34 @@ return; } +#ifdef MENU_COLOR +void +free_menu_coloring() +{ + struct menucoloring *tmp = menu_colorings; + + while (tmp) { + struct menucoloring *tmp2 = tmp->next; +# ifdef MENU_COLOR_REGEX + (void) regfree(&tmp->match); +# else + free(tmp->match); +# endif + free(tmp); + tmp = tmp2; + } +} +#endif /* MENU_COLOR */ + void freedynamicdata() { unload_qtlist(); free_invbuf(); /* let_to_name (invent.c) */ free_youbuf(); /* You_buf,&c (pline.c) */ +#ifdef MENU_COLOR + free_menu_coloring(); +#endif tmp_at(DISP_FREEMEM, 0); /* temporary display effects */ #ifdef FREE_ALL_MEMORY # define freeobjchn(X) (saveobjchn(0, X, FREE_SAVE), X = 0) --- a/util/makedefs.c +++ b/util/makedefs.c @@ -679,6 +679,13 @@ #ifdef MAIL "mail daemon", #endif +#ifdef MENU_COLOR +# ifdef MENU_COLOR_REGEX + "menu colors via regular expressions", +# else + "menu colors via pmatch", +# endif +#endif #ifdef GNUDOS "MSDOS protected mode", #endif --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -125,6 +125,10 @@ static char winpanicstr[] = "Bad window id %d"; char defmorestr[] = "--More--"; +#ifdef MENU_COLOR +extern struct menucoloring *menu_colorings; +#endif + #ifdef CLIPPING # if defined(USE_TILES) && defined(MSDOS) boolean clipping = FALSE; /* clipping on? */ @@ -1128,6 +1132,28 @@ } } +#ifdef MENU_COLOR +STATIC_OVL boolean +get_menu_coloring(str, color, attr) +char *str; +int *color, *attr; +{ + struct menucoloring *tmpmc; + if (iflags.use_menu_color) + for (tmpmc = menu_colorings; tmpmc; tmpmc = tmpmc->next) +# ifdef MENU_COLOR_REGEX + if (re_search(&tmpmc->match, str, strlen(str), 0, 9999, 0) >= 0) { +# else + if (pmatch(tmpmc->match, str)) { +# endif + *color = tmpmc->color; + *attr = tmpmc->attr; + return TRUE; + } + return FALSE; +} +#endif /* MENU_COLOR */ + STATIC_OVL void process_menu_window(window, cw) winid window; @@ -1204,6 +1230,10 @@ for (page_lines = 0, curr = page_start; curr != page_end; page_lines++, curr = curr->next) { +#ifdef MENU_COLOR + int color = NO_COLOR, attr = ATR_NONE; + boolean menucolr = FALSE; +#endif if (curr->selector) *rp++ = curr->selector; @@ -1219,6 +1249,13 @@ * actually output the character. We're faster doing * this. */ +#ifdef MENU_COLOR + if (iflags.use_menu_color && + (menucolr = get_menu_coloring(curr->str, &color,&attr))) { + term_start_attr(attr); + if (color != NO_COLOR) term_start_color(color); + } else +#endif term_start_attr(curr->attr); for (n = 0, cp = curr->str; #ifndef WIN32CON @@ -1236,6 +1273,12 @@ (void) putchar('#'); /* count selected */ } else (void) putchar(*cp); +#ifdef MENU_COLOR + if (iflags.use_menu_color && menucolr) { + if (color != NO_COLOR) term_end_color(); + term_end_attr(attr); + } else +#endif term_end_attr(curr->attr); } } else { debian/patches/0015-95_enh_engulf_prayers.dpatch-by-Joshua-Kwan.patch0000644000000000000000000000473411765144123022430 0ustar From 382bd8c14d2749df0325358278acc04b9e30ae26 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 24 Sep 2009 14:21:19 -0700 Subject: =?UTF-8?q?95=5Fenh=5Fengulf=5Fprayers.dpatch=20by=20Joshua=20Kwan=0A?= =?UTF-8?q?Prayer=20can=20expel=20you=20from=20being=20swallowed.?= --- src/pray.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/pray.c b/src/pray.c index 0df2855..3caa8c4 100644 --- a/src/pray.c +++ b/src/pray.c @@ -70,12 +70,13 @@ static int p_type; /* (-1)-3: (-1)=really naughty, 3=really good */ * order to have the values be meaningful. */ -#define TROUBLE_STONED 13 -#define TROUBLE_SLIMED 12 -#define TROUBLE_STRANGLED 11 -#define TROUBLE_LAVA 10 -#define TROUBLE_SICK 9 -#define TROUBLE_STARVING 8 +#define TROUBLE_STONED 14 +#define TROUBLE_SLIMED 13 +#define TROUBLE_STRANGLED 12 +#define TROUBLE_LAVA 11 +#define TROUBLE_SICK 10 +#define TROUBLE_STARVING 9 +#define TROUBLE_ENGULFED 8 #define TROUBLE_HIT 7 #define TROUBLE_LYCANTHROPE 6 #define TROUBLE_COLLAPSING 5 @@ -141,6 +142,7 @@ in_trouble() if(u.utrap && u.utraptype == TT_LAVA) return(TROUBLE_LAVA); if(Sick) return(TROUBLE_SICK); if(u.uhs >= WEAK) return(TROUBLE_STARVING); + if(u.ustuck && u.uswallow) return(TROUBLE_ENGULFED); if (Upolyd ? (u.mh <= 5 || u.mh*7 <= u.mhmax) : (u.uhp <= 5 || u.uhp*7 <= u.uhpmax)) return TROUBLE_HIT; if(u.ulycn >= LOW_PM) return(TROUBLE_LYCANTHROPE); @@ -267,6 +269,7 @@ register int trouble; int i; struct obj *otmp = 0; const char *what = (const char *)0; + struct monst *mtmp; static NEARDATA const char leftglow[] = "left ring softly glows", rightglow[] = "right ring softly glows"; @@ -312,6 +315,19 @@ register int trouble; You_feel("better."); make_sick(0L, (char *) 0, FALSE, SICK_ALL); break; + case TROUBLE_ENGULFED: + mtmp = u.ustuck; + if (is_animal(mtmp->data)) { + You_hear("a %s of divine fear!", growl_sound(mtmp)); + } else { + You_feel("a strange distortion in your surroundings!"); + } + expels(mtmp, mtmp->data, TRUE); + /* Make the monster who's just barfed you out run! */ + monflee(mtmp, rnd(10), TRUE, FALSE); + pline("%s looks rather %s.", Monnam(mtmp), + is_animal(mtmp->data) ? "nauseated" : "shook up"); + break; case TROUBLE_HIT: /* "fix all troubles" will keep trying if hero has 5 or less hit points, so make sure they're always debian/nethack-console.dirs0000644000000000000000000000007711765144123013136 0ustar etc/nethack usr/games usr/lib/games/nethack usr/share/man/man6 debian/nethack-x11.dirs0000644000000000000000000000015511765144123012102 0ustar etc/X11/app-defaults usr/share/fonts/X11/misc etc/nethack usr/games usr/lib/games/nethack usr/share/man/man6 debian/nethack-x11.install0000644000000000000000000000006211765321646012613 0ustar debian/nethack-x11.desktop usr/share/applications debian/nethack-x11.links0000644000000000000000000000017211765144123012260 0ustar usr/lib/games/nethack/nethack-x11.sh usr/games/xnethack usr/share/man/man6/nethack.6.gz usr/share/man/man6/xnethack.6.gz debian/nethack-console.postinst0000644000000000000000000000021211765144123014047 0ustar #!/bin/sh set -e update-alternatives --install /usr/games/nethack nethack \ /usr/lib/games/nethack/nethack-console.sh 50 #DEBHELPER# debian/compat0000644000000000000000000000000211765144123010370 0ustar 7 debian/nethack-common.lintian-overrides0000644000000000000000000000013511765144123015454 0ustar nethack-common: non-standard-game-executable-perm usr/lib/games/nethack/recover 0755 != 2755 debian/recover-helper0000644000000000000000000000043311765144123012037 0ustar #!/bin/sh set -e cd /var/games/nethack || exit 1 for file in *.0; do # We only try to recover our own files, and ignore the others. if [ -f "$file" ] && [ ! -L "$file" ] && [ -O "$file" ]; then /usr/lib/games/nethack/recover "/var/games/nethack/$file" fi done exit 0 debian/nethack-common.postrm0000644000000000000000000000117511765144123013347 0ustar #!/bin/sh # Nethack post-remove script for Debian # # Ben Gertzfield (che@debian.org) 29 July 1997 # Copyright 1997 Ben Gertzfield. This script is released under the # GNU General Public License, version 2 or later. # Updated 13 October 2003 to move the debhelper above the save-files # purge (seems to be reading from stdin, seeing the "Purging" echo # as a command) # Updated 18 August 1998 to rm -rf the score/save directory on a purge, # added debhelper comments set -e #DEBHELPER# if [ "$1" = "purge" ]; then echo -n "Purging high-scores and save-files for Nethack... " rm -rf /var/games/nethack/ echo "done." fi debian/nethack-x11.prerm0000644000000000000000000000027311765144123012267 0ustar #!/bin/sh set -e update-alternatives --remove nethack /usr/lib/games/nethack/nethack-x11.sh update-alternatives --remove nethack /usr/lib/games/nethack/nethack-x11-tty.sh #DEBHELPER# debian/changelog0000644000000000000000000011340611765603447011062 0ustar nethack (3.4.3-14) unstable; urgency=low * Team upload. [ Bernhard R. Link ] * switch to "3.0 (quilt)" * bump Standards-Version * modernize debian/rules: - use dpkg-buildflags - support build-arch/-indep - make parallel safe - don't avoid make errors * add patch so it can compile with -Werror=format-security * drop no longer needed patches (-qt and -gnome are gone) * don't use /dev/null as install template (Closes: 644647) * drop nethack-common menu (both -console and -x11 have one) [ Vincent Cheng ] * Adopt package. (Closes: #673584) - Change Maintainer to Debian Games Team. - Add myself to Uploaders. * Modify 0006-Common-config.h-for-all-binary-packages.patch to enable AUTOPICKUP_EXCEPTIONS. (Closes: #329318) * Modify 0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch and 0017-Debian-and-Linux-specifics-defined-in-unixconf.h.patch; add 0021-fix-kfreebsd-ftbfs.patch to fix FTBFS on kfreebsd. * Convert debian/copyright to DEP-5 machine-readable format. * Use dh_lintian to install overrides instead of manually installing them in debian/rules. * Add watch file. * Add Homepage field in debian/control. * Add Vcs-* fields in debian/control. -- Vincent Cheng Mon, 11 Jun 2012 00:47:38 -0700 nethack (3.4.3-13) unstable; urgency=low * QA upload, orphan package. * Drop nethack-qt. (Closes: #604363) -- Ana Beatriz Guerrero Lopez Sun, 20 May 2012 00:40:52 +0200 nethack (3.4.3-12.3) unstable; urgency=low * Non-maintainer upload. * Fix pending l10n issues. Debconf translations: - Danish (Joe Hansen). Closes: #626534 - Dutch; (Jeroen Schot). Closes: #643307 - Polish (Michał Kułach). Closes: #657504 -- Christian Perrier Thu, 02 Feb 2012 07:46:14 +0100 nethack (3.4.3-12.2) unstable; urgency=low * Non-maintainer upload. * debian/patches/96_binutils-gold.dpatch: - Fix FTBFS with binutils-gold (Closes: #555769). -- Luca Falavigna Fri, 26 Aug 2011 21:15:02 +0200 nethack (3.4.3-12.1) unstable; urgency=medium * Non-maintainer upload. * debian/rules: - Compile with __CORRECT_ISO_CPP_STRINGS_H_PROTO set to fix FTBFS (Closes: #551334, #560531). -- Luca Falavigna Wed, 12 May 2010 09:30:03 +0200 nethack (3.4.3-12) unstable; urgency=low * Fix error with update-rc.d (for some reason I didn't see this, probably due to using insserv based init.) Add a '.' to the end. closes: #548425 -- Joshua Kwan Sat, 26 Sep 2009 11:20:04 -0700 nethack (3.4.3-11) unstable; urgency=low * Thanks for the NMUs, guys. There are so many bugs fixed as a result of NMU I won't mention them here, but thanks to Christian Perrier for managing everything. Certain things were fixed in 3.4.3-10.7 and have also been marked as fixed prior to this upload. * Apply translation updates: - Vietnamese, thanks Clytie Siddall; closes: #548012 - Czech, thanks Jan Outrata; closes: #546453 * Update the nethack-lisp patch to the latest version. closes: #517437 (The new version is dated 2005-02-27.) * Fix yet another incorrect path in the manpage. Thanks Iain. closes: #504925 * Disable nethack-common.init from 'stopping' when entering shutdown runlevels. closes: #547471 * Change the default for making 'recover' setgid games to true. Thanks Iain. closes: #504923, #405465 * Apply patch to give nethack-x11 and nethack-qt .desktop files. Thanks Iain. closes: #504924 * Install dat/hh at /usr/lib/games/nethack/hh. I know this is a minor FHS sin, but it is better than not having it at all right now. (Technically, nhdat is a text file too!) closes: #425073 * Only install recover with gid games (since it may become setuid.) The rest are installed with the root gid. * Bump Standards-Version to 3.8.3.0. * Clear out some outdated Lintian overrides. * Make /var/games/nethack hierarchy setgid games (instead of merely owned and writable by gid games.) -- Joshua Kwan Thu, 24 Sep 2009 14:21:19 -0700 nethack (3.4.3-10.7) unstable; urgency=low * Non-maintainer upload to fix pending l10n issues. * Drop code dealing with upgrades from pre-3.4.0 version * Bump debhelper compatibility level to 7 * Replace "dh_clean -k" by dh_prep * Add ${misc:Depends} to all binary packages' dependencies as the package is built with debhelper that might trigger extra dependencies * nethack-x11: drop dependency on obsolete xbase-clients * drop build dependency on obsolete xutils * Debconf templates and debian/control reviewed by the debian-l10n- english team as part of the Smith review project. Closes: #519512 * [Debconf translation updates] - Italian. Closes: #522148 - French. Closes: #522210 - Spanish. Closes: #522259 - Japanese. Closes: #522385 - Basque. Closes: #522391 - German. Closes: #522960 - Swedish. Closes: #522975 - Italian. Closes: #523417 - Russian. Closes: #524070 - Portuguese (Carlos Lisboa). Closes: #524284 - Finnish (Esko Arajärvi). Closes: #532496 - Galician (marce villarino). Closes: #524265 - Traditional Chinese (Kanru Chen). Closes: #545485 -- Christian Perrier Sat, 12 Sep 2009 14:08:01 +0200 nethack (3.4.3-10.6) unstable; urgency=low * Non-maintainer upload. * Fix pending l10n issues. Debconf translations: - Spanish. Closes: #498436 - Traditional Chinese. Closes: #503174 - Italian. Closes: #503761 -- Christian Perrier Tue, 28 Oct 2008 22:53:25 +0100 nethack (3.4.3-10.5) unstable; urgency=low * Non-maintainer upload to fix pending l10n issues. * Debconf translations: - Brazilian Portuguese. Closes: #434312 - Finnish. Closes: #472628 - Basque. Closes: #481695 - Russian. Closes: #481813 * [Lintian] No longer use deprecated ${Source-Version} in Depends/Conflicts Use ${binary:Version} instead. -- Christian Perrier Mon, 05 May 2008 18:39:59 +0200 nethack (3.4.3-10.4) unstable; urgency=low * Non-maintainer upload with approval from Joshua Kwan. * Add LSB dependency header in init.d script (Closes: #458465) -- Petter Reinholdtsen Sat, 8 Mar 2008 18:27:05 +0100 nethack (3.4.3-10.3) unstable; urgency=low * Non-maintainer upload. * Drop nethack-gnome: it's experimental, and works with completely outdated gnome-libs. Closes: #460798 -- Pierre Habouzit Mon, 04 Feb 2008 17:23:08 +0100 nethack (3.4.3-10.2) unstable; urgency=low * NMU * Fix debconf template with wording from Helge Kreutzmann. closes: #399583. -- Clint Adams Tue, 31 Jul 2007 07:31:09 -0400 nethack (3.4.3-10.1) unstable; urgency=low * Non-maintainer upload to fix pending l10n issues. * Debconf translations: - German updated. Closes: #399601 - Galician. Closes: #412189 - Japanese. Closes: #412503 -- Christian Perrier Tue, 27 Feb 2007 19:31:40 +0100 nethack (3.4.3-10) unstable; urgency=medium * Fix brown paper bag bug relocating the nethack-x11 fonts, thanks Aaron Ucko. closes: #398483 -- Joshua Kwan Mon, 13 Nov 2006 17:42:00 -0800 nethack (3.4.3-9) unstable; urgency=low * Version the Build-Depends on libqt3-mt-dev (old old problem that's no longer relevant, really, but good to fix anyway.) * Move fonts to /usr/share/fonts/X11, closes: #362331 * Update debconf templates for like every language imaginable. closes: #341036, #365458, #374199, #396107 * Update path description in manpage. closes: #389553 * Save/restore umask around gnome_init call so that .gnome is created with sane permissions. closes: #397672 -- Joshua Kwan Wed, 8 Nov 2006 15:44:07 -0800 nethack (3.4.3-8) unstable; urgency=low * Add Vietnamese translation of Debconf templates, thanks Clytie Siddall. closes: #315912 * Delete the nethack dummy package; make all the nethack-* packages provide nethack, so that people can still apt-get install it without knowing that the packages are split that way. closes: #308711 * Bump to Standards-Version 3.6.2, no changes required. * "Hijack" the package; comaintainers have been AWOL for a very long time. * Mention nethack-lisp and nethack-el in nethack-common's Description. * Patch work: - 95_enh_engulf_prayers: successful prayer while engulfed gets you out. closes: #153736 - 20_gcc4_fix: GCC 4.x build fix by Andreas Jochens. closes: #297626 * Fix some bashisms reported by lintian. -- Joshua Kwan Thu, 11 Aug 2005 15:11:19 -0700 nethack (3.4.3-7) unstable; urgency=low * Remove the nonfunctional watch file. Sigh. * Add Czech translation of Debconf templates, thanks to Jan Outrata. closes: #261795 * Make sure recover-helper runs in /bin/sh, or things might go wrong. closes: #293291 * Patch work: - 08_linux_specifics: Update from Robert Millan to fix FTBFS on kfreebsd-gnu. closes: #290342 -- Joshua Kwan Thu, 17 Feb 2005 15:35:14 -0800 nethack (3.4.3-6) unstable; urgency=low * Patch work: - all ENH patches: record source, authors, URL - 94_enh_sortloot (new): add the sortloot patch. Not enabled by default. * Add a README.patches to note which patches are in Debian's Nethack package. * Correct date of old changelog entry - the upload really happened much later than the entry. * Add a watch file to benefit the DEHS project. -- Joshua Kwan Mon, 26 Jul 2004 20:15:57 -0700 nethack (3.4.3-5) unstable; urgency=low * Add Catalan translation (Closes: #248734) * Patch work: - 91_enh_menucolors: Fix Pasi Kallinen's email address. pk -> pkalli - 19_gnome_ext_events (new): Fix a problem in Gnomehack where mouse click events in the extended menu would not be handled (thus a certain choice might be chosen, but a different one 'picked' by the code). (Closes: #246265) -- Joshua Kwan Wed, 23 Jun 2004 11:32:05 -0700 nethack (3.4.3-4) unstable; urgency=low * Fix a call to 'su' in the init script that chokes zsh. * Remove some old documentation relics (3.4.1 -> 3.4.3). * Add NetHack.ad to nethack-x11's examples. * nethack dummy package now depends on nethack-x11 | nethack-console | nethack-gnome | nethack-lisp | nethack-qt. (Closes: #227192, #227405) * Fix xlibs-dev dependency. * 93_enh_dump.dpatch: Add the 'dump' patch that saves a log of interesting data about your player when he/she ascends, dies, or escapes. Default location will be in /var/games/nethack/dumps/${player}.lastgame.txt. * Change debhelper dependency to debhelper (>= 4.1.16) as per po-debconf(7). * Change build-dependency on groff to just groff-base. * Fix unquoted strings in .menu files, thanks lintian * Change maintainer line to nethack-maint@triplehelix.org, pending the resurrection of Alioth's lists. -- Joshua Kwan Sat, 13 Mar 2004 16:22:15 -0800 nethack (3.4.3-3) unstable; urgency=medium * Sigh, lost the nethack (arch all) package last upload. This should fix all the testing-related breakage. * Joshua Kwan : - More build system cleanups. - Remove x11/Makefile.src, missed last time. - Remove old warnings and caveats in README.Debian that are obsoleted with 18_overridewin.dpatch. (i.e., stick windowtype:tty into your $NETHACKOPTIONS if you intend to set it) - Applied a really great debian/rules simplification from Aaron Lehmann - 13_simple_mail.dpatch: allow our nethack patches to function with dgamelaunch (not in the Debian archive -- yet). Does not affect gameplay. - Delete nh10.pcf.*, somehow during one build nh10.pcf.gz snuck in. -- Joshua Kwan Mon, 29 Dec 2003 11:16:22 -0800 nethack (3.4.3-2) unstable; urgency=medium * Joshua Kwan : - Fix busted PIXMAPDIR that broke nethack-qt and nethack-gnome. Was actually in CVS but not applied to the uploaded source. - Lose t32-1024.xpm because it belongs to jnethack and doesn't work with gnomehack. - Clean up the build system by removing redundant Makefile.src's. + 05_build_cflags.dpatch replaced by 05_makefile_logic.dpatch; thanks Aaron Lehmann -- Joshua Kwan Sun, 21 Dec 2003 18:27:07 -0800 nethack (3.4.3-1) unstable; urgency=low * New upstream release. - Merged patches: 03_char_signedness.dpatch, 07_explore_mode_save.dpatch, 13_qt_warning_fixes.dpatch. - Manually rediffed: 14_common_config.dpatch - Fixed bugs: + xnethack segfaults if you close the class selection window (closes: #71234) + Bustling Town level generation may cause weird store 'entering' announcements and inaccessible stairs (closes: #216386) * Joshua Kwan : - Use perror() and change some wording in recover.c to make error messages useful. (Closes: #72582) - Set 'ignintr' in the GNOME default nethackrc to work around GNOME library bug #216454. Will not close until the bug is resolved in a non-hackish way. - As per discussion on debian-devel, turn off number_pad by default so as not to deviate from upstream. - 16_pixmapdir.dpatch: move all pixmaps into /usr/share/pixmaps/nethack/ and make all graphical nethacks work with this - Keep logfile, record, and perm when backing up old save games, because they are backwards-compatible with older versions. (Closes: #141843) - Remove the redundant 'Drop Many' entry from the GNOME Action menu. (Closes: #154750) - Use dpkg-statoverride(1) for storing recover setgid information if enabled. - Add French Debconf template translation by Nicolas Bertolissio . (Closes: #218729) - Document QT_FONTSIZE, QT_TILEWIDTH, QT_TILEHEIGHT in Qt nethackrc (Closes: #141245) - Remove the old /etc/init.d/nethack and its symlinks with a manual call to update-rc.d on postinst, due to a sneaky name change that crept in during 3.4.2 package work. (Closes: #223496) - Fix a few warnings in patches. - Make sure nethack-common and all the FE packages always have the same version using ${Source-Version} dependencies both ways. -- Joshua Kwan Mon, 15 Dec 2003 21:49:50 -0800 nethack (3.4.2-2) unstable; urgency=low * Acknowledge a NMU we missed last time from Daniel Jacobwitz , thanks! (Closes: #147166) * Ben Gertzfield : - Add symlink from /usr/lib/games/nethack/license to /usr/share/doc/nethack-common/copyright. (Closes: #215673) - Really include upstream source URL for LISP window system in copyright file. - Really include LISP windowing system patch from 0.9.2 upstream. (Closes: #215899) - Add 07_explore_mode_save.dpatch to use correct temporary buffer in sys/unix/unixmain.c when munging save file in explore mode. (Closes: #203229) * Joshua Kwan : - Add 92_enh_paranoid_hit.dpatch to force user to say 'yes' when asked to hit a peaceful monster; disabled by default, in-game option. (Closes: #62361) -- Joshua Kwan Wed, 15 Oct 2003 09:03:15 -0700 nethack (3.4.2-1) unstable; urgency=low * NetHack is now comaintained by Ben Gertzfield and Joshua Kwan. * New upstream version (closes: #208817) - You can no longer eat while sleeping, possibly fixed in this version, which closes: #184855 * Acknowledge NMUs/patches, thanks all around to: - Mario Lang (Closes: #186609, #187167) - Brian Nelson (Closes: #184173, #180215) * Ben Gertzfield : - Merge LISP window system patch into dpatch patches. - Merge LISP window system copyright into main copyright file. - Add upstream source URL for LISP window system to copyright file. - Update 12_lisp_windowing.dpatch to upstream nethack_el-0.9.2.tar.gz. - Add Joshua Kwan to uploaders list for co-maintainership. * Joshua Kwan : - Fix FTBFS caused by 'Invisible' being a youprop.h #define and used in a QListViewIterator enumerated type. (Closes: #213874) - Fix char signedness issue in gnbind.c (Closes: #170531) - Build nethack dummy package in binary-indep target. (Closes: #186619) - Steal t32-1024.xpm from jnethack - it's missing from NetHack upstream. This allows nethack-gnome to use the larger tileset. (Closes: #140398) - Now using dh_installinit; use defaults, so we don't go to /etc/rcS.d and start before NIS. (Closes: #164132) - No clue how this is meant to help, but it doesn't break anything, so let's wrap all our menu stuff in sh -c '' and see what happens. (Closes: #168385, #168386, #152232) - Allow the administrator to decide whether recover should be setgid games. (Closes: #148983) - Add a menu item to GNOME menu for readying/quivering. (Closes: #154627) - Also fix many qt_win.{cpp,h} warnings. - Bump Standards-Version to 3.6.1.0: o Use our own CFLAGS, this allows us to use DEB_BUILD_OPTIONS=noopt o Use /var/mail instead of /var/spool/mail (although both worked as the two are still symlinked to each other) o Question about old savegame backup becomes a debconf question, and moved meat of the logic into postinst - Use debian/compat instead of DH_COMPAT, bump it to V4. - Use 'ln -sf' and 'gzip -f' so that multiple calls of binary-arch work without cleaning. - Fixed upstream URL to one that works - Fix clean target so that pristine config.h is restored upon clean - Removed redundant call to update-rc.d. - Compress the nethack-common changelog.Debian. - Migrate source modifications to dpatch patches and build-depend on dpatch. - Consolidate massive amounts of nearly duplicate config.hs into one common configuration patch for include/config.h and add additional -Ds to CFLAGS for each build. - Add some enhancement patches (Save/bones are NOT affected): + 90_enh_hpmon.dpatch: HP monitor which visually alerts you when HP goes below 2/3, 1/3, and 1/10 of total. + 91_enh_menucolors.dpatch: Enables you to specify regular expressions to highlight in your inventory (for example, cursed/uncursed/blessed items.) -- Ben Gertzfield Mon, 13 Oct 2003 17:22:01 -0700 nethack (3.4.1-1.2) unstable; urgency=low * NMU * Apply patch to build nethack-lisp (required for nethack-el) (Closes: Bug#186609) -- Mario Lang Tue, 1 Apr 2003 11:08:26 +0200 nethack (3.4.1-1.1) unstable; urgency=low * Non-maintainer upload. * Fix build-dependencies so that package is buildable on unstable. (Closes: #184173) * Build against multi-threaded Qt3. (Closes: #180215) * Include qmemarray.h instead of obsolete qarray.h so that a dependency on libqt3-compat-headers is not needed. -- Brian Nelson Fri, 14 Mar 2003 22:25:03 -0800 nethack (3.4.1-1) unstable; urgency=low * New upstream version. (Closes: #182742) * Upstream included patch to build Nethack on ia64. (Closes: #142079) * Boulder -> Landmine segfault fixed upstream. (Closes: #144779) * Change Build-Depends to depend on libxaw7-dev | libxaw-dev. (Closes: #169995) * Top ten list buffer overflow fixed upstream. (Closes: #181854) * Mention .nethackrc.gnome, .nethackrc.x11, and .nethackrc.qt files (custom to Debian) in nethack manpage. (Closes: #153738) * Okay, okay, I made a nethack-console package that has no dependancies on any X11 libs or other big packages. (Closes: #140303, #142018) * Move dependancy on xbase-clients to nethack-x11. It's the only one that needs font making. * Note: We define __USE_GNU in sys/unixres.c; looks like the constant RTLD_NEXT is only defined if __USE_GNU is defined. * Use Guidebook.txt for docs. For some reason, plain 'Guidebook' is full of garbage now after 'make Guidebook'. (Closes: #173127, #177252) -- Ben Gertzfield Sat, 1 Mar 2003 17:03:11 -0800 nethack (3.4.0-4) unstable; urgency=high * Install recover and recover-helper mode 644, not 664. (Closes: #167542) -- Ben Gertzfield Sun, 3 Nov 2002 22:45:27 -0800 nethack (3.4.0-3.1) unstable; urgency=high * NMU by the security team. * Import security fixes from the slashem package (Closes: #147166). -- Daniel Jacobowitz Sat, 6 Jul 2002 17:01:05 -0400 nethack (3.4.0-3) unstable; urgency=low * Change DEFAULT_WINDOW_SYS to "tty" unconditionally for all GUI frontends. This fixes the case where a user sets NETHACKOPTIONS to customize just the dog/cat name or what have you, but doesn't set a windowtype:tty flag. Then, the /usr/bin/nethack script will not touch NETHACKOPTIONS, and it will give a strange error when it starts up the Qt/Gnome version if X is unavailable. (Closes: #142055) * Patch unixconf.h to use /usr/bin/mail instead of /bin/mail. (Closes: #142000) * Fix nethackrc.qt -> .nethackrc.qt typo in README.Debian. (Closes: #141244) * Not defining SCORE_ON_BOTL for the time being -- it introduces a save-game file incompatibility, so I will do that for the next upstream release. -- Ben Gertzfield Wed, 10 Apr 2002 12:31:21 +0900 nethack (3.4.0-2) unstable; urgency=MEDIUM * Fix recover to use VAR_PLAYGROUND, not HACKDIR. (Closes: #140701) * Fix menu entries. Now nethack-common has the /usr/games/nethack entry (assumed to be text; if the user overrides it, they can override the menu entry too), nethack-x11 has /usr/games/xnethack, etc. etc. (Closes: #140704) * Fix a security bug in recover; other users could "recover" save games belonging to users besides themselves. However, they could not load the generated save file unless they could also change their UID, as the save file name is always ###playername, where ### is the UID allowed to open saved game. * Now, recover will only "recover" crash files belonging to the same user (or any user, if run by root). Also, it chowns the resultant save file to the original owner of the crash files. (Closes: #104247) * Add hints "Roguelike,Maze,Dungeon" to menu entries Just For Fun. -- Ben Gertzfield Tue, 2 Apr 2002 23:10:06 +0900 nethack (3.4.0-1) unstable; urgency=low * New upstream version. * Split into nethack-common, nethack-x11, nethack-gnome, nethack-qt packages. (See README.Debian for details.) (Closes: #88129, #43764, #78046, #53356, #58528) * nethack package is now a dummy package that depends on nethack-common and nethack-x11 for backwards compatibility. * /usr/games/nethack now managed by update-alternatives; can be set to either tty or graphical version. * Save files changed format again; prompt to back up and wipe /var/games/nethack and/or /var/lib/games/nethack on upgrade. * Use dh_installman instead of dh_installmanpages. * Use dh_installxfonts to register X fonts, etc. * Install dlb utility in /usr/lib/games/nethack. (Closes: #129741) * Make sure NetHack.tile_file is not commented out in app-defaults file. (Closes: #119673) * config files moved to /etc/nethack/nethackrc.* for various windowing types. Config files in ~/.nethackrc.* now supported per-windowing type. (HACKOPTIONS still overrides them, though.) * Fixed numpad issue many moons ago in xterm: (Closes: #52744) * Unable to reproduce old ?a ?b bug in xnethack. (Closes: #86959) * (Oops, typo when fixed manpage in last version.) (Closes: #111097) * desparate -> desperate in package description (Closes: #125180) * Using --prefix for tempfile now. (Closes: #54586) * Shipping with NetHack*autofocus: False in X11 application-defaults file to work around odd Xaw bugs that pop up now and again; the patch supplied in #94298 no longer applies to 3.4.0, but the crashes still show up with NetHack*autofocus: True once in a while. -- Ben Gertzfield Sat, 23 Mar 2002 21:57:18 +0900 nethack (3.3.1-7) unstable; urgency=low * Sorry for being out of touch for a while. I'm back in business now that I'm settled down in Tokyo, and have my own desktop computer again. * Work-around for Xt-related segfaults. May be fixed upstream in next release. (Closes: #94298) * Use upstream NetHack application-defaults file, and merge in changes from upstream nethack.rc for X11 with our customized Debian one. (Closes: #95533) * Check for existence of old /var/lib/games/nethack dir before warning about its possible existence (covers when a user installs a pre 3.3.1-5 nethack, purges it, then installs a newer one). (Closes: #95536) * Fix manpage to refer to /usr/bin/mail and /usr/lib/games/nethack. (Closes: #111096) -- Ben Gertzfield Sat, 22 Sep 2001 20:13:10 +0900 nethack (3.3.1-6) unstable; urgency=MEDIUM * Whoops. Forgot to copy over the old save/high score files from /var/lib/games/nethack -> /var/games/nethack. Do so carefully, then remove the old directory. (Closes: #92501) * postrm/preinst still had old dir in there. Oops. So did /etc/init.d/nethack.. I'm very embarassed. Fixed. * The preinst does still look in /var/lib/games/nethack for pre-3.3.1 versions to archive them. -- Ben Gertzfield Thu, 12 Apr 2001 20:01:04 -0700 nethack (3.3.1-5) unstable; urgency=low * Fix FHS bug (/var/lib/games -> /var/games). (Closes: #92501) * Just a note, I'm not working on building gnomehack as of yet, because with GTK+ 1.2.9 and later, it's quite useless, since nethack has to run set-GID and GTK+ >= 1.2.9 forbids this (with good reason.) * A lot of bugs were reassigned from gnomehack to nethack that are not nethack bugs. - Nethack is in .orig.tar.gz+.diff.gz format. (Closes: #62976) - No alsa deps for nethack. (Closes: #56738) - The stairs bug mentioned is unreproducable in stock Nethack. (Closes: #72202) - Menu entry for creating new game bug? Seems gnome-specific. (Closes: #79771) - Options dialog bug is gnomehack-specific. (Closes: #64944) - Gnomehack used a different recovery script that was broken. Not applicable to nethack. (Closes: #69080, #71193) -- Ben Gertzfield Wed, 11 Apr 2001 18:45:00 -0700 nethack (3.3.1-4) unstable; urgency=medium * Add Build-Deps on libxaw-dev and bsdmainutils. (Closes: #89565) Thanks to neuro and BenC for pointing these out. -- Ben Gertzfield Tue, 13 Mar 2001 20:05:13 -0800 nethack (3.3.1-3) unstable; urgency=low * Buh. Stupid typo in /etc/init.d/nethack; doesn't actually run. Fixed. Also implemented stop|reload|restart|force-reload (which do nothing, as this is a rcS.d-only script) for policy reasons. * Lintian fix: make symlink for license file relative. * Lintian fix: don't use menu icon "none". -- Ben Gertzfield Mon, 12 Mar 2001 23:53:45 -0800 nethack (3.3.1-2) unstable; urgency=low * Bug hunting release: add Build-Depends (Closes: #84643) * Change init.d/nethack to not exit on failure, and be ash-compliant (Closes: #75972) * Move app-defaults to new /etc/X11 location and make it a conffile. (Closes: #86281) * Patch from Ian Jackson to make recover look in the right place. (Closes: #72584) * Fixed LOGDIR typo long ago. (Closes: #65486) * Remove call to dh_suidregister and add Conflicts: suidmanager (<< 0.50) * Change calls to /usr/X11R6/bin/ utilities to /usr/bin/X11/. * Add Depends: on xutils, as we call mkfontdir in postinst/postrm. -- Ben Gertzfield Mon, 12 Mar 2001 21:14:57 -0800 nethack (3.3.1-1) unstable; urgency=low * New upstream version. (Huzzah!) * Wow. I don't have to build with special patches any more; just about *everything* was accepted upstream. Go DevTeam! You guys rule. :) (One thing I noticed wasn't patched upstream was disabling IBMgraphics on the Rogue level. If people still notice problems, let me know; the historic problems with IBMgraphics on the rogue level may have been fixed. -- Ben Gertzfield Fri, 11 Aug 2000 16:52:27 -0700 nethack (3.3.0-9) unstable; urgency=low * Fix LOGDIR typo that could cause segfaults. (Eek!) Closes: #65486 -- Ben Gertzfield Sun, 11 Jun 2000 23:03:35 -0700 nethack (3.3.0-8) frozen unstable; urgency=low * Fix preinst to not print all messages on one line. (Ick. :) -- Ben Gertzfield Mon, 31 Jan 2000 13:27:37 -0800 nethack (3.3.0-7) unstable; urgency=low * Patch to fix bones-file handling in /var/lib/games/nethack. (The bones-file functions were changed from 3.2.2 and so broke my older patch.) Closes: #54961 -- Ben Gertzfield Wed, 12 Jan 2000 21:50:01 -0800 nethack (3.3.0-6) unstable; urgency=low * Change /usr/games/nethack script to remove stupid 'max number of Nethack players at once' hack. * Change /etc/init.d/nethack to work on *any* lock files in /var/lib/games/nethack (use *.0 instead of *lock.0) * Patch to fix nasty bugs introduced by separating lock/savefiles into /var/lib/games/nethack. (Forgot some /s to a few sprintfs, ouch!) * Patch to fix recover to work with separate /var/lib/games/nethack once again. Closes: #52995 * Change default cat/dog/fruit names when using xnethack to be more.. Debian-y. :) -- Ben Gertzfield Wed, 5 Jan 2000 16:32:53 -0800 nethack (3.3.0-5) unstable; urgency=low * Make root the user able to enter wizard (debug) mode with 'nethack -D' instead of user 'wizard', the old default. Closes: #53901 * Add link from /usr/lib/games/nethack/license -> /usr/share/doc/nethack/copyright so ?i works in game. Closes: #53979 * Make sure we pass arguments to nethack when run from xnethack script. Fixes: #54104 -- Ben Gertzfield Wed, 5 Jan 2000 10:23:32 -0800 nethack (3.3.0-4) unstable; urgency=low * Add color patch to fix swap of red and blue colors. * Port Linux console IBMgraphics patch from 3.2.2. * Remove all use of --suffix argument to tempfile, to make building slink packages easier. Closes: #52968 -- Ben Gertzfield Fri, 17 Dec 1999 15:26:05 -0800 nethack (3.3.0-3) unstable; urgency=low * Fix missing 'esac' at end of /etc/init.d/nethack. Closes: #52738 -- Ben Gertzfield Tue, 14 Dec 1999 15:35:32 -0800 nethack (3.3.0-2) unstable; urgency=low * Note split of spoilers in README.Debian. Closes: #52628 * Improve logic in preinst for various combinations of 'install' and 'upgrade' arguments. * Test for existence of /var/lib/games/nethack before trying to archive it in preinst. Closes: #52666 * (Yes, 3.3.0 fixes the Y2K bugs in Nethack! Sorry for not mentioning this below.) -- Ben Gertzfield Mon, 13 Dec 1999 22:15:10 -0800 nethack (3.3.0-1) unstable; urgency=low * Finally! A new upstream version! Fixes: #52565 * No more bashisms in postinst. Fixes: #36006 * Use /etc/init.d/nethack and a link /etc/rcS.d/nethack instead of /etc/rc.boot/nethack. Fixes: #32441 * Spoilers split off into separate nethack-spoilers package. (Note: spoilers may be out of date now for 3.3.0!) * NOTE NOTE NOTE: Save files from 3.2.2 are *NOT COMPATIBLE* with 3.3.0 so the preinst will prompt the user and archive the old save directory, or abort. * Now depends on debianutils (>= 1.13) because we use 'tempfile' program in the preinst to get a safe filename for archiving into for the above NOTE NOTE NOTE. This sucks, though, because slink's debianutils is 1.10, but it doesn't support the --suffix we need to make a tempfile with .tar.gz as the extension. -- Ben Gertzfield Sun, 12 Dec 1999 14:22:23 -0800 nethack (3.2.2-16) unstable; urgency=low * Use Richard Braakman's wonderful patch to fix color support in Nethack with ncurses 4.2. (Fixes: #27817) * Use Hartmut Koptein's patch for glibc 2.1 prototypes checking. (Fixes: #32012) -- Ben Gertzfield Thu, 21 Jan 1999 07:00:41 -0800 nethack (3.2.2-15) frozen unstable; urgency=low * Recompile with ncurses 4.2. -- Ben Gertzfield Fri, 30 Oct 1998 12:38:12 -0800 nethack (3.2.2-14) unstable; urgency=low * Add test in preinst to make sure we don't check $2 on anything but an upgrade, as dpkg can call the preinst with no $2 if we're doing a fresh install, and that'll make my test to see what version we're upgrading from crash. (Fixes: #27101) -- Ben Gertzfield Sat, 26 Sep 1998 10:57:36 -0700 nethack (3.2.2-13) unstable; urgency=low * Applied David Damerell's paranoid_quit and big top 10 patches. (Fixes: #26609) -- Ben Gertzfield Mon, 21 Sep 1998 19:30:22 -0700 nethack (3.2.2-12) unstable; urgency=low * Made postinst really anal on checks for upgrades from old versions, to make all permissions correct. (Fixes: #25881, #19588) * Converted debian/rules to debhelper. (Fixes: #14492) * /var/lib/games/nethack/{record,logfile,perm} are no longer conffiles, and the management of them has moved to the postinst/postrm scripts. * Enabled tiles by default when running with X enhancements. * Created xnethack script to run the X-based nethack. * Disabled the mail daemon mail-check in X-based nethack, as it could cause nethack to freeze if run from the menu entry (as opposed to from within an xterm). -- Ben Gertzfield Tue, 18 Aug 1998 17:10:16 -0700 nethack (3.2.2-11) unstable; urgency=low * Hamm release of 3.2.2-10. -- Ben Gertzfield Tue, 28 Oct 1997 17:38:11 -0800 nethack (3.2.2-10) stable; urgency=low * Re-built with libc5 libraries, as 3.2.2-7 was broken. * Fixed text menu entry pausing bug. * Took out dpkg-shlibdeps call for the lib5 build. * Changed chmod /var/lib/games/nethack 04775 in postinst to 02775. -- Ben Gertzfield Tue, 28 Oct 1997 12:53:37 -0800 nethack (3.2.2-9) unstable; urgency=low * Re-added fix for permissions on /var/lib/games/nethack to postinst; fixes bug #13596. * Added X NetHack entry to menu file, fixes wishlist #13036. * Menu entry for text NetHack now pauses after the game ends, fixes bug #13035. * Built with all-glibc libraries, fixes bug #12793. * Copied 'license' text-file to /usr/lib/games/nethack, fixes bug #13033. * Upgraded to Standards-Version 2.3.0.0. -- Ben Gertzfield Fri, 10 Oct 1997 16:17:46 -0700 nethack (3.2.2-8) unstable; urgency=low * New maintainer. * Compiled under libc6. * Added patch for proper IBM graphics support. * Added patch for sound (speaker) support at the console. * No longer writes to /usr/lib/games/nethack; fixes bug #10454. * No longer uses i386-specific commands in makefile; fixes bug #10795. * Re-added dgn_comp and lev_comp to package; fixes bug #11013. * Created /etc/rc.boot/nethack to recover save-files on boot; fixes bug #11012. * Changed rules file to no longer use debstd. * Made the recover utility setgid and removed the -d option to prevent cheating. * Really fixed bug #10149 -- both logfile and record are now conffiles. * If upgrading from a version with incompatible logfile/record files, warns before clearing out /var/lib/games/nethack. -- Ben Gertzfield Wed, 23 Jul 1997 20:33:26 -0500 nethack (3.2.2-7) frozen unstable; urgency=low * changes to makefile to force compiling under libc5 * fixed bug #10149: upgrading no longer kills the high score file * fixed bug #9839: now provides nh10 font -- Paul Haggart Mon, 26 May 1997 22:34:36 -0400 nethack (3.2.2-6) frozen unstable; urgency=low * routine cleanup of makefiles * fixed debian/rules to actually clean up on 'debian/rules clean' * fixed bug #9288: debian/rules doesn't delete manpages until after build * fixed bug #9287: X11 support added -- Paul Haggart Thu, 1 May 1997 19:32:57 -0400 nethack (3.2.2-5) frozen unstable; urgency=low * postinst tweak to allow saved games to actually save -- Paul Haggart Wed, 23 Apr 1997 22:55:20 -0400 nethack (3.2.2-4) frozen unstable; urgency=low * added postinst to fix bad permissions/owners on upgrades * fixed termcap/terminfo bug -- Paul Haggart Tue, 8 Apr 1997 22:35:44 -0400 nethack (3.2.2-3) unstable; urgency=high * fixed -massive- error with lockfiles * fixed gzip error with saved games * now includes 'recovery' so you can try to restore a crashed game -- Paul Haggart Sat, 15 Feb 1997 18:43:48 -0500 nethack (3.2.2-2) unstable; urgency=low * changed email address from 'debian.com' to 'debian.org' -- Paul Haggart Wed, 12 Feb 1997 15:55:33 -0500 nethack (3.2.2-1) unstable; urgency=low * new upstream source (sorry this took so long to get done!) * wizard patch removed .. it wouldn't patch into 3.2.2 -- Paul Haggart Mon, 10 Feb 1997 22:08:09 -0500 nethack (3.2.1-4) unstable; urgency=low * removed qt interface because of policy complaints -- Paul Haggart Mon, 2 Dec 1996 15:08:15 -0500 nethack (3.2.1-3) unstable; urgency=low * added wizard patch -- Paul Haggart Mon, 18 Nov 1996 19:12:24 -0500 nethack (3.2.1-2) unstable; urgency=low * added qt interface * added spoiler files -- Paul Haggart Sat, 16 Nov 1996 02:22:05 -0500 nethack (3.2.1-1) unstable; urgency=low * New maintainer * Initial release -- Paul Haggart Sun, 27 Oct 1996 05:56:48 -0500 debian/nethack-common.init0000644000000000000000000000424311765144123012765 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: nethack-common # Required-Start: $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Nethack save-file recovery script for Debian ### END INIT INFO # # Ben Gertzfield (che@debian.org) 29 July 1997 # Copyright 1997 Ben Gertzfield. This script is released under the # GNU General Public License, version 2 or later. PATH=/bin:/usr/bin:/sbin:/usr/sbin GAMEDIR=/var/games/nethack set -e cd $GAMEDIR case "$1" in start) # Has the nethack package been removed? test -x /usr/lib/games/nethack/recover-helper || exit 0 for file in *.0; do # Note "$file" is always explicitly quoted to avoid attack. # If there are no files, then "$file" = "*.0", which doesn't # exist, so we skip once through this loop and exit. # Also, the way this is written, some of the files may # disappear before we look at them. # Also check -L--there shouldn't be any symlinks, but if there # are, we aren't going to process them. if [ -f "$file" ] && [ ! -L "$file" ]; then # Use 'find' to reliably determine the file's owner user name. owner="$(find "$file" -maxdepth 0 -printf '%u')" # Refuse to recover root's nethack files. if [ "xroot" = "x$owner" ]; then echo "Ignoring root's Nethack unrecovered save file." else echo "Recovering Nethack save files owned by $owner: " # "$owner" is explicitly quoted to avoid attack. # In particular, if the "find" command above fails, # so will the 'su' command below. # There really isn't a good safe way to pass a filename to # a child shell through 'su -c', so instead we use a helper # script running as the user which recovers everything # owned by that user. This avoids the issue of quoting # filenames passed through the shell entirely. su --shell=/bin/sh -c /usr/lib/games/nethack/recover-helper "$owner" fi fi done ;; stop|reload|restart|force-reload) ;; *) N=/etc/init.d/nethack-common echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac debian/x11/0000755000000000000000000000000011765144123007603 5ustar debian/x11/nethack-tty.sh0000644000000000000000000000315011765144123012371 0ustar #!/bin/sh set -e HACKSTYLE=x11 if [ -z "$NETHACKOPTIONS" ]; then if [ -e $HOME/.nethackrc ]; then NETHACKOPTIONS=$HOME/.nethackrc export NETHACKOPTIONS else NETHACKOPTIONS=/etc/nethack/nethackrc.tty export NETHACKOPTIONS fi fi HACKDIR=/usr/lib/games/nethack export HACKDIR HACK=$HACKDIR/nethack-$HACKSTYLE # see if we can find the full path name of PAGER, so help files work properly # assume that if someone sets up a special variable (HACKPAGER) for NetHack, # it will already be in a form acceptable to NetHack # ideas from brian@radio.astro.utoronto.ca if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \) then HACKPAGER=$PAGER # use only the first word of the pager variable # this prevents problems when looking for file names with trailing # options, but also makes the options unavailable for later use from # NetHack for i in $HACKPAGER do HACKPAGER=$i break done if test ! -f $HACKPAGER then IFS=: for i in $PATH do if test -f $i/$HACKPAGER then HACKPAGER=$i/$HACKPAGER export HACKPAGER break fi done IFS=' ' fi if test ! -f $HACKPAGER then echo Cannot find $PAGER -- unsetting PAGER. unset HACKPAGER unset PAGER fi fi cd $HACKDIR exec $HACK "$@" $ARGS debian/x11/nethackrc0000644000000000000000000000454411765144123011477 0ustar # # System-wide NetHack configuration file for X-based NetHack. # OPTIONS=windowtype:x11,toptenwin,hilite_pet,!number_pad OPTIONS=fixinv,safe_pet,sortpack,tombstone,color OPTIONS=verbose,news,fruit:potato OPTIONS=dogname:Slinky OPTIONS=catname:Rex OPTIONS=pickup_types:$ OPTIONS=nomail # Enable this if you want to see your inventory sorted in alphabetical # order by item instead of by index letter: # OPTIONS=sortloot:full # or if you just want containers sorted: # OPTIONS=sortloot:loot # # There are 17 object symbols and various graphics symbols. # The descriptions of these symbols can be found in dat/opthelp. # # # Font: nh10 (10x20) # OBJECTS= 180 183 188 192 181 184 182 189 190 196 \ 191 194 193 187 185 186 195 # DUNGEON= 032 025 018 013 012 014 011 015 023 024 \ 022 021 128 129 130 131 132 035 035 133 \ 134 135 136 137 145 146 144 124 143 142 \ 141 140 149 150 031 031 147 148 031 161 \ 140 # TRAPS= 138 138 138 138 138 138 138 138 138 138 \ 138 138 138 138 138 139 138 138 138 138 \ 138 138 # EFFECTS= 151 152 153 154 155 156 157 158 \ 159 160 161 162 \ 163 164 165 166 167 168 169 170 \ 171 172 173 174 175 176 177 178 179 # # # Font: ibm (8x14) # #OBJECTS= 207 210 215 219 208 211 209 216 217 223 \ # 218 221 220 214 212 213 222 # #DUNGEON= 032 128 129 130 131 132 133 134 135 136 \ # 137 138 139 045 124 142 143 035 035 144 \ # 145 146 147 148 155 156 227 124 154 153 \ # 152 151 159 160 200 200 157 158 250 170 \ # 151 # #TRAPS= 149 149 149 149 149 149 149 149 149 149 \ # 149 149 149 149 149 150 149 149 149 149 \ # 149 149 # #EFFECTS= 161 162 163 164 165 166 167 168 \ # 169 170 171 172 \ # 173 174 175 176 177 178 179 180 \ # 181 182 183 184 185 186 187 188 189 # # # Font: a "standard" font like 6x13 # Note that this version is unlikely to work on a tty on a Unix system because # many of these characters are also control characters. # #DUNGEON = 032 025 018 013 012 014 011 015 023 024 \ # 022 021 031 045 124 043 043 035 035 031 \ # 035 001 060 062 060 062 019 124 092 035 \ # 123 125 031 125 046 046 035 035 046 127 \ # 125 # #TRAPS= 094 094 094 094 094 094 094 094 094 094 \ # 094 094 094 094 094 002 094 094 094 094 \ # 094 094 # #EFFECTS= 124 045 092 047 042 033 041 040 \ # 048 035 064 042 \ # 047 045 092 124 124 092 045 047 \ # 047 064 092 064 064 064 092 064 047 debian/x11/NetHack.ad0000644000000000000000000001634011765144123011432 0ustar ! The display_file, tombstone, and menu windows are all formatted assuming ! a fixed width font. Text windows may or may not be formatted as above. ! The rip window applies if the GRAPHIC_TOMBSTONE option is turned on, and ! requires a 12 pixel font for correct appearance. ! NetHack*font: variable NetHack*display_file*font: fixed NetHack*tombstone*font: fixed NetHack*rip*font: -*-times-medium-r-*-*-12-*-*-*-*-*-*-* NetHack*menu*font: fixed !NetHack*text*font: fixed NetHack*map*font: nh10 ! To use full-color tiles for the map, uncomment the tile file name. ! If you use a 100dpi (or greater) monitor you may wish to double the ! tile size so you can see the figures. If NetHack was compiled to ! use XPM (USE_XPM in config.h), the tile_file is a standard XPM file. ! Otherwise, it is a custom format. double_tile_size only applies to ! the custom format - to enlarge an XPM file, use processing tools ! such as XV or preferably PBMplus. ! NetHack.tile_file: /usr/share/pixmaps/nethack/x11tiles !NetHack.double_tile_size: True ! ! The annotation of pets. NetHack.pet_mark_bitmap: /usr/share/pixmaps/nethack/pet_mark.xbm NetHack.pet_mark_color: Red ! Tombstone ! The image file NetHack.tombstone: /usr/share/pixmaps/nethack/rip.xpm ! Text starts at (tombtext_x, tombtext_y) and subsequent lines ! are displaced by (tombtext_dx, tombtext_dy) pixels. If you NetHack.tombtext_x: 155 NetHack.tombtext_y: 78 NetHack.tombtext_dx: 0 NetHack.tombtext_dy: 13 ! The color to use for the text on the hero's tombstone NetHack*rip*foreground: black ! Translation tables. There are currently several actions in nethack, but ! the only one you should be using is "input()", which, with no parameters, ! uses XLookupString to translate your keypress into a command. You ! can optionally give it parameters to change the behavior, see the example ! below. Note that you have to specify the translations in every appropriate ! window. NetHack*message*translations: : input() ! ! Example extra translations for the map window. ! NetHack*map*translations: #override \ !Left: input(h) \n\ !Right: input(l) \n\ !Up: input(k) \n\ !Down: input(j) ! ! The icon to use; supported values are nh72, nh56, and nh32; nh72 is the ! default. Some window managers may not support the larger icon sizes. ! It is not guaranteed that the window manager will honor the icon selection. NetHack*icon: nh56 ! ! If True, the default, a popup for single character prompts such as y/n ! questions is _not_ used. NetHack*slow: True ! The number of lines the message window will show without scrolling. !NetHack*message_lines: 12 ! ! If True, the message window has a line that seperates old and new messages. !NetHack*message_line: True ! ! If True, force keyboard to attach to popup windows. Some window managers ! enforce a click-to-focus-keyboard policy (e.g. the DECwindows wm). NetHack ! has a lot of popups and is almost unplayable without some kind of autofocus. NetHack*autofocus: False ! ! Specify the number of rows and columns of the map window. The default ! is the standard 80x21 window. Note: this _does_not_ change nethack's ! level size, only what you see of it. !NetHack*map*rows: 21 !NetHack*map*columns: 80 ! Parts of the fancy status display. ! NetHack*status_condition.borderWidth: 0 NetHack*status_info*borderWidth: 0 ! Sample color screen entries. ! NetHack*nethack.background: wheat NetHack*map*yellow: gold NetHack*map*brown: tan NetHack*map*gray: grey85 NetHack*map*foreground: wheat NetHack*map*background: grey40 NetHack*fancy_status.skipAdjust: True NetHack*fancy_status.background: wheat NetHack*status_info*foreground: Sienna NetHack*status_info*background: wheat NetHack*status_info.background: wheat NetHack*status_attributes*foreground: black NetHack*status_attributes*background: white NetHack*status_condition*foreground: red NetHack*status_condition*background: wheat NetHack*Scrollbar*foreground: Sienna NetHack*Scrollbar*background: wheat NetHack*status_info*showGrip: False NetHack*status_attributes*showGrip: False NetHack*player_selection*random.borderColor: blue NetHack*player_selection*random.borderWidth: 2 NetHack*player_selection*random.foreground: blue NetHack*player_selection*random.accelerators: #override\n\ Return: set() notify() unset() NetHack*player_selection*quit.borderColor: blue NetHack*player_selection*quit.foreground: blue NetHack*player_selection*Command.borderColor: red NetHack*player_selection*Command.foreground: red NetHack*player_selection*quit.accelerators: #override\n\ Escape: set() notify() unset() NetHack*race_selection*random.borderColor: blue NetHack*race_selection*random.borderWidth: 2 NetHack*race_selection*random.foreground: blue NetHack*race_selection*random.accelerators: #override\n\ Return: set() notify() unset() NetHack*race_selection*quit.borderColor: blue NetHack*race_selection*quit.foreground: blue NetHack*race_selection*Command.borderColor: red NetHack*race_selection*Command.foreground: red NetHack*race_selection*quit.accelerators: #override\n\ Escape: set() notify() unset() NetHack*gender_selection*random.borderColor: blue NetHack*gender_selection*random.borderWidth: 2 NetHack*gender_selection*random.foreground: blue NetHack*gender_selection*random.accelerators: #override\n\ Return: set() notify() unset() NetHack*gender_selection*quit.borderColor: blue NetHack*gender_selection*quit.foreground: blue NetHack*gender_selection*Command.borderColor: red NetHack*gender_selection*Command.foreground: red NetHack*gender_selection*quit.accelerators: #override\n\ Escape: set() notify() unset() NetHack*alignment_selection*random.borderColor: blue NetHack*alignment_selection*random.borderWidth: 2 NetHack*alignment_selection*random.foreground: blue NetHack*alignment_selection*random.accelerators: #override\n\ Return: set() notify() unset() NetHack*alignment_selection*quit.borderColor: blue NetHack*alignment_selection*quit.foreground: blue NetHack*alignment_selection*Command.borderColor: red NetHack*alignment_selection*Command.foreground: red NetHack*alignment_selection*quit.accelerators: #override\n\ Escape: set() notify() unset() NetHack*extended_commands*dismiss.borderColor: blue NetHack*extended_commands*dismiss.foreground: blue NetHack*extended_commands*help.borderColor: blue NetHack*extended_commands*help.foreground: blue NetHack*extended_commands*Command.borderColor: red NetHack*extended_commands*Command.foreground: red NetHack*extended_commands*help.accelerators: #override\n\ :?: set() notify() unset() NetHack*extended_commands*dismiss.accelerators: #override\n\ Escape: set() notify() unset() ! ! ! The following are the default 15 colors that the nethack map uses. ! If they don't look good on your screen, change them. ! ! The foreground color is used as "no color". ! !NetHack*map*black: black !NetHack*map*red: red !NetHack*map*green: pale green !NetHack*map*brown: brown !NetHack*map*blue: blue !NetHack*map*magenta: magenta !NetHack*map*cyan: light cyan !NetHack*map*gray: gray !NetHack*map*orange: orange !NetHack*map*bright_green: green !NetHack*map*yellow: yellow !NetHack*map*bright_blue: royal blue !NetHack*map*bright_magenta: violet !NetHack*map*bright_cyan: cyan !NetHack*map*white: white debian/x11/nethack.sh0000644000000000000000000000101711765144123011553 0ustar #!/bin/sh set -e HACKSTYLE=x11 if [ -z "$NETHACKOPTIONS" ]; then if [ -e $HOME/.nethackrc.$HACKSTYLE ]; then NETHACKOPTIONS=$HOME/.nethackrc.$HACKSTYLE export NETHACKOPTIONS elif [ -e $HOME/.nethackrc ]; then NETHACKOPTIONS=$HOME/.nethackrc export NETHACKOPTIONS else NETHACKOPTIONS=/etc/nethack/nethackrc.$HACKSTYLE export NETHACKOPTIONS fi fi HACKDIR=/usr/lib/games/nethack export HACKDIR HACK=$HACKDIR/nethack-$HACKSTYLE cd $HACKDIR export OVERRIDEWIN=$HACKSTYLE exec $HACK "$@" $ARGS debian/nethack-common.postinst0000644000000000000000000000430711765144123013706 0ustar #!/bin/sh # Nethack post-installation script for Debian # # Ben Gertzfield (che@debian.org) 29 July 1997 # Joshua Kwan (joshk@triplehelix.org) 11 Oct 2003 # Copyright 1997 Ben Gertzfield, 2003 Joshua Kwan. This script is # released under the GNU General Public License, version 2 or later. # Modified 10 October 1997 to fix permissions on /var/games/nethack. # Modified 18 August 1998 to fix more upgrade problems from ancient # nethacks # Modified 11 April 2001 to change path to /var/games/nethack. # Modified 23 March 2002, removed code to change path from # /var/lib/games/nethack -> /var/games/nethack since the save files # changed format anyway. # Modified 11 Oct 2003, move all the preinst stuff here. # Modified 19 Feb 2009, drop the "backup incompatible" stuff set -e . /usr/share/debconf/confmodule LOGDIR=/var/games/nethack OLDLOGDIR=/var/lib/games/nethack if [ "$1" = "configure" ]; then db_get nethack-common/recover-setgid if [ "$RET" = false ]; then # Remove the statoverride that may have been left over from other # configurations if dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null then dpkg-statoverride --remove /usr/lib/games/nethack/recover fi # Just in case chmod 755 /usr/lib/games/nethack/recover else if ! dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null then dpkg-statoverride --add root games 2755 /usr/lib/games/nethack/recover fi chmod 2755 /usr/lib/games/nethack/recover fi db_stop for file in perm record logfile; do if [ ! -e /var/games/nethack/$file ]; then touch /var/games/nethack/$file chmod 0664 /var/games/nethack/$file chown root:games /var/games/nethack/$file fi done # stale rc.d file if [ -f "/etc/rcS.d/S85nethack" ]; then echo "Removing old init script and its symlinks." rm -f /etc/init.d/nethack update-rc.d -f nethack remove fi if [ -f "/etc/rc0.d/K01nethack-common" ]; then echo "Removing shutdown functionality for the nethack-common init script." # dh_installinit takes care of the rest. update-rc.d -f nethack-common remove fi fi #DEBHELPER# debian/nethack-x11.postinst0000644000000000000000000000036111765144123013023 0ustar #!/bin/sh set -e update-alternatives --install /usr/games/nethack nethack \ /usr/lib/games/nethack/nethack-x11-tty.sh 60 update-alternatives --install /usr/games/nethack nethack \ /usr/lib/games/nethack/nethack-x11.sh 50 #DEBHELPER# debian/nethack-common.config0000644000000000000000000000027211765144123013265 0ustar #!/bin/sh set -e . /usr/share/debconf/confmodule LOGDIR=/var/games/nethack OLDLOGDIR=/var/lib/games/nethack db_input low nethack-common/recover-setgid || true db_go db_stop exit 0 debian/watch0000644000000000000000000000012511764567622010235 0ustar version=3 opts=dversionmangle=s/\.//g \ http://sf.net/nethack/nethack-(\d+)-src\.tgz debian/nethack-x11.desktop0000644000000000000000000000027311765144123012613 0ustar [Desktop Entry] Type=Application Name=X NetHack GenericName=NetHack (X interface) Comment= Icon=nethack Exec=/usr/games/xnethack Terminal=false Categories=Application;Game;AdventureGame; debian/copyright0000644000000000000000000001771111765321646011143 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: nethack Source: http://sourceforge.net/projects/nethack/files/ Files: * Copyright: 1985-2003 Stichting Mathematisch Centrum and M. Stephenson License: Nethack-General-Public-License Files: include/winlisp.h src/windows.c win/tty/termcap.c win/lisp/ChangeLog win/lisp/winlisp.c Copyright: 2003-2005 Shawn Betts 2003-2005 Ryan Yeske License: BSD-3-clause Files: debian/* Copyright: 1996-1997 Paul Haggart 1997-2003 Ben Gertzfield 2003-2009 Joshua Kwan 2012 Vincent Cheng License: GPL-2.0+ License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". License: Nethack-General-Public-License NETHACK GENERAL PUBLIC LICENSE (Copyright 1989 M. Stephenson) . (Based on the BISON general public license, copyright 1988 Richard M. Stallman) . Everyone is permitted to copy and distribute verbatim copies of this license, but changing it is not allowed. You can also use this wording to make the terms for other programs. . The license agreements of most software companies keep you at the mercy of those companies. By contrast, our general public license is intended to give everyone the right to share NetHack. To make sure that you get the rights we want you to have, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. Hence this license agreement. . Specifically, we want to make sure that you have the right to give away copies of NetHack, that you receive source code or else can get it if you want it, that you can change NetHack or use pieces of it in new free programs, and that you know you can do these things. . To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of NetHack, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. . Also, for our own protection, we must make certain that everyone finds out that there is no warranty for NetHack. If NetHack is modified by someone else and passed on, we want its recipients to know that what they have is not what we distributed. . Therefore we (Mike Stephenson and other holders of NetHack copyrights) make the following terms which say what you must do to be allowed to distribute or change NetHack. . . COPYING POLICIES . 1. You may copy and distribute verbatim copies of NetHack source code as you receive it, in any medium, provided that you keep intact the notices on all files that refer to copyrights, to this License Agreement, and to the absence of any warranty; and give any other recipients of the NetHack program a copy of this License Agreement along with the program. . 2. You may modify your copy or copies of NetHack or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above (including distributing this License Agreement), provided that you also do the following: . a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and . b) cause the whole of any work that you distribute or publish, that in whole or in part contains or is a derivative of NetHack or any part thereof, to be licensed at no charge to all third parties on terms identical to those contained in this License Agreement (except that you may choose to grant more extensive warranty protection to some or all third parties, at your option) . c) You may charge a distribution fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. . 3. You may copy and distribute NetHack (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: . a) accompany it with the complete machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, . b) accompany it with full information as to how to obtain the complete machine-readable source code from an appropriate archive site. (This alternative is allowed only for noncommercial distribution.) . For these purposes, complete source code means either the full source distribution as originally released over Usenet or updated copies of the files in this distribution used to create the object code or executable. . 4. You may not copy, sublicense, distribute or transfer NetHack except as expressly provided under this License Agreement. Any attempt otherwise to copy, sublicense, distribute or transfer NetHack is void and your rights to use the program under this License agreement shall be automatically terminated. However, parties who have received computer software programs from you with this License Agreement will not have their licenses terminated so long as such parties remain in full compliance. . Stated plainly: You are prohibited by the terms of this License Agreement from using NetHack for gainful purposes. You are permitted to modify NetHack, or otherwise use parts of NetHack, provided that you comply with the conditions specified above; in particular, your modified NetHack or program containing parts of NetHack must remain freely available as provided in this License Agreement. In other words, go ahead and share NetHack, but don't try to stop anyone else from sharing it farther. debian/nethack.sh0000644000000000000000000000201711765144123011143 0ustar #!/bin/sh # SCCS Id: @(#)nethack.sh 3.3 90/02/26 HACKDIR=/usr/lib/games/nethack export HACKDIR HACK=$HACKDIR/nethack # see if we can find the full path name of PAGER, so help files work properly # assume that if someone sets up a special variable (HACKPAGER) for NetHack, # it will already be in a form acceptable to NetHack # ideas from brian@radio.astro.utoronto.ca if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \) then HACKPAGER=$PAGER # use only the first word of the pager variable # this prevents problems when looking for file names with trailing # options, but also makes the options unavailable for later use from # NetHack for i in $HACKPAGER do HACKPAGER=$i break done if test ! -f $HACKPAGER then IFS=: for i in $PATH do if test -f $i/$HACKPAGER then HACKPAGER=$i/$HACKPAGER export HACKPAGER break fi done IFS=' ' fi if test ! -f $HACKPAGER then echo Cannot find $PAGER -- unsetting PAGER. unset HACKPAGER unset PAGER fi fi cd $HACKDIR exec $HACK "$@" debian/nethack-common.dirs0000644000000000000000000000022311765144123012755 0ustar usr/share/pixmaps/nethack usr/lib/games/nethack var/games/nethack/save var/games/nethack/dumps etc/init.d usr/share/doc/nethack-common etc/nethack debian/control0000644000000000000000000001232011765330030010565 0ustar Source: nethack Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Vincent Cheng Build-Depends: bison, bsdmainutils, debhelper (>= 7), flex, groff-base, libncurses5-dev | libncurses-dev, libx11-dev, libxaw7-dev | libxaw-dev, libxext-dev, libxmu-dev, libxt-dev, po-debconf, xfonts-utils Standards-Version: 3.9.3 Homepage: http://www.nethack.org Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nethack/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nethack/ Package: nethack-common Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Recommends: nethack-console | nethack-x11 Description: dungeon crawl game - common files NetHack is a wonderfully silly, yet quite addictive, Dungeons & Dragons-style adventure game. You play a character from one of many classes (such as wizard, ranger, or tourist), fighting your way down to retrieve the Amulet of Yendor (try saying THAT one backwards!) for your god. On the way, you might encounter a quantum mechanic or two, or perhaps King Arthur, or - if you're REALLY lucky - the Ravenous Bugblatter Beast of Traal. . You should install a front-end for NetHack if you wish to play the game. Each of them includes the original non-graphical version, and they can all be installed at the same time: - nethack-console: no graphics, just plain NetHack; - nethack-x11 : original X11/Athena-based graphical version; - nethack-lisp : Lisp window version. . The various graphical front-ends for NetHack all share a large number of files in common. This package contains the graphics, dungeon levels, and utilities common to all NetHack front-ends. . It also provides a few utilities such as recover, for retrieving auto-save files in case of a power failure, and dgn_comp and lev_comp, two utilities for making your own NetHack levels and dungeons. The "recover" utility will be run every time the system boots, if there are any auto-save files available. Package: nethack-console Depends: nethack-common (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Architecture: any Provides: nethack Description: dungeon crawl game - text-based interface NetHack is a wonderfully silly, yet quite addictive, Dungeons & Dragons-style adventure game. You play a character from one of many classes (such as wizard, ranger, or tourist), fighting your way down to retrieve the Amulet of Yendor (try saying THAT one backwards!) for your god. On the way, you might encounter a quantum mechanic or two, or perhaps King Arthur, or - if you're REALLY lucky - the Ravenous Bugblatter Beast of Traal. . You should install a front-end for NetHack if you wish to play the game. Each of them includes the original non-graphical version, and they can all be installed at the same time: - nethack-console: no graphics, just plain NetHack; - nethack-x11 : original X11/Athena-based graphical version; - nethack-lisp : Lisp window version. . This package provides the plain console version of NetHack. Package: nethack-lisp Depends: nethack-common (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Suggests: nethack-el Architecture: any Provides: nethack Description: dungeon crawl game - Lisp interface NetHack is a wonderfully silly, yet quite addictive, Dungeons & Dragons-style adventure game. You play a character from one of many classes (such as wizard, ranger, or tourist), fighting your way down to retrieve the Amulet of Yendor (try saying THAT one backwards!) for your god. On the way, you might encounter a quantum mechanic or two, or perhaps King Arthur, or - if you're REALLY lucky - the Ravenous Bugblatter Beast of Traal. . You should install a front-end for NetHack if you wish to play the game. Each of them includes the original non-graphical version, and they can all be installed at the same time: - nethack-console: no graphics, just plain NetHack; - nethack-x11 : original X11/Athena-based graphical version; - nethack-lisp : Lisp window version. . This package provides the version required for playing NetHack via Lisp, for instance under Emacs (which requires nethack-el). Package: nethack-x11 Depends: nethack-common (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Architecture: any Provides: nethack Description: dungeon crawl game - X11 interface NetHack is a wonderfully silly, yet quite addictive, Dungeons & Dragons-style adventure game. You play a character from one of many classes (such as wizard, ranger, or tourist), fighting your way down to retrieve the Amulet of Yendor (try saying THAT one backwards!) for your god. On the way, you might encounter a quantum mechanic or two, or perhaps King Arthur, or - if you're REALLY lucky - the Ravenous Bugblatter Beast of Traal. . You should install a front-end for NetHack if you wish to play the game. Each of them includes the original non-graphical version, and they can all be installed at the same time: - nethack-console: no graphics, just plain NetHack; - nethack-x11 : original X11/Athena-based graphical version; - nethack-lisp : Lisp window version. . This package provides the text and X11/Athena-based graphical versions of NetHack. debian/console/0000755000000000000000000000000011765144123010634 5ustar debian/console/nethackrc0000644000000000000000000000135511765144123012525 0ustar # # System-wide NetHack configuration file for console-only NetHack. # OPTIONS=windowtype:tty,toptenwin,hilite_pet,!number_pad,hpmon OPTIONS=fixinv,safe_pet,sortpack,tombstone,color OPTIONS=verbose,news,fruit:potato OPTIONS=dogname:Slinky OPTIONS=catname:Rex OPTIONS=pickup_types:$ OPTIONS=nomail # Enable this if you want to see your inventory sorted in alphabetical # order by item instead of by index letter: # OPTIONS=sortloot:full # or if you just want containers sorted: # OPTIONS=sortloot:loot # # Some sane defaults for menucolor # OPTIONS=menucolors MENUCOLOR=" blessed "=green MENUCOLOR=" holy "=green MENUCOLOR=" uncursed "=yellow MENUCOLOR=" cursed "=red MENUCOLOR=" unholy "=red MENUCOLOR=" cursed .* (being worn)"=orange&underline debian/console/nethack.sh0000644000000000000000000000113011765144123012600 0ustar #!/bin/sh set -e HACKSTYLE=console if [ -z "$NETHACKOPTIONS" ]; then if [ -e $HOME/.nethackrc ]; then NETHACKOPTIONS=$HOME/.nethackrc export NETHACKOPTIONS elif [ -e $HOME/.nethackrc.$HACKSTYLE ]; then NETHACKOPTIONS=$HOME/.nethackrc.$HACKSTYLE export NETHACKOPTIONS elif [ -e $HOME/.nethackrc.tty ]; then NETHACKOPTIONS=$HOME/.nethackrc.tty export NETHACKOPTIONS else NETHACKOPTIONS=/etc/nethack/nethackrc.$HACKSTYLE export NETHACKOPTIONS fi fi HACKDIR=/usr/lib/games/nethack export HACKDIR HACK=$HACKDIR/nethack-$HACKSTYLE cd $HACKDIR exec $HACK "$@" debian/nethack-x11.menu0000644000000000000000000000031611765144123012104 0ustar ?package(nethack-x11):needs="x11" \ command="/usr/games/xnethack" \ hints="Roguelike,Maze,Dungeon" \ section="Games/Adventure" \ title="X NetHack" \ icon="/usr/share/pixmaps/nethack.xpm" debian/nethack-common.templates0000644000000000000000000000206311765144123014016 0ustar # These templates have been reviewed by the debian-l10n-english # team # # If modifications/additions/rewording are needed, please ask # debian-l10n-english@lists.debian.org for advice. # # Even minor modifications require translation updates and such # changes should be coordinated with translators and reviewers. Template: nethack-common/recover-setgid Type: boolean Default: true _Description: Use setgid bit with NetHack's recover utility? The "recover" program in the package nethack-common is traditionally installed with the "setgid" bit set, so that all users can use it to recover their own save files after a crash (with "games" group privileges). This is a potential source of security problems. . This package includes a script that runs during system boot, invoking recover on any broken save files it finds. This makes it less likely that users will need to run it themselves, so the default is to install recover without the special permission bits required for that. . If you choose this option, unprivileged users will be able to run "recover".