]> granicus.if.org Git - nethack/log
nethack
12 years agomore #overview changes
nethack.rankin [Sat, 14 Apr 2012 08:31:05 +0000 (08:31 +0000)]
more #overview changes

     Change how overview data is handled if/when you get expelled from
the quest:  mark quest levels as unreachable rather than discarding their
overview data, so that it can be included in end of game disclosure (and
can be revived if you manage to return to your quest branch by invoking
the W quest artifact).

     Order of endgame levels was odd:  earth followed by astral, water,
fire, and air, because the code didn't know how to insert in front of the
first one visited.  Now it does.  Placement of endgame levels was sub-
optimal:  since that has the highest internal dungeon branch number, it
came out last.  Now it is forced to come out first, so that it appears
above the dungeon.  And use "Plane of Earth" for level name rather than
"Plane 1", and so on for the others, when in the endgame.

     Since I'm bumping EDITLEVEL due to adding mapseen.flags.unreachable,
I am also inserting u.uevent.uvibrated now so that it won't trigger another
EDITLEVEL increment.  At the moment it doesn't do anything except get set
when you receive the "you feel strange vibrations <under you>" message.
The level where that occurs will eventually have an automatic annotation
of some sort.

12 years agomore windows 32 bit vs 64 bit Makefile fiddling
nethack.allison [Sat, 14 Apr 2012 00:38:09 +0000 (00:38 +0000)]
more windows 32 bit vs 64 bit Makefile fiddling

12 years agoBritish dragon
nethack.allison [Thu, 12 Apr 2012 23:26:47 +0000 (23:26 +0000)]
British dragon

Sorry, it's been a while and I forgot to use the American spelling.

12 years agofloating eye gaze reflecting message
nethack.allison [Thu, 12 Apr 2012 23:16:09 +0000 (23:16 +0000)]
floating eye gaze reflecting message

On 12/04/2012 12:44 PM, <Someone> wrote:
> The message displayed was: "The floating eye's gaze is reflected by your
> armor". Although I realize that my silver dragon scale mail is embedded in
> my skin (as per my inventory), I still think that it's now my skin that
> reflects the gaze, not my (temporarily non-existent) armor.

12 years agoREADME update
nethack.allison [Tue, 10 Apr 2012 23:29:25 +0000 (23:29 +0000)]
README update

Move untested platforms to the lower section. They can be moved
to the upper section once confirmed tested.

12 years agono message
nethack.allison [Tue, 10 Apr 2012 23:05:08 +0000 (23:05 +0000)]
no message

12 years agoMerge fixes34.4 into fixes35.0
nethack.allison [Mon, 9 Apr 2012 19:39:12 +0000 (19:39 +0000)]
Merge fixes34.4 into fixes35.0

This was done using the CVS log listings to preserve
the chronological order that patches were distributed,
rather than just cut and paste from one to the other.

This marks the abandonment of updates for fixes34.4.

12 years agooverview disclosure (trunk only)
nethack.rankin [Mon, 9 Apr 2012 02:56:37 +0000 (02:56 +0000)]
overview disclosure (trunk only)

     Add 'o' to "i a v g c" disclosure set, to display final dungeon
overview at end of game.  It lists all levels visited rather than just
those that #overview considers to be interesting, but it doesn't reveal
any undiscovered aspects of those levels except for the presence of bones.
(I think revealing shops and altars and such would be worthwhile, but the
data for that isn't handy at the time.)  If the game ends due to death,
the bones section of the current level will have "you, <reason you died>"
(before any real bones entries for that level).  That occurs before bones
file creation so it doesn't give away whether bones are being saved.

     end.c includes some unrelated lint cleanup.

     Guidebook.{mn,tex} updates the section for autopickup_exceptions as
well as for disclose.  It had some odd looking indentation due to various
explicit paragraph breaks.  I took "experimental" out of its description
since it was moved out of the experimental section of config.h long ago.
The revised Guidebook.tex is untested.

12 years agofix more of #2629 - striking/force bolt feedback (trunk only)
nethack.rankin [Sat, 7 Apr 2012 01:17:23 +0000 (01:17 +0000)]
fix more of #2629 - striking/force bolt feedback (trunk only)

     From a bug report, the message "Boing!" is given if wand of striking
or spell of force bolt is aimed at magic resistant hero by self or by
monster, or at magic resistant monster by another monster, but it was
omitted when aimed at magic resistant monster by the hero.  The shield
effect animation for resistance is given in all the cases.

12 years agofix another part of #2629 - destory_mitem of partial stack (trunk only)
nethack.rankin [Fri, 6 Apr 2012 08:49:27 +0000 (08:49 +0000)]
fix another part of #2629 - destory_mitem of partial stack (trunk only)

     From a bug report, if part of a stack in a monster's inventory gets
destroyed (examples given were from Fire Brand burning scrolls or Frost
Brand freezing potions, but other code calls destroy_mitem() too), the
message handled singular vs plural for the desruction part ("catches
fire and burns" vs "catch fire and burn") but always used plural when
formatting the object stack being affected.  Now say "One of <the mon's
foo>" or "Some of <the mon's foo>" as appropriate when part of a stack
is being destroyed.  (destroy_item() for the hero paid more attention
and handled this issue correctly.)

12 years agofix part of #2629 - feedback for reverse genocide (trunk only)
nethack.rankin [Fri, 6 Apr 2012 08:35:00 +0000 (08:35 +0000)]
fix part of #2629 - feedback for reverse genocide (trunk only)

     From a bug report, if reading a cursed scroll of genocide created only
one monster it would give the plural message "Sent in some <monsters>."
Now it will say "Sent in a(n) <monster>." in such case.  (The grammar is
accurate even if you can't see what happened; that situation is unusual
enough that I'm not going to worry about giving information away.)

12 years agomore dupstr (trunk only)
nethack.rankin [Sat, 10 Mar 2012 02:49:08 +0000 (02:49 +0000)]
more dupstr (trunk only)

12 years agoreplace core use of strdup() with dupstr() (trunk only)
nethack.rankin [Sat, 10 Mar 2012 02:22:07 +0000 (02:22 +0000)]
replace core use of strdup() with dupstr() (trunk only)

13 years agoredeclare n for SYSCF only
nethack.allison [Fri, 24 Feb 2012 01:01:03 +0000 (01:01 +0000)]
redeclare n for SYSCF only

13 years agobuild bit
nethack.allison [Wed, 22 Feb 2012 06:26:04 +0000 (06:26 +0000)]
build bit

files.c
../src/files.c(2039) : warning C4101: 'n' : unreferenced local variable

13 years agofiles.c cleanup and/or trashing (trunk only)
nethack.rankin [Tue, 21 Feb 2012 04:05:45 +0000 (04:05 +0000)]
files.c cleanup and/or trashing (trunk only)

     I started out changing some bar=strcpy(alloc(strlen(foo)+1),foo)
sequences to bar=dupstr(foo), then decided to try to clean up the lint
From a bug report.  I'm not sure
whether the final result is worth it, and the MICRO configurations need
to test configuration file processing for LEVELS and RAMDISK.  There were
three different sets of conditionals being used for that.

Declaration             Parsing                          Assignment
#if MICRO || WIN32      #if MICRO && !NOCWD_ASSUMPTIONS  #if MICRO && !NOCWD_
 char tmp_levels[]       read LEVELS into tmp_levels     # if MFLOPPY
# if MFLOPPY && !AMIGA  # if MFLOPPY && !AMIGA            handle tmp_levels
 char tmp_ramdisk[]      read RAMDISK into tmp_ramdisk   #  if !AMIGA
# endif                 # endif                           handle tmp_ramdisk
#endif                  #endif                           #  endif x 3

The revised code uses the middle set; the other two are gone.  This means
that MICRO+!MFLOPPY will use LEVELS instead of silently ignoring it, which
might need to be changed.

13 years agonerf potion alchemy (trunk only)
nethack.rankin [Sun, 19 Feb 2012 02:06:43 +0000 (02:06 +0000)]
nerf potion alchemy (trunk only)

     Something I've had in mind for a long time:  make it harder to acquire
dozens of potions of full healing and thereby (8 * dozens) of extra hit
points.  When dipping a stack of more than 2 potions into another potion
other than water, first split the stack so that 2 to 9 potions are dipped
rather than all of them.  Alchemy still works but it will take more dips
(hence need more resources) to convert large amounts.  Dipping into water
isn't affected, nor is dipping non-potions.

     Also fix a bug where dipping a stack--now perhaps a subset stack after
splitting--which triggered an explosion was only using up one of the dipped
potions (plus the one being dipped into) instead of the whole stack.

13 years ago#overview enhancements too (trunk only)
nethack.rankin [Thu, 16 Feb 2012 23:06:00 +0000 (23:06 +0000)]
#overview enhancements too (trunk only)

     I accidentally left his out of yesterday's commit.

13 years agosome lint bits (trunk only)
nethack.rankin [Thu, 16 Feb 2012 03:01:38 +0000 (03:01 +0000)]
some lint bits (trunk only)

13 years ago#overview enhancements (trunk only)
nethack.rankin [Thu, 16 Feb 2012 02:40:24 +0000 (02:40 +0000)]
#overview enhancements (trunk only)

1) add graves to the dungeon features being tracked;
2) report on known bones (determined by seeing map spot(s) where previous
   hero(es) died since there's no guarantee of graves or ghosts);
3) add automatic annotations for oracle, sokoban, bigroom, rogue level,
   Ft.Ludios, castle, valley, and Moloch's sanctum.  For bigroom and rogue
   level you just need to visit that level, for the others you need to get
   far enough along to learn something specific (oracle: her room, sokoban:
   annotation is either "solved" or "unsolved" depending upon whether all
   the holes and pits have been filled, fort and castle: see the drawbridge,
   valley and sanctum: see inside the tended temple).  Discovering the
   relevant locations via magic mapping counts as "far enough along".

     There should probably also be automatic annotations for Medusa and the
vibrating square but I'm not sure what criteria should be used for the
former or what phrasing to use for the latter.  Demon lord/prince lairs fall
into similar category as Medusa.

     TODO: add final #overview as an end of game disclosure option.  (I was
planning this even before I saw that nitrohack has implemented it....)

13 years agooracle bones (trunk only)
nethack.rankin [Wed, 15 Feb 2012 01:55:34 +0000 (01:55 +0000)]
oracle bones (trunk only)

     Noticed while working on #overview/#annotate revisions, one of which
will key off the oracle's welcome message.  On a bones level, the oracle
could be outside her room, or the room's one time welcome message could be
used up, or both.  During bones creation, discard her if she's on the wrong
level (probably not possible, aside from wizard mode ^G), try to put her
back into her room if she's outside it on the right level, and restore the
room's type (if she's still in it, or has been successfully moved back into
it) so that next hero who loads the bones will get her welcome message the
first time that room is entered.

     Other special rooms could be fixed up too, provided that they're
sufficiently intact (stealthy hero might enter and get the one-time message
then run away and die elsewhere on the level; at present, next hero won't
get the room's entry message) but this doesn't attempt to deal with that.

13 years agomimicking by pets (trunk only)
nethack.rankin [Fri, 10 Feb 2012 09:29:28 +0000 (09:29 +0000)]
mimicking by pets (trunk only)

     I killed a mimic in a shop, then left.  My dog or cat entered that shop
where I could no longer see it, and I got
    You see a tripe ration appear where it was!
when it evidently ate the corpse, without me being able to see any such thing.
This fix is only approximate but I didn't want to figure out all the
permutations of esp or prolonged monster detection or infravision.  (There
probably aren't as many permutations as I first thought since only "ordinary"
pets will take on alternate monster form, so won't ever switch from detectable
via esp to not detectable or vice versa.  Maybe this is good enough.)

     No fixes entry; this is post-3.4.3 code.  There was an early return with
a comment stating that idx==0 was impossible.  I took that out since 0 is not
only possible, it's a valid index into the array of transformations.

13 years agofix #H2591 - sitting while swallowed (trunk only)
nethack.rankin [Mon, 6 Feb 2012 04:17:25 +0000 (04:17 +0000)]
fix #H2591 - sitting while swallowed (trunk only)

     From a bug report, sitting while
swallowed gave "you are sitting on air," and the intended message "there are
no seats in here" was never reached.  Move the latter so that it works, and
add a new one when you try to sit while a grabber is holding on to you.

     Also add theft vs donning fixes entry which was left out two days ago.

13 years agotheft vs donning, round 2 (trunk only)
nethack.rankin [Sun, 5 Feb 2012 04:26:48 +0000 (04:26 +0000)]
theft vs donning, round 2 (trunk only)

     The message "you stop taking off <that armor>" when interrupted by a
nymph's or monkey's theft attack would only be given if you were using 'A'
to take off the armor.  If you used 'T', you'd get "you stop putting on
<that armor>" instead.  The fix for that also makes it easy to vary the
nymph message "<the nymph persuades> you to start taking off" to be "<the
nymph persuades you to continue taking off" when taking that same piece
of armor off was interrupted by the theft.

13 years agofix #H2589 - theft vs donning/doffing (trunk only)
nethack.rankin [Sat, 4 Feb 2012 08:13:26 +0000 (08:13 +0000)]
fix #H2589 - theft vs donning/doffing (trunk only)

     From a bug report, having some
armor stolen while in the midst of putting on armor--when both items have
a multiple turn completion delay--could result in side-effects for the
latter item being reversed even though they hadn't been applied yet.  So
you'd lose points of Int and Wis when attempting to put on a positively
enchanted helm of brilliance, or gain such with a negatively enchanted one.

     steal() was assigning to afternmv before it had been used to finish the
action of putting on or taking off armor.  Fix by interrupting the attempt
to put on or take off armor when being victimized by theft (or being hit by
succubus or incubus seduction).  The existing stop_occupation() call wasn't
sufficient because afternmv is different from occupation.

13 years agounconsciousness (trunk only)
nethack.rankin [Sat, 4 Feb 2012 07:20:23 +0000 (07:20 +0000)]
unconsciousness (trunk only)

     When testing armor theft by nymph I got a message "you dream that you
hear <something or other>" even though I was awake.  steal() was leaving
nomovemsg null in order to get the default of "you can move again", but
unconscious() was treating null value as 'yes, hero is unconscious'.  I'm
pretty sure its intent was just to guard against passing null to strncmpi()
and didn't really mean that null indicates unconsciousness.

13 years ago#overview overhaul, part I (trunk only)
nethack.rankin [Thu, 2 Feb 2012 10:15:04 +0000 (10:15 +0000)]
#overview overhaul, part I (trunk only)

     Reformat the DUNGEON_OVERVIEW code in dungeon.c.  It's clear from the
way lines were wrapping that the original author used an editor that let
him set tab expansion to columns of four, and when they're treated as the
conventional eight then some longish lines won't fit.  Switch to using a
mix of tabs and four spaces instead of all tab characters.

     I've separated out my more interesting changes (which will come later).
However, there are a bunch of minor ones included:
 1) the lastseentyp array is reused for each level visited, but it wasn't
    being reinitialized when creating a new level, so remembered fountains,
    altars, and so forth could be erroneously propogated across levels
    (the original contributed patch may not have suffered from this because
    it handled last-seen data differently than the code which is in place);
 2) add 3.5.0 health food store to the list of recognized shop types;
 3) make an #annotate value of a single space delete any old annotation
    without adding a new one, the way monster and object naming works;
 4) the code to discard overview data for a branch of the dungeon which
    can no longer be reached (quest expulsion) wasn't capable of doing so
    for the very first level (a hypothetical problem since level 1 isn't in
    the quest...) and didn't free memory used for user-supplied annotations;
 5) reorganize dooverview() where Michael's compiler reported that a
    variable might be used before being initialized (it wasn't, but it also
    wasn't even needed to achieve the intended result);
 6) redo the #overview formatting macros so that they'll work with pre-ANSI
    compilers that don't support concatenation of adjacent string literals;
 7) function-like macro ADDNTOBUF() was used without terminating semi-colon,
    which confused emacs when indenting, so this rewrites it such that it
    expects ordinary termination and will work correctly if ever used in the
    form 'if (some_condition) ADDNTOBUF(args); else ...';
 8) comment out water/ice/lava with #if 0 ... #endif rather than /* ... */.

13 years agoquest pager fix (trunk only)
nethack.rankin [Thu, 2 Feb 2012 09:18:14 +0000 (09:18 +0000)]
quest pager fix (trunk only)

     A priest quest message that was supposed to say "brotherhood" or
"sisterhood" said "itood" instead.  Text "%shood" used the post-3.4.3 'h'
modifier to substitute a pronoun in place of the %s value.  That's only
a valid modifier when it follows %d (deity), %l (leader), %n (nemesis),
or %o (artifact).  Change the substitution routine to leave it as an 'h'
when it follows anything else.  [No fixes entry needed.]

13 years agorolling boulder trap's boulder can be generated in lava
nethack.allison [Wed, 1 Feb 2012 00:49:16 +0000 (00:49 +0000)]
rolling boulder trap's boulder can be generated in lava

> On 01/30/2012 08:20 PM, <Someone> wrote:
> The boulder from a rolling boulder trap can be generated on a
> lava pool. mkroll_launch() in trap.c, line 1584 checks only for pools
> of water.

13 years agox64 command line build cleanup
nethack.allison [Sun, 29 Jan 2012 16:50:56 +0000 (16:50 +0000)]
x64 command line build cleanup

64-bit linker had a number of warnings that the 32-bit linker did not.
It turned out to be because the 64-bit compiler is more picky about
declaring DLL exports 2-different ways, even if they are essentially
the same. The 32-bit linkder didn't complain. It is described here:
http://support.microsoft.com/kb/835326

The warnings that this suppresses are:

nhdefkey.c
Linking hdefkey.dll
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

nhdefkey.o : warning LNK4197: export 'ProcessKeystroke' specified multiple times; using first specification
nhdefkey.o : warning LNK4197: export 'NHkbhit' specified multiple times; using first specification
nhdefkey.o : warning LNK4197: export 'CheckInput' specified multiple times; using first specification
nhdefkey.o : warning LNK4197: export 'SourceWhere' specified multiple times; using first specification
nhdefkey.o : warning LNK4197: export 'SourceAuthor' specified multiple times; using first specification
nhdefkey.o : warning LNK4197: export 'KeyHandlerName' specified multiple times; using first specification
   Creating library o\nhdefkey.lib and object o\nhdefkey.exp

nh340key.c
Linking h340key.dll
nh340key.o : warning LNK4197: export 'ProcessKeystroke' specified multiple times; using first specification
nh340key.o : warning LNK4197: export 'NHkbhit' specified multiple times; using first specification
nh340key.o : warning LNK4197: export 'CheckInput' specified multiple times; using first specification
nh340key.o : warning LNK4197: export 'SourceWhere' specified multiple times; using first specification
nh340key.o : warning LNK4197: export 'SourceAuthor' specified multiple times; using first specification
nh340key.o : warning LNK4197: export 'KeyHandlerName' specified multiple times; using first specification
   Creating library o\nh340key.lib and object o\nh340key.exp

nhraykey.c
Linking hraykey.dll
nhraykey.o : warning LNK4197: export 'ProcessKeystroke' specified multiple times; using first specification
nhraykey.o : warning LNK4197: export 'CheckInput' specified multiple times; using first specification
nhraykey.o : warning LNK4197: export 'NHkbhit' specified multiple times; using first specification
nhraykey.o : warning LNK4197: export 'SourceWhere' specified multiple times; using first specification
nhraykey.o : warning LNK4197: export 'SourceAuthor' specified multiple times; using first specification
nhraykey.o : warning LNK4197: export 'KeyHandlerName' specified multiple times; using first specification
   Creating library o\nhraykey.lib and object o\nhraykey.exp

13 years agostrdup/dupstr (trunk only)
nethack.rankin [Sun, 29 Jan 2012 03:00:17 +0000 (03:00 +0000)]
strdup/dupstr (trunk only)

     Add dupstr() as a substitute for strdup() so that out-of-memory
handling will be consistent with the rest of nethack, and make it aware
of nethack's heap logging.  It's treated like alloc() so that its caller
can be logged for NH_HEAPLOG.

     I put it into use in a few places, but there are lots more candidates
besides the existing calls to strdup() that should be replaced.

13 years agobit logic fix (trunk only)
nethack.rankin [Sun, 29 Jan 2012 00:34:33 +0000 (00:34 +0000)]
bit logic fix (trunk only)

     Fix some expressions that were supposed to use bitwise '&' but were
accidentally using logical '&&', pointed out by Keni's lint tool.  All 3
instances are in post-3.4.3 code, so don't affect the branch and don't
need a fixes entry.

13 years agowizard bones bug (trunk only)
nethack.rankin [Sat, 28 Jan 2012 02:52:14 +0000 (02:52 +0000)]
wizard bones bug (trunk only)

     The wizard mode sequence
  load bones? y, unlink bones? y, die, save bones? y
works, but
  load bones? y, unlink bones? n, die, save bones? y, replace old bones? y
fails if/when external compression is in use.  The file gets uncompressed
before being opened to check its existence, then immediately closed, and
re-compressed, changing the file's name, before the deletion attempt takes
place.  Then delete_bonesfile() can't find it via the uncompressed name
and the bones saving code reports "cannot unlink old bones".

     The code involved doesn't seem to have changed since the current cvs
repository was set up, so this bug has gone unnoticed for a long time.
There's no reason this fix shouldn't go into the branch too, other than the
fact that I don't have that checked out on this machine.  If someone wants
to apply it there, be my guest (and move the fixes entry to fixes34.4).

13 years agoSYSCF bits
keni [Fri, 27 Jan 2012 20:15:31 +0000 (20:15 +0000)]
SYSCF bits
(This covers some thing that Pat found and some things I found while working
on those.)
Unscramble duplicate use of GREPPATH and GDBPATH symbols.
Add some more info to config.h.
Make missing SYSCF_FILE a fatal error.
Make a parse error in SYSCF_FILE a fatal error.
Rename PANICTRACE_GLIBC (et al) to PANICTRACE_LIBC (et al) since FreeBSD
 and Mac OS X (at least) also implement the needed API.
Allow SYSCF_FILE to be unreadable by the user (for setgid installs).
If SYSCF, do NOT fall back to the compiled in WIZARD account.
Put WIZARD into sysopt and remove special cases in authorize_wizard_mode().

13 years agooutrip() updating (trunk only)
nethack.rankin [Tue, 24 Jan 2012 04:26:33 +0000 (04:26 +0000)]
outrip() updating (trunk only)

     Part II of the bones tracking patch.  Change umpteen different outrip()
routines to handle its new time_t argument, and use formatkiller() instead
of directly accessing killer.{format,name} and killed_by_prefix[].  The
latter is now static within formatkiller().

     The many sys/* and win/* changes are untested....

13 years agobones tracking (trunk only)
nethack.rankin [Mon, 23 Jan 2012 10:45:31 +0000 (10:45 +0000)]
bones tracking (trunk only)

[See cvs log for include/rm.h or doc/window.doc for more complete description.]

Attach hero info, death reason, and date+time to a level that's being saved
as bones.  Read such data back when loading a bones file, then treat it as
part of that level for the rest of the game.  Dying on a loaded bones file
will chain the new hero+death+date to previous one(s) if new bones get saved.

outrip() now takes an extra argument of type time_t, and interface-specific
implementations of this routine need to be updated to handle that.

13 years agobones tracking (trunk only)
nethack.rankin [Mon, 23 Jan 2012 10:41:57 +0000 (10:41 +0000)]
bones tracking (trunk only)

      Quite a long time ago, the developer/administrator of the 'hearse'
bones respository asked to have bones files augmented so that they could
be correlated with logfile entries.  He was forced to approximate it by
comparing file date+time with logfile date, which won't work well if there
are multiple deaths at roughly the same time, or perhaps even on the same
day.  This adds character name plus role, race, gender, alignment, the
cause of death, and date plus time of death to the bones file when it is
saved, and reads that data in when a bones file is loaded, then retains
it as part of that level for the remainder of the game.  Dying on a level
that was loaded from bones will chain the new dead hero info to whatever
was there from the previous one(s).  It's written as fixed length strings
padded with spaces before writing the map and its messy details, making
it easy to spot with a simple file browsing tool rather than requiring
something which can interpret nethack level files.  This may need to be
tweaked if players start shelling out of nethack to see whether the
checkpoint file for a newly entered level contains bones info, but at the
moment I'm not going to worry about that.

     TODO:  I wanted the bones and topten date to match, so am obtaining
the current date+time in done() and passing it to both of those and also
to outrip().  Hence the latter now has an additional argument.  So far only
genl_outrip() and hup_outrip() in src and the three outrips in win/chain
have been taught about that; interfaces that supply their own outrip()
need to be updated and probably won't compile right now.  Also, code for
formatting the cause of death has been moved from topten() into a separate
routine so that the new bones code can share it.  genl_outrip() now calls
it too; the various other outrip() routines should be changed to call it
instead of continuing to duplicate that core code.  (I probably should
have made topten.c's killed_by_prefix[] be static in order to force that,
but haven't done so.)

     TODO too:  there ought to be some way of viewing the data for a loaded
bones file from within nethack.  I'll probably add something to the dungeon
overview code to treat it as an implicit annotation, as least in wizard mode.
Showing it in normal play once a level is sufficiently discovered would be
useful, but I'm not sure what criteria should control that.  Neither ghost
nor grave is guaranteed to be present, particularly for levels that were
saved as bones, loaded into a subsequent game, then became new bones when
the second hero died there, which can occur an arbitrary number of times.

13 years agounixtty lint (trunk only)
nethack.rankin [Mon, 23 Jan 2012 07:11:09 +0000 (07:11 +0000)]
unixtty lint (trunk only)

     gcc reports "comparison between signed and unsigned".  One header file
uses unsigned long for tty flags, another uses [signed] short.  'unsigned'
seems like the best compromise, but this might accidentally introduce lint
for some other configuration.

13 years agolint bit, shadowed 'restoring' (trunk only)
nethack.rankin [Mon, 23 Jan 2012 06:29:37 +0000 (06:29 +0000)]
lint bit, shadowed 'restoring' (trunk only)

13 years agomsdos build (trunk only)
nethack.allison [Sun, 22 Jan 2012 06:33:47 +0000 (06:33 +0000)]
msdos build (trunk only)

13 years agomsdos build (trunk only)
nethack.allison [Sun, 22 Jan 2012 06:27:09 +0000 (06:27 +0000)]
msdos build (trunk only)

13 years agoremove line of unreachable code (trunk only)
nethack.allison [Sat, 21 Jan 2012 12:39:03 +0000 (12:39 +0000)]
remove line of unreachable code (trunk only)

13 years agofix date.h/patchlevel.h removal typo
nethack.rankin [Sat, 21 Jan 2012 09:00:37 +0000 (09:00 +0000)]
fix date.h/patchlevel.h removal typo

13 years agosync MS Makefile dependencies
nethack.allison [Fri, 20 Jan 2012 13:05:21 +0000 (13:05 +0000)]
sync MS Makefile dependencies

sync some Makefile dependencies with sys/unix/Makefile.src

13 years agodate.h/patchlevel.h dependencies (trunk only)
nethack.rankin [Fri, 20 Jan 2012 03:41:33 +0000 (03:41 +0000)]
date.h/patchlevel.h dependencies (trunk only)

     Remove date.h and patchlevel.h from win/tty/wintty.c, win/X11/winX.c,
and sys/share/pcmain.c (caveat: the latter two are untested) so that they
don't get recompiled every time any other source file changes and triggers
creation of a new date.h.  Only version.c needs to be recompiled in that
situation.  Also, Makefile.src was missing a reference to botl.h.

13 years agogcc invocation cleanup (mac)
keni [Wed, 18 Jan 2012 22:32:24 +0000 (22:32 +0000)]
gcc invocation cleanup (mac)
Move the compiler flags out of CC and into CFLAGS.  Split off
-Wunreachable-code, comment it out, and explain why.  Fix typo.

13 years agosave and restore lint cleanup (trunk only)
nethack.rankin [Wed, 18 Jan 2012 02:36:50 +0000 (02:36 +0000)]
save and restore lint cleanup (trunk only)

     Fix a couple of signed vs unsigned and unused paramater warnings
that pointed to actual bugs.  uid values were being handled as int, even
though "modern" systems use type uid_t which could be bigger and is almost
certainly unsigned.  There haven't been any reports of nethack falsely
claiming that the wrong user is trying to restore, so in practice this
hasn't mattered, but switch from int to unsigned long to make the chance
of problems be even smaller.

     The code to save message history was ignoring the 'mode' argument so
would have attepted to write even when asked to free memory instead.  It
isn't currently called by freedynamicdata() so the problem was theoretical
rather than real.

     The 'UNUSED' macro is inadequate to handle parameters which are used
by some conditional configurations and unused by others, so there are
still several warnings about unused parameters from save.c and restore.c.

13 years agodlb capacity (trunk only)
nethack.rankin [Mon, 16 Jan 2012 03:56:08 +0000 (03:56 +0000)]
dlb capacity (trunk only)

     From the newsgroup:  if someone adds too many new special levels, dlb
creation during install will give a warning but still exit with success,
and the subsequent installation won't know that the excess files need to be
placed in the playground separately.  The result is that some files will
be missing when nethack tries to access them.  The newsgroup thread states
that slash'em increased dlb's default limit of 200 files to 300, and the
unnethack variant increased it to 250 and also changed the overflow message
into an error that causes 'make' to quit.  (The thread was initiated by
someone working on his own, not affiliated with either variant, who asked
for help figuring out why nethack couldn't find files at the end of the
alphabet.  My answer didn't help much; I thought he was working with
separate files rather than with a DLB container.)

     I started to go with the too-many-files-is-an-error fix, but instead
went the GNU route ("no arbitrary limits") and made the number of allowed
files become dynamic.  It starts at 200 and expands by increments of 40
when necessary.

13 years agoIdentify type of executable in Windows
nethack.allison [Sun, 15 Jan 2012 19:11:41 +0000 (19:11 +0000)]
Identify type of executable in Windows

For Windows, this just uses the RUNTIME_PORT_ID hook that was already in the code
to identify which executable you are running

Mike

13 years agoMore Microsoft Visual Studio 2010 Express compiler build
nethack.allison [Sun, 15 Jan 2012 17:43:54 +0000 (17:43 +0000)]
More Microsoft Visual Studio 2010 Express compiler build

More updates to support the latest freely downloadable Microsoft compiler.

13 years agorumors & oracles & data.base vs "%lx" format (trunk only)
nethack.rankin [Sun, 15 Jan 2012 09:27:06 +0000 (09:27 +0000)]
rumors & oracles & data.base vs "%lx" format (trunk only)

     For text data processed by makedefs at install time, change all
printf and scanf calls that use %lx format to deal with unsigned long
variables, replacing the makedefs hack of a few days ago.  It's not as
clean as I would have liked (quite a few casts), because the values
involved are derived from ftell and/or passed to fseek, which deal in
signed longs.  But it clears up a few format check warnings by gcc in
rumors.c and pager.c in addition to the previous one in makedefs.c and
uses the right data type even in the places where no warning was issued.

13 years agoupdate Unix Makefile.src (trunk only)
nethack.rankin [Fri, 13 Jan 2012 03:31:39 +0000 (03:31 +0000)]
update Unix Makefile.src (trunk only)

     Teach ``make depend'' about the new win/chain code so that the build
rules for that aren't blown away, and then run make depend to get things
up to date.  I think hack.h/$(HACK_H) missing botl.h and pcmain.o missing
date.h were the only things significant that turned up.

     The comment for CSOURCES says it should have all sources, but the
value had $(SYSSRC) rather than $(SYSCSRC).  I've taken the comment at its
word and inserted the missing 'C'; I wonder whether that'll break anything.
Does anybody use ``make tags'' these days?

13 years agodrop extra includes
keni [Thu, 12 Jan 2012 15:08:29 +0000 (15:08 +0000)]
drop extra includes
Remove includes already pulled in by hack.h

13 years agolint bit: protects(artifact.c) (trunk only)
nethack.rankin [Thu, 12 Jan 2012 09:51:05 +0000 (09:51 +0000)]
lint bit: protects(artifact.c) (trunk only)

     Rename 'is_worn' argument; that's also the name of a function.

13 years agosupress lev_main.c diagnostic (trunk only)
nethack.rankin [Thu, 12 Jan 2012 04:48:12 +0000 (04:48 +0000)]
supress lev_main.c diagnostic (trunk only)

     gcc warned about comparing signed with unsigned for one particular
write() that used an expression for the size argument, and there was already
conditional code to try to handle it for a couple of other compilers.  But
this simpler fix should handle it for everybody.

13 years agosuppress makedefs.c diagnostic (trunk only)
nethack.rankin [Thu, 12 Jan 2012 04:01:08 +0000 (04:01 +0000)]
suppress makedefs.c diagnostic (trunk only)

     gcc doesn't complain about using %lx to write out a signed long, but
it does complain about using it to read into a signed long.  Technically
it's right about the latter, so fix this properly rather than just suppress
the message with a cast.

13 years agotid commit just to test postcommit.pl
keni [Wed, 11 Jan 2012 19:54:46 +0000 (19:54 +0000)]
tid commit just to test postcommit.pl

13 years agotest postcommit.pl 1.91 & mac build tid
keni [Wed, 11 Jan 2012 19:47:33 +0000 (19:47 +0000)]
test postcommit.pl 1.91 & mac build tid
Make postcommit try to recognize a directory commit operation.
Use /usr/bin/true instead of touch for a dummy chown/chgrp in Mac OS X.

13 years agoWINCHAIN - a framework allowing multiple processors between core and winport
keni [Wed, 11 Jan 2012 18:23:35 +0000 (18:23 +0000)]
WINCHAIN - a framework allowing multiple processors between core and winport
This is the code I built trying to figure out the large window size issue.
It completely compiles out if not needed (see -DWINCHAIN in hints/macos10.7)
and except for one call during setup has zero overhead if compiled in and
not used.  See window.doc for more info.

Defs for UNUSED parms.  I know this has been controversial, so use is isolated
to the chain code and windows.c (where it shouldn't be intrusive and saves about
50 warnings).

Hints file for 10.7, but the build process still needs to be migrated from
the branch.

13 years agoSuppress an x64 build warning (trunk only)
nethack.allison [Wed, 11 Jan 2012 01:53:44 +0000 (01:53 +0000)]
Suppress an x64 build warning (trunk only)

13 years agoMore clean up of the Windows x64 build (trunk only)
nethack.allison [Wed, 11 Jan 2012 01:45:02 +0000 (01:45 +0000)]
More clean up of the Windows x64 build (trunk only)

13 years agoStart trying to clean up the Windows x64 build (trunk only)
nethack.allison [Wed, 11 Jan 2012 01:15:37 +0000 (01:15 +0000)]
Start trying to clean up the Windows x64 build (trunk only)

13 years agocleanup: outdated SCCS lines
keni [Tue, 10 Jan 2012 17:47:45 +0000 (17:47 +0000)]
cleanup: outdated SCCS lines
Pat noted that I neglected to drop the SCCS lines on the files I've been
committing, so clean up those and any others I could find where the SCCS
line date is out of date.

13 years agofix #H2559+2564 - using 'a' command to discover potion of oil (trunk only)
nethack.rankin [Tue, 10 Jan 2012 08:50:19 +0000 (08:50 +0000)]
fix #H2559+2564 - using 'a' command to discover potion of oil (trunk only)

     From a bug report, if you used the apply command while
not carrying anything applicable except for unknown potion, you would get
"you don't have anything to apply" if that potion wasn't oil but an
inventory selection prompt (with '*' as the default since you wouldn't
have anything considered to be a likely candidate) if that potion was oil,
giving away information.

     This fix makes carrying any unknown potion yield the inventory
selection result, unless oil is already discovered and hero can see that
the unknown potion isn't oil.

13 years agoanother shot at H2344 (large window)
keni [Tue, 10 Jan 2012 02:33:36 +0000 (02:33 +0000)]
another shot at H2344 (large window)
Conditional on H2344_BROKEN which can be disabled at the top of the file if
necessary.  This appears to handle all the cases I was able to reproduce from
Pat's list, with the caveat that msg_window=f fails on very wide windows on
Mac OSX Lion with the default terminal emulation.  When the emulation is set
to ANSI, it works (the failure mode is the output from a simple putchar() loop
across the contents of history called up from ^P wraps at about the middle
of the window).

13 years agoadd param to ini winsys routines
keni [Tue, 10 Jan 2012 01:39:31 +0000 (01:39 +0000)]
add param to ini winsys routines
Provide a mechanism for cleanly moving between tentative window system
selections during startup.  Now, before a second (or later) system is selected,
the first will be notified that it is losing control.  See window.doc.

13 years agosanity check for dlb_fopen
keni [Mon, 9 Jan 2012 22:42:48 +0000 (22:42 +0000)]
sanity check for dlb_fopen
Fail if dlb_fopen is called with a non-read mode.

13 years agodrain life vs drain resisting objects (trunk only)
nethack.rankin [Sun, 8 Jan 2012 01:26:35 +0000 (01:26 +0000)]
drain life vs drain resisting objects (trunk only)

     From the newsgroup:  casting spell of drain life at Stormbringer
(or Excalibur or Staff of Aesculapius) would reduce its enchantment just
like any other weapon.  Drain resistance should protect against that even
when not actively wielded.

13 years agodoc tid (mainly postcommit.pl test)
keni [Sun, 8 Jan 2012 01:11:03 +0000 (01:11 +0000)]
doc tid (mainly postcommit.pl test)
Reference the new install instructions from the current install instructions.

13 years agoMore MS Visual Studio 2010 Express stuff
nethack.allison [Sat, 7 Jan 2012 22:57:39 +0000 (22:57 +0000)]
More MS Visual Studio 2010 Express stuff

13 years agolast bunch - pline warnings while testing postcommit.pl
keni [Wed, 4 Jan 2012 18:52:36 +0000 (18:52 +0000)]
last bunch - pline warnings while testing postcommit.pl

13 years agoanother pile on the trunk
keni [Wed, 4 Jan 2012 18:14:41 +0000 (18:14 +0000)]
another pile on the trunk

13 years agoback to trunk: potion.c
keni [Wed, 4 Jan 2012 18:05:21 +0000 (18:05 +0000)]
back to trunk: potion.c

13 years agopostcommit.pl 1.84 - first branch info test: polyself.c (on the trunk)
keni [Tue, 3 Jan 2012 19:11:34 +0000 (19:11 +0000)]
postcommit.pl 1.84 - first branch info test: polyself.c (on the trunk)

13 years agoNew Year - 2012
nethack.allison [Mon, 2 Jan 2012 14:40:08 +0000 (14:40 +0000)]
New Year - 2012

13 years agopostcommit.pl 1.83: pray.c
keni [Sun, 1 Jan 2012 17:35:48 +0000 (17:35 +0000)]
postcommit.pl 1.83: pray.c
(Getting close to the end.  1.83 cleans up the code and updates the bugs list.)

13 years agoworked once, let's press our luck: botl.c invent.c mkobj.c
keni [Sat, 31 Dec 2011 00:24:26 +0000 (00:24 +0000)]
worked once, let's press our luck: botl.c invent.c mkobj.c

13 years agoagain, looking for that failure condition: pager.c pickup.c
keni [Fri, 30 Dec 2011 23:58:48 +0000 (23:58 +0000)]
again, looking for that failure condition: pager.c pickup.c

13 years agopostcommit.pl 1.82: mthrowu.c music.c
keni [Fri, 30 Dec 2011 23:47:06 +0000 (23:47 +0000)]
postcommit.pl 1.82: mthrowu.c music.c

13 years agonow we need one of those temporary failures so we can see if recovery works,
keni [Fri, 30 Dec 2011 23:14:58 +0000 (23:14 +0000)]
now we need one of those temporary failures so we can see if recovery works,
and that's a crapshoot: mcastu.c mhitu.c

13 years agofirst try tonight: lock.c makemon.c
keni [Fri, 30 Dec 2011 23:10:37 +0000 (23:10 +0000)]
first try tonight: lock.c makemon.c

13 years agolast try for tonight: engrave.c and hack.c
keni [Fri, 30 Dec 2011 04:03:27 +0000 (04:03 +0000)]
last try for tonight: engrave.c and hack.c

13 years agonew hack: and we try dungeon.c and eat.c
keni [Fri, 30 Dec 2011 03:50:15 +0000 (03:50 +0000)]
new hack: and we try dungeon.c and eat.c

13 years agotry another pair: dokick.c dothrow.c
keni [Thu, 29 Dec 2011 23:50:13 +0000 (23:50 +0000)]
try another pair: dokick.c dothrow.c

13 years agocan we commit across directories? src/detect.c and util/makedefs.c
keni [Thu, 29 Dec 2011 23:29:43 +0000 (23:29 +0000)]
can we commit across directories?  src/detect.c and util/makedefs.c

13 years agocan we do two files? artifact.c cmd.c
keni [Thu, 29 Dec 2011 22:46:25 +0000 (22:46 +0000)]
can we do two files? artifact.c cmd.c

13 years agocan we get two in a row? muse.c
keni [Thu, 29 Dec 2011 22:41:56 +0000 (22:41 +0000)]
can we get two in a row?  muse.c

13 years agoand now: bones.c (for postcommit.pl 1.75)
keni [Thu, 29 Dec 2011 22:36:36 +0000 (22:36 +0000)]
and now: bones.c (for postcommit.pl 1.75)

13 years agonext test: dig.c
keni [Thu, 29 Dec 2011 22:28:06 +0000 (22:28 +0000)]
next test: dig.c

13 years agomore debugging: apply.c
keni [Thu, 29 Dec 2011 22:16:49 +0000 (22:16 +0000)]
more debugging: apply.c

13 years agoanother try. spell.c
keni [Thu, 29 Dec 2011 22:01:25 +0000 (22:01 +0000)]
another try.  spell.c

13 years agonext try: do.c (three lines of comment - #1)
keni [Thu, 29 Dec 2011 21:49:27 +0000 (21:49 +0000)]
next try: do.c (three lines of comment - #1)
comment line 2
comment line 3

13 years agothird try: mon.c
keni [Thu, 29 Dec 2011 21:24:15 +0000 (21:24 +0000)]
third try: mon.c

13 years agosecond test file: rumors.c
keni [Thu, 29 Dec 2011 21:14:04 +0000 (21:14 +0000)]
second test file: rumors.c

13 years agomail test / warnings in save.c
keni [Thu, 29 Dec 2011 20:23:00 +0000 (20:23 +0000)]
mail test / warnings in save.c

13 years agoat(1) test#1 / defs for suppressing compiler warnings from pline (etc)
keni [Thu, 29 Dec 2011 20:06:27 +0000 (20:06 +0000)]
at(1) test#1 / defs for suppressing compiler warnings from pline (etc)
First at(1) in postcommit.pl test.  Patch: defs for suppressing compiler
warnings.

13 years agoMakefile construction cleanup
keni [Tue, 27 Dec 2011 00:34:52 +0000 (00:34 +0000)]
Makefile construction cleanup
Update the help text in setup.sh.  When building with a hints file from TOP,
the path to the hints file should start from TOP (instead of "hints/foo").
Make the notes in the generated makefiles consistent as to case.

13 years agoremove duplicate entry
arromdee [Mon, 19 Dec 2011 00:27:17 +0000 (00:27 +0000)]
remove duplicate entry
Since this should just be in 34.4

13 years agoMinor cockatrice fix
arromdee [Sun, 18 Dec 2011 05:16:36 +0000 (05:16 +0000)]
Minor cockatrice fix

PS: Why do we have duplicate fixes__._ files in the branches, since by
definition the same file would have to stay the same in any branch?

13 years agomore getpos() reversal (trunk only)
nethack.rankin [Mon, 12 Dec 2011 22:50:21 +0000 (22:50 +0000)]
more getpos() reversal (trunk only)

     There was a second instance of curs()+flush_screen() that had the
calls swapped 5.5 years ago and is being restored to 3.4.3 state here.

     It turns out that swapping the other instance of those two calls
didn't help with the original problem (^R during getpos() redrew the
screen but left the cursor at the end of the 2nd status line) at all.
Only adding the pline() call after docrt() fixed it.  pline() calls
flush_screen(1) which ultimately puts the cursor back on the hero.  I
still don't understand why curs(WIN_MAP,x,y)+flush_screen(0) leaves it
on the status line instead of at the specified map coordinates.  That
must be a bug in the tty code somewhere.