Remove files duplicated in devteam module
This commit is contained in:
74
doc/archives
74
doc/archives
@@ -1,74 +0,0 @@
|
||||
Known ftp archive sites as of 13 Aug 93 (having at least version 3.1.3
|
||||
unless otherwise noted). The directory name is given, but not individual
|
||||
file names.
|
||||
|
||||
linc.cis.upenn.edu pub/NH3.1/source source, linc packaging
|
||||
linc.cis.upenn.edu pub/NH3.1/binaries/PC PC binary package
|
||||
linc.cis.upenn.edu pub/NH3.1/binaries/amiga Amiga binary package, lzh
|
||||
linc.cis.upenn.edu pub/NH3.1/binaries/mac Mac binary package, hqx
|
||||
linc.cis.upenn.edu pub/NH3.1/binaries/nt NT binary package, zip
|
||||
linc.cis.upenn.edu pub/NH3.1/binaries/os2 OS/2 binary package
|
||||
|
||||
hamlet.caltech.edu [.nethack] source, VMS packaging, and VMS binary
|
||||
HAMLET::ANON_ROOT:[nethack] same, from NSI/DECnet (15186::)
|
||||
uars.acd.ucar.edu [.src.nethack] source, VMS packaging, and VMS binary
|
||||
ACDURS::SYS$LCL:[src.nethack] same, from NSI/DECnet (34210::)
|
||||
|
||||
ftp.uu.net usenet/comp.sources.games/volume16/nethack31 source
|
||||
ftp.uu.net usenet/comp.sources.games source, single tar.Z
|
||||
wuarchive.wustl.edu usenet/comp.sources.games/volume16/nethack31 source
|
||||
ftp.world.net pub/games source, single tar.Z
|
||||
prep.ai.mit.edu pub/gnu source, single tar.gz
|
||||
s.ecc.engr.uky.edu pub/uploads/nethack3.1.2 source, single tar.Z (3.1.2)
|
||||
uxc.cso.uiuc.edu pub source, single tar.gz
|
||||
|
||||
brolga.cc.uq.oz.au comp.sources.games/volume16/nethack31 source
|
||||
ftp.uts.edu.au pub/NH3.1 source, single tar.z (3.1.0)
|
||||
archie.au usenet/comp.sources.games source, single tar.Z
|
||||
archie.au usenet/comp.sources.games/volume16/nethack31
|
||||
|
||||
ftp.uni-erlangen.de pub/games source, single tar.Z (3.0.8, 3.1.0)
|
||||
ftp.uni-kl.de pub/unix/games source, single tar.Z
|
||||
ftp.inria.fr games source, single tar.Z (also 3.0.10)
|
||||
irisa.irisa.fr pub/games source, single tar.Z (3.1.0)
|
||||
dnpap.et.tudelft.nl pub/Unix/Games source, single tar.Z (3.1.2)
|
||||
ftp.luth.se pub/misc/nethack-3.1 source, linc packaging (3.1.1)
|
||||
ftp.funet.fi pub/unix/games source, single tar.gz
|
||||
|
||||
ftp.uts.edu.au pub/NH3.1 linux binary package (3.1.0?)
|
||||
ftp.funet.fi pub/os2/all/games OS/2 binary package
|
||||
ftp-os2.nmsu.edu os2/all/games OS/2 binary package (3.1.1)
|
||||
sunsite.unc.edu pub/Linux/games linux binary package (3.1.2)
|
||||
|
||||
CompuServe availability as of 14 JAN 94:
|
||||
GAMERS MSDOS binary package (.ZIP)
|
||||
AMIGA ARTS Amiga binary package (.lzh)
|
||||
OS2USER OS2 binary package (.ZIP)
|
||||
ATARI ST ARTS Atari GEM binary package (.ZOO)
|
||||
ATARINET Atari binary package (.ZOO)
|
||||
GAMERS sources - all versions (.ZIP)
|
||||
WUGNET Windows NT binary package (.ZIP)
|
||||
MACFUN MAC binary package (.SEA)
|
||||
|
||||
Soon:
|
||||
linc.cis.upenn.edu pub/NH3.1/binaries/atari Atari binary package
|
||||
|
||||
The comp.sources.games master site, and best general reference for UUCP:
|
||||
|
||||
Site: saab
|
||||
Contact: Bill Randle (billr@saab.CNA.TEK.COM), 503-923-4422
|
||||
Location: Redmond, OR
|
||||
Modems: Courier V.32bis
|
||||
UUCP: Anonymous
|
||||
FTP: None
|
||||
Mail server: None
|
||||
Bitnet Lsrv: None
|
||||
Additional: Can make 1/4" cartrige tapes, 8mm Exabyte tapes and
|
||||
3 1/2" and 5 1/4" floppys. A sample L.sys file for anon uucp:
|
||||
saab Any ACU 19200 5039234494 in:-\r-in: ugames ssword: letmein
|
||||
An index can be retrieved by (example):
|
||||
uucp saab!/usr1/ftp/games-archive/Index /usr/spool/uucppublic/Index
|
||||
The Index file also contains further uucp instructions. Will
|
||||
email selected missing parts for desperate people.
|
||||
Note that ftp to this site is not available (except from
|
||||
inside Tektronix).
|
||||
849
doc/buglist
849
doc/buglist
@@ -1,849 +0,0 @@
|
||||
-----------------------------------------------------------------------------
|
||||
Buglist: actual bugs that may get fixed someday
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
=============================================================================
|
||||
A funny thing happened at the portal to Rodney's tower. Wearing
|
||||
levitation boots, I floated onto the portal, and was ported to the
|
||||
tower. Then I took off my boots, and got "You activated the magic
|
||||
portal!", but no immediate teleport. I was able to make one more
|
||||
move, stepping off the portal, and _then_ the teleport happened.
|
||||
I reproduced this in wizard mode - only levitation boots work that
|
||||
way, the ring doesn't. It turns out that after landing on the portal
|
||||
it is possible to take one action (which could be a time-taking move,
|
||||
but also checking the inventory or somesuch) before the teleport
|
||||
actually takes place. [mhed@nym.alias.net]
|
||||
|
||||
Moving when strained or overtaxed was supposedly intended to cause
|
||||
HP loss. allmain.c. But it looks like the flags.mv is set (in cmd.c)
|
||||
only for multiple movement commands, not when walking step by step.
|
||||
A wizmode test confirmed that HP loss happened only when multi-running;
|
||||
simple walking resulted in HP regeneration. The same reason (flags.mv)
|
||||
is probably responsible for the steed being affected by the character's
|
||||
speed boots when walking step by step.
|
||||
> if (wtcap > MOD_ENCUMBER && flags.mv) {
|
||||
> if(!(wtcap < EXT_ENCUMBER ? moves%30 : moves%10)) {
|
||||
> if (Upolyd && u.mh > 1) {
|
||||
> u.mh--;
|
||||
> } else if (!Upolyd && u.uhp > 1) {
|
||||
> u.uhp--;
|
||||
> } else {
|
||||
> You("pass out from exertion!");
|
||||
> exercise(A_CON, FALSE);
|
||||
> fall_asleep(-10, FALSE);
|
||||
> }
|
||||
> }
|
||||
> }
|
||||
[mhed@nym.alias.net]
|
||||
|
||||
Yanked towards water with grappling hook but don't fall in?
|
||||
[psmith@spod-central.org]
|
||||
|
||||
Orc monsters should be given poison res? [psmith@spod-central.org]
|
||||
|
||||
stone-to-flesh monsters' inventory? [psmith@spod-central.org]
|
||||
|
||||
Releasing your pet from a bear trap by displacing is silly.
|
||||
[eino.keskitalo@purkki.mbnet.fi]
|
||||
|
||||
Recoil from throwing while levitating won't trigger every type of trap.
|
||||
Some were checked for and added in 3.3.2 (magic_portal, fire, pits et al on
|
||||
Sokoban), but there are others that you can bypass just by throwing
|
||||
something in the opposite direction.
|
||||
|
||||
When a wand of striking hits a boulder or statue sitting on the down
|
||||
staircase, the resulting rubble/contents should have a chance of
|
||||
falling down the stairs. (Possibly the same situation for trapdoors/holes).
|
||||
|
||||
Individually scattering objects that fall down stairs and holes is
|
||||
inefficient when multiple objects are migrating. It might be better to place
|
||||
all of the migrating objects that are being scattered onto a special obj
|
||||
chain which scatter() could easily be changed to accomodate.
|
||||
|
||||
For "traditional" menu style, pickup and #loot/apply can't accept an 'm'
|
||||
response to bring up a menu upon request when all items involved are of
|
||||
the same class, because the prompt where that response is allowed only
|
||||
gets issued when multiple classes are present.
|
||||
|
||||
Slower decay for corpses on ice has been re-implemented, but slowing down
|
||||
the rate at which they become unfit for consumption has to be looked at.
|
||||
|
||||
Several special levels exhibit lit-wall anomalies.
|
||||
|
||||
float_down() messages conflict with drown() and lava_effects() messages.
|
||||
There's a kludge in place to keep drown() messages from causing duplicate and
|
||||
out-or-order float_down() messages, but lava_effects() has cases where you can
|
||||
float_down w/o any messages being printed at all. These should be very rare,
|
||||
but it should still get fixed in a less kludgy way.
|
||||
|
||||
The resistance delays are very slow on some machines and fine on others, with
|
||||
no apparent pattern. There is a proposal to do timing in a different manner.
|
||||
|
||||
Monsters do not get affected by special properties of many types of armor,
|
||||
like levitation boots.
|
||||
|
||||
Corpses buried under ice ought to be handled as if they were inside an
|
||||
ice box.
|
||||
|
||||
If you dig through the walls of two shops at the same time, only one shk
|
||||
will come seeking payment for damage. If you then beat him back into his
|
||||
shop, leaving the other shop behind, the angry shopkeeper suddenly calms
|
||||
down and welcomes you to his shop.
|
||||
|
||||
Throwing, dropping, or kicking a land mine object ought to have a chance
|
||||
of setting it off. Ditto for hitting it with striking magic or rolling
|
||||
a boulder over it. Likewise for armed land mine traps.
|
||||
|
||||
There are several TODOs and one fixme still in the code. They tend to stay
|
||||
around for a long time.
|
||||
|
||||
Teleporting while using tiles may place you one tile beyond the edge of
|
||||
the display screen, and place the crosshair on empty space.
|
||||
|
||||
Engraving requiring multiple turns ought to be recoded as an occupation
|
||||
so that it could become interruptable.
|
||||
|
||||
Being punished on the Plane of Water does not work correctly. The ball
|
||||
& chain always remain at your current location whether you're dragging
|
||||
them around or whether you're just floating along with an air bubble.
|
||||
(This is bad, but better than the previous behavior of panicking when
|
||||
an air bubble tried to move them.)
|
||||
|
||||
Monster extinction is now a little better, but some cases are not covered
|
||||
which would logically not "use up" the supply of wild monsters. Monster
|
||||
cloning is explicitly such a case; there are some cases that have been
|
||||
missed for now.
|
||||
|
||||
Some of the new monsters (especially water monsters) never appear at random.
|
||||
|
||||
"The combat suddenly awakens you" printed when player was asleep from a
|
||||
sleeping gas trap and woke up. No combat was present.
|
||||
|
||||
The region code displays a fog cloud glyph for clouds, but '/' identifies it
|
||||
as a vortex.
|
||||
|
||||
Reported but unconfirmed bugs:
|
||||
-- Strange things happen to items in chests pets carry downstairs.
|
||||
-- Several reports of core dumps when monsters resist an effect.
|
||||
-- There seem to be more reports of death by trickery than can be accounted
|
||||
for by misset NETWORKs.
|
||||
-- newexplevel() called rnd(-1). I seem to remember this being a Xenix
|
||||
compiler bug, but I'm not sure.
|
||||
-- Reports of minor terminal weirdnesses especially after NetHack dies after
|
||||
catching a signal.
|
||||
-- Reported problem with loss of hit points for no apparent reason until
|
||||
player was left with 1 out of 1 hit points.
|
||||
-- Monsters were displayed as 'I' (unseen monster) but were referred to by
|
||||
name. [Irina]
|
||||
-- A wand of secret door detection self-identified while engraving even
|
||||
though it didn't find anything. [Irina]
|
||||
|
||||
Riding bugs:
|
||||
-- If you have see invisible and your invisible steed becomes truly
|
||||
invisible (potion timeout or ring removal) we need to revert to
|
||||
showing the player in that situation. The u.usteed check in the
|
||||
display_self() macro could become u.usteed && !u.usteed.minvis
|
||||
to accomodate that.
|
||||
-- Wielding Stormbringer while riding should result in it attacking
|
||||
your steed on occasion.
|
||||
-- The steed might want to wander about when you are paralyzed (of course the
|
||||
knight's well-trained pony wouldn't)
|
||||
[eino.keskitalo@purkki.mbnet.fi]
|
||||
|
||||
|
||||
Platform specific bugs:
|
||||
-----------------------
|
||||
MAC
|
||||
- Doesn't work well when switching between foreground and background.
|
||||
- Gives a "type 1" error for some people on startup (unconfirmed --
|
||||
may be due to MW compiler bug).
|
||||
MSDOS
|
||||
- The Rogue level is unable to use the proper characters for armor or
|
||||
rings, since they would get interpreted as control characters.
|
||||
- "RAMDISK" feature in defaults.nh hasn't worked for some time
|
||||
and is past much of its usefulness. A temp directory would be
|
||||
more appropriate.
|
||||
- The MSC7 compile results in "stack plus data exceeds 640k" messages.
|
||||
- Clearing the screen doesn't necessarily work. For instance, a bad
|
||||
options line can leave "Hit <Enter> to continue." on the bottom of the
|
||||
screen, which ^R will not redraw.
|
||||
- Compiling without DLB using DJGPP does not work with the supplied
|
||||
Makefile.
|
||||
- On the djgpp version, a large number of arguments to "nethack -s"
|
||||
can crash the program. "nethack -s *" in a directory with a lot of
|
||||
filenames can trigger this problem.
|
||||
- set_bonestemp_name() needs to be fixed for the #if MICRO configuration.
|
||||
It currently uses the device+directory path for level files, but bones
|
||||
can be placed elsewhere so renaming from the temp name to the final
|
||||
bones file name isn't reliable.
|
||||
NT
|
||||
- With console window larger than 80x25 (80x43) some commands that
|
||||
display text underneath the map don't clear to eol, so you get
|
||||
stray chars left there (?a, ?b, ?c, ?g and ?i, but not others).
|
||||
- When a game is started on a console larger than 80x25, the game
|
||||
only occupies the first 25 lines, leaving whatever junk happened
|
||||
to be on the screen prior to starting NetHack still there.
|
||||
Unix
|
||||
|
||||
X11
|
||||
- It is possible to get a prompt which does not vanish from the screen.
|
||||
- Anything which gives two prompts in a row at which one may type a single
|
||||
character, has a several second delay between when the single character is
|
||||
read for the first prompt and the first prompt is erased, and the second prompt
|
||||
is printed.
|
||||
|
||||
tty
|
||||
|
||||
Guidebook
|
||||
- various mentions of spellcasting are all based on the old system
|
||||
rather than the present wizard patch implementation.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Problems/tradeoffs which are probably not going to get fixed
|
||||
------------------------------------------------------------------------------
|
||||
Some quest messages get delivered when they no longer make sense, such as
|
||||
the dying threat of a quest nemesis being given after it's been beheaded,
|
||||
petrified, or disintegrated. Likewise, at least one of the quests gives
|
||||
"you sense the presence of the {quest artifact}" message upon return to
|
||||
the goal level, even when it happens to already be in your possession.
|
||||
|
||||
If a quest leader gets polymorphed and then killed before quest completion,
|
||||
the code which suppresses the call for assistance when he's dead doesn't
|
||||
notice.
|
||||
|
||||
Energy monsters, like yellow lights, ghosts, and wraiths, are treated like
|
||||
solid monsters inappropriately in several ways.
|
||||
|
||||
Because there is no record of which squares a leash is in, leashed
|
||||
pets can follow you through a different door than you left a room
|
||||
from, or teleport through a door you closed between yourself and it.
|
||||
|
||||
"baby red dragon", &c. is a kludge. The "correct" way to do it would be to
|
||||
use monsters with a small mlevel for baby monsters, but this has several
|
||||
problems such as name_to_mon() not working, random generation being unable to
|
||||
create them earlier, and inability to create them with worse armor classes or
|
||||
attacks which do less damage.
|
||||
|
||||
The "/" command, when used on areas outside of rooms, guesses (dark part of
|
||||
a room) incorrectly. Correcting will require a new glyph type (ie, unknown
|
||||
or unexplored area).
|
||||
|
||||
There are hooks for invisible objects, but they're not really implemented. It
|
||||
has complicated ramifications involving which monsters can see and pick them
|
||||
up (and whether the player notices), ensuring snakes cannot hide under them,
|
||||
and whether they can be taken out of containers.
|
||||
|
||||
Missile weapons not hitting their targets always drop to the floor where
|
||||
the targets are. What should happen is that it sometimes drops and sometimes
|
||||
whizzes by (possibly to hit a monster behind it) depending on several factors:
|
||||
Is the monster's AC because of scales, hide, etc... (so missiles which "miss"
|
||||
actually hit and dropped but didn't injure) or is it because the monster is
|
||||
small and quick (so the missile whizzed by)? Is the monster flying or on the
|
||||
ground? Is the player levitating? Is the player unusually short or tall
|
||||
(i.e., if the player is polymorphed), etc....
|
||||
|
||||
Monsters don't change either peacefulness or malign when the player changes
|
||||
alignment. This can't be fixed because it would be impossible to ensure that
|
||||
two alignment switches put the monsters back the way they were. For one thing,
|
||||
monster peacefulness is based on the player's alignment record as well as his
|
||||
type (and we don't want to change peacefulness every time the record changes!),
|
||||
and for another, the monster's peacefulness might have changed from its initial
|
||||
value and two switches wouldn't bring it back to normal.
|
||||
|
||||
You can open/close doors diagonally, but cannot enter them diagonally. This
|
||||
seems inconsistent. [Comment: The main reason why this is blocked is
|
||||
because of shop behavior. Allowing diagonal entry will nullify the body
|
||||
block by the shk, when you carry unpaid items. If diagonal moves are
|
||||
allowed, shopkeepers should close the door when you're inside. IM]
|
||||
|
||||
Monsters cannot use AD_STCK or AD_WRAP on other monsters. The complications
|
||||
are too great, and would add little to the game.
|
||||
|
||||
Polymorphed players, as well as monsters, who swallow monsters either totally
|
||||
digest them or immediately regurgitate them; unlike monsters who swallow
|
||||
players, they cannot have their victim inside them for several moves.
|
||||
|
||||
You cannot stop eating, transcribing, or removing armor, save the game, restore
|
||||
it, then expect to continue. These use static data structures which aren't
|
||||
saved.
|
||||
|
||||
Problems can arise when your movement is being stopped by two different
|
||||
things, both of which use nomul() and/or nomovemsg. (Still possible, though
|
||||
much less likely.)
|
||||
|
||||
There is no option to not hit certain monsters such as floating eyes. This
|
||||
is not likely to be "fixed" as the resulting risk is inherited directly from
|
||||
rogue's floating eyes and ice monsters.
|
||||
|
||||
If you're blind, or the swallower is invisible, you still see the interior
|
||||
of a monster when swallowed. [I think that the monster should show up when
|
||||
blind. After all, you can feel it around you. For invisible swallowers,
|
||||
it depends on what is meant by invisible. If invisible means "bend light
|
||||
around you" then the interior _should_ show up. If invisible means "you
|
||||
are transparent" then the interior should not be displayed, and, in fact,
|
||||
the dungeon should be displayed around the hero. -Dean]
|
||||
|
||||
The color display on color screens is not really integrated into object
|
||||
visibility. Seeing the color does not cause dknown to be set even for a
|
||||
colored object. Similarly, if dknown is not set (i.e. when blind) the object
|
||||
shows up in color anyway.
|
||||
|
||||
The monster movement rate is also used to decide when the monster attacks.
|
||||
Therefore, a monster with half normal movement rate (6") also attacks only
|
||||
half the time. This gets ridiculous in some cases (mimics, puddings), as
|
||||
well as making soldiers less tough than they probably were meant to be.
|
||||
The monster difficulty level calculation doesn't take into account infrequent
|
||||
attacks due to a low movement rate, either, and many monsters are obvious
|
||||
ports from AD&D where the rate does _not_ reduce the number of attacks.
|
||||
The fix itself is fairly simple, but some balance testing will be needed.
|
||||
|
||||
The Amulet of Yendor and artifacts are not allowed in containers; it becomes
|
||||
harder to check if you are carrying one, harder for monsters to steal one,
|
||||
and a pain to handle if the container gets destroyed.
|
||||
|
||||
Polymorphed players who end up in doors or walls upon rehumanization, and have
|
||||
2 places to go to, can go to either of them.
|
||||
|
||||
The !verbose option has not been tested for a long time. A quick test shows
|
||||
that most messages except for hitting a monster are unaffected by it. It
|
||||
should be either removed, or modified to do something useful.
|
||||
|
||||
Invisible monster markers ('I') use the hero's memory (levl[x][y].glyph).
|
||||
So does remembering what objects are on the ground. This means that the
|
||||
presence of an unseen monster causes the player to forget what was on the
|
||||
ground.
|
||||
|
||||
Kicked objects which hit other objects give a message when the other objects
|
||||
are on a hole and don't fall, but not when there is no hole, even though the
|
||||
exact same thing happens. This is intentional.
|
||||
|
||||
If someone identifies a ring by wearing it, while blind, dknown is not set.
|
||||
This means that they can put on, say, a ring of levitation, levitate, and know
|
||||
what other rings of levitation are without knowing this one, until they become
|
||||
unblinded and recognize the type. There is no real way to fix this because
|
||||
there is no way to say "they don't know that this type is associated with this
|
||||
material now, but they'll know it as soon as they can see".
|
||||
|
||||
Shades cannot be attacked by players unless they have silver or blessed
|
||||
weapons. Monsters who attack shades are not subject to similar restrictions.
|
||||
|
||||
The idea of giants carrying boulders, and the idea of boulders being huge
|
||||
objects that block passages, really don't mesh very well. At worst, a boulder
|
||||
fills the full height of a passage and for a giant to carry one is the
|
||||
equivalent of a human carrying a boulder his own height in a passage no higher
|
||||
than the boulder is tall. At best, the grid squares are taller than they are
|
||||
wide, and it is still the equivalent of a human carrying a rock that is at
|
||||
least two feet wide, not to mention that you can't fly or levitate over the
|
||||
boulder and giants that carry them don't block light.
|
||||
-------------------------------------------------------------------------
|
||||
3.'s Doomed Agenda (which doesn't mean they're reserved!)
|
||||
-------------------------------------------------------------------------
|
||||
Integration:
|
||||
Allow crystal balls to detect furniture types.
|
||||
|
||||
#offer items to shopkeeper in shops for price quotes.
|
||||
|
||||
#force doors.
|
||||
|
||||
open (#force, #loot) boxes next to you, bags in inventory.
|
||||
|
||||
Integrate cans of grease more. Fumbling with greased objects.
|
||||
Towels degreasing objects. Greased shields of reflection and mirrors
|
||||
don't reflect well. Greasy paper and cloth are especially combustible.
|
||||
|
||||
Non-swimmers move extra slow underwater. Being underwater reduces
|
||||
AC. Lighting works differently underwater.
|
||||
|
||||
Mark food dipped in potions of sickness as poisoned, and cause
|
||||
players/monsters that eat it to take damage accordingly. (Here,
|
||||
Spot! I have this nice tripe ration for you!)
|
||||
|
||||
Artifacts:
|
||||
Magicbane drains magic.
|
||||
|
||||
Make Stormbringer willfully steer you toward monters when you're
|
||||
stunned, on some occasions curse itself when it doesn't want to be
|
||||
unwielded, and turn on you if you still wield it at the end of the
|
||||
astral level or summon brethren to the chaotic minions. "Blood and
|
||||
souls for my lord Arioch!" Perhaps mark Stormbringer kills as
|
||||
unsacrificible, and give Stormy some of the XP.
|
||||
|
||||
Excalibur breaks when used for evil or after being stolen from a
|
||||
shop, but can be repaired by dipping in an appropiate place if your
|
||||
alignment is good. And/or refuses to attack peaceful creatures.
|
||||
|
||||
Perhaps replace Dragonbane with Dragonslicer.
|
||||
|
||||
Consider unique, less useful Saberhagen swords like the healing
|
||||
sword or the one that only touches your opponent's weapon.
|
||||
|
||||
Religion:
|
||||
Using a non-aligned artifact is bad religion.
|
||||
|
||||
Greater alignment adjustments for killing very tame monsters (such
|
||||
as your children), and adjustments for killing angels.
|
||||
|
||||
Lower or remove alignment bonus for killing monsters much weaker
|
||||
than you that don't pose much challenge.
|
||||
|
||||
Moloch's wrath is nastier than your gods'.
|
||||
|
||||
Sacrificing temple priests should be more than the ordinary human
|
||||
sacrifice. Sacrificing angels should be special too. Sacrificing
|
||||
the Wizard of Yendor should be extraordinary. Perhaps just a lesser
|
||||
demon for sacrificing some humans, and demon lords for sacrificing
|
||||
priests. The Wizard, hmm...
|
||||
|
||||
At same level where gods would give you a passtune, have gods help you
|
||||
find an unfound portal on the level.
|
||||
|
||||
Consider tameness of corpses when eating. Fix tameness reset by cloning.
|
||||
|
||||
Special levels:
|
||||
Install homeless demon lords in their own distinct lairs, with
|
||||
appropriate monsters surrounding them. Add support for the Styx
|
||||
level.
|
||||
|
||||
Level compiler wishlist:
|
||||
monster inventory
|
||||
desecrated altars
|
||||
special level filler lit option
|
||||
wall on left edge bug when non-rock filler used
|
||||
|
||||
Special levels of special sizes. Small tower levels only stored as
|
||||
a small region. Perhaps the bigroom level is larger than the normal
|
||||
screen size, so with clipping you only see one or two walls at once.
|
||||
|
||||
Balance:
|
||||
Adjust object creation probabilities and monster equipment by level,
|
||||
so there is a progression from "low level" objects up near the
|
||||
entrance and "higher level" objects the deeper you go. Don't
|
||||
generate figurines on high levels for the same reason as not making
|
||||
statue traps; who needs a figurine of a newt? [No to the first!
|
||||
I've played Moria. Waiting for those two rings of speed at 2500
|
||||
feet was a *pain*. --KAA]
|
||||
|
||||
Balance fountain/sink effects on low levels (restrict them to deeper
|
||||
ones?) like preventing water moccasins and water demons from
|
||||
happening, as with exploding doors.
|
||||
|
||||
Make quest leaders and nemeses less prone to instant deaths, and/or
|
||||
tone down instant deaths in the game (beheading/bisecting, stoning,
|
||||
eating, crushing, burying, drowning).
|
||||
|
||||
Monsters:
|
||||
Make intelligent monsters use wands of teleport on you if you're at
|
||||
where they're going (like demon lords to up stairs, or if you're
|
||||
standing on a quest artifact).
|
||||
|
||||
Lawful pets don't attack lawful creatures.
|
||||
|
||||
Keraunophobic pets. Photophobic monsters.
|
||||
|
||||
Give Wizard of Yendor magic resistance, and make quest monsters and
|
||||
demon lords less prone to instant death. (Perhaps give some quest
|
||||
monsters reflection objects. Perhaps make the Amulet of Yendor turn
|
||||
weapons like the vorpal blade.)
|
||||
|
||||
mfloat/mlevit for levitated monsters, make monsters wearing levitation
|
||||
boots levitate (extend floating monster checks for traps, picking up
|
||||
objects, &c.).
|
||||
|
||||
Separate monster sleep from paralysis.
|
||||
|
||||
Jellocubes can eat doors.
|
||||
|
||||
Allow shamans to animate corpses into zombies.
|
||||
|
||||
Orcus animates the dead.
|
||||
|
||||
Perhaps shopkeepers could fill in pits too. Players who vandalize
|
||||
the store while shopkeepers are repairing other vandalism makes 'em
|
||||
angry.
|
||||
|
||||
Killing shopkeepers/priests makes watchmen angry.
|
||||
|
||||
Make shopkeepers smarter in general, using their weapons and armor
|
||||
when angry, lowering their awesome strength and AC commensurate to their
|
||||
initial equipment, picking up their stock in trade (and perhaps gold) when
|
||||
they leave their shop (dropping it when they return), and making them
|
||||
attack monsters looting their shops (ones carrying unpaid objects).
|
||||
|
||||
Make shopkeepers catch their wares when thrown. (And throw credit cards
|
||||
back.) Make guards catch gold and put it back in the vault.
|
||||
|
||||
Make vampires change to bats and vice versa.
|
||||
|
||||
Perhaps give Kops a distance bonus when throwing pies.
|
||||
|
||||
Lizards hide.
|
||||
|
||||
Give orcs something to #chat about.
|
||||
|
||||
Monsters shy away if you're too tough.
|
||||
|
||||
Correct marilith weapon attacks.
|
||||
|
||||
Smart monsters loot containers. Dwarves could force containers with
|
||||
their pick-axes.
|
||||
|
||||
Some monsters have natural enemies, that they will avoid/be attacked
|
||||
by (rat -> cat -> dog). Your rat and cat may be tame, but they
|
||||
would chase and fight.
|
||||
|
||||
Set real destinations for monsters instead of aimless wandering,
|
||||
especially dwarves, so their tunnels have direction.
|
||||
|
||||
Allow zombies/mummies/skeletons/etc. of many types with a monster
|
||||
number field like objects.
|
||||
|
||||
Make Nazgul the heavies they should be.
|
||||
|
||||
Monster wishes. [Are you mad? --KAA]
|
||||
|
||||
Kops attach iron balls.
|
||||
|
||||
When grid bugs grow up, they split into clones.
|
||||
|
||||
Objects:
|
||||
ocan field for general object cancellation.
|
||||
|
||||
Perhaps allow low-damage bullwhips to strike two positions away.
|
||||
|
||||
Game play:
|
||||
Make starting under MS-DOS initialize IBMgraphics and lit_corridor
|
||||
TRUE, and maybe video:autodetect, when appropriate.
|
||||
|
||||
Display a helpful message pointing you to the right command if you
|
||||
try to remove armor instead of take off, or take off rings instead
|
||||
of remove. Or apply wands, books, scrolls, etc. (Or just do what
|
||||
you meant.)
|
||||
|
||||
Divide score by # times killed.
|
||||
|
||||
"A" to select among all for Drop, identify, and other ggetobj() calls.
|
||||
|
||||
Commands from inventory menu.
|
||||
|
||||
Highlight low HP
|
||||
|
||||
Command to wait until you are healed up. ("g."?)
|
||||
|
||||
Touch type mode to shift [hjkl] to [jkl;].
|
||||
|
||||
Null options unset.
|
||||
|
||||
Separate put-in and take-out commands. Or open . on chests.
|
||||
|
||||
Break some of the object classes into separate groups, like
|
||||
containers to "]", ammo to "\", cadavers from other food, gems from
|
||||
other rocks.
|
||||
|
||||
Perhaps use special background colors (or outline tiles) for glyphs
|
||||
of tame or seen invisible monsters.
|
||||
|
||||
Let cave dwellers detect rotten food for another class difference.
|
||||
|
||||
Name objects on ground, for all those kicked loadstones.
|
||||
|
||||
"Feel apprehensive..." warning adjectives
|
||||
|
||||
Realism:
|
||||
Prevent snakes/giant spiders from hiding under gems or other too-small
|
||||
objects.
|
||||
|
||||
Limit large mimics to large objects and small mimics to smaller ones
|
||||
and from doors.
|
||||
|
||||
Limit the merging of food so that very fresh and very spoiled food
|
||||
don't mix.
|
||||
|
||||
Eating zombies and mummies should likely make you sick.
|
||||
|
||||
Make exploding drawbridges do explosion damage, not instant kills.
|
||||
Perhaps be pinned by drawbridges (and boulders) that fall on you.
|
||||
Perhaps add junk objects like broken doors/drawbridges.
|
||||
|
||||
Make certain wild animals like jackals eat corpses left lying around,
|
||||
and perhaps only aggressive when hungry (but hunger is only measured
|
||||
for pets now).
|
||||
|
||||
An acid blob should corrode what it picks up, and maybe what it
|
||||
passes over on the floor.
|
||||
|
||||
Trap doors ought to go to consistent places in the next level, but
|
||||
what about branching dungeons? Make holes in the floor and holes in
|
||||
the ceiling deterministic dungeon features.
|
||||
|
||||
Weapon traps (dart, arrow) should have a finite supply of missiles.
|
||||
(Perhaps darts buried in the floor? Or in the wall if we prevent
|
||||
such traps in the middle of the floor.)
|
||||
|
||||
Open tins that rot like corpses and that pets can eat. Partly-eaten
|
||||
tins are open.
|
||||
|
||||
Damp swamps that damage scrolls and books and maybe rust items left
|
||||
there a long time.
|
||||
|
||||
Damp scrolls that can't be written on until they dry.
|
||||
|
||||
Embedded gems in rings and jeweled items left behind by eating.
|
||||
|
||||
Use pick-axes on iron chains.
|
||||
|
||||
Use axe as an axe to chop up doors, chests, etc.
|
||||
|
||||
Split AC into evasion AC and damage AC, so that dragons are easy to
|
||||
hit (low evasion AC) but hard to hurt (high damage AC), to make
|
||||
combat seem more realistic, with some indication of ineffectual
|
||||
blows.
|
||||
|
||||
Split encumbrance into weight and bulk (which affects how much you
|
||||
can put in containers, and a direct limit on carrying capacity).
|
||||
|
||||
Atmosphere:
|
||||
Perhaps make all class-specific anachronisms like credit cards,
|
||||
Hawaiian shirts, expensive cameras, fedoras, stethoscopes all 0
|
||||
random creation probability.
|
||||
|
||||
Change fake mail on micros to a note from the Wizard or a bill from
|
||||
a shopkeeper triggered in the appropriate circumstances.
|
||||
|
||||
Put in a special message for huge special-level shops.
|
||||
|
||||
Draw out poison effects with a Poisoned timeout.
|
||||
|
||||
Have awakened monsters in special rooms growl() to wake other nearby
|
||||
monsters.
|
||||
|
||||
Some newly-generated monsters tend to appear on stairways, others to
|
||||
appear in pools, etc.
|
||||
|
||||
Put a chest of sunken treasure underwater, now that we can specify chest
|
||||
contents (there are other treasure chests that need this already).
|
||||
|
||||
Creaky doors which wake monsters. Graveyards should usually have
|
||||
creaky doors.
|
||||
|
||||
Players killed and eaten leave bones or partially-eaten corpses.
|
||||
|
||||
Greedy killers snarf your gold. Nymphs should take everything.
|
||||
Shopkeepers pick up gold dropped in their shops.
|
||||
|
||||
Make general "Wow!" function for pline hallucination interjections
|
||||
for variety.
|
||||
|
||||
Make A.S. -> engravings that point to stairs
|
||||
|
||||
Spell casting enhancements:
|
||||
|
||||
Add something like bracers of defense so that spell casters do not have
|
||||
to wear armor.
|
||||
|
||||
Add some sort of a "mute" spell to silence monster's cursing abilities,
|
||||
and players spell casting abilities.
|
||||
|
||||
Make a detect magic spell. There are hooks marking magic items in
|
||||
objects[] for this.
|
||||
|
||||
Silly:
|
||||
Cute hallucination message about bowling when throwing an iron ball.
|
||||
|
||||
"alligator shoes".
|
||||
|
||||
If you quit in the Wizard of Yendor's presence, he calls you a wimp.
|
||||
|
||||
Hallucinated fist fights have sound effects. Pow! Wham! Biff!
|
||||
Sock! Krak! Boom! Zap! [Blame Kibo, it was his idea!]
|
||||
|
||||
Glyphs:
|
||||
Redraw mail daemon
|
||||
|
||||
Moat different from pool
|
||||
|
||||
Object classes
|
||||
|
||||
Floor engravings
|
||||
|
||||
Use in discovery list?
|
||||
|
||||
A couple hallucinated monsters
|
||||
|
||||
Directed objects (missiles pointing each direction like boomerangs,
|
||||
could flip three horizontal/vertical/diagonal tiles as appropriate).
|
||||
|
||||
Quantities of objects -- ex. 1 dart, (few darts,) many darts
|
||||
|
||||
General large pile glyph
|
||||
|
||||
Individual monster statues & corpses (& tins?)
|
||||
|
||||
Glowing?
|
||||
|
||||
Pillars for Delphi temple
|
||||
|
||||
New:
|
||||
Use flint stone with metal object to light candles.
|
||||
|
||||
Beholders with gaze attacks and anti-magic line of sight (or wimp
|
||||
out and just create them by beholder zaps). Sleep and slow eyes
|
||||
aren't beams. Blinding would probably only work on the center eye,
|
||||
Anti-magic is the difficult part. The right way is to have anti-
|
||||
magic field bits for each square on the level. Players and monsters
|
||||
standing in the area would be temporarily cancelled. Spells and
|
||||
zaps in or through the square fizzle and magic scrolls and potions
|
||||
don't work. Plusses don't add. Also unpoly a la protection from
|
||||
shape changers. Perhaps Wizards can recognize them. Antimagic
|
||||
traps could be replaced with anti-magic squares. Magical monsters
|
||||
should avoid.
|
||||
|
||||
Add a wooden sword (bokken/bokutou?) to the game, naturally safe
|
||||
from rust or corrosion (but maybe digested when used against a
|
||||
jellocube).
|
||||
|
||||
Magic mouth engraving/trap for special levels. Either
|
||||
engraving-like messages, or just standard discouragements like "Go
|
||||
away.", "Scram.", "Beat it.", "Get out.", "None shall pass.", etc.
|
||||
Perhaps even putting one on a statue.
|
||||
|
||||
Diablo tribute:
|
||||
New monster that throws balls of molten lava (that they generate
|
||||
out of thin air) which would at least be different from anything
|
||||
we've presently got. There are some others which act as hiders
|
||||
(in Diablo, rather than really hide they rely on just being hard
|
||||
to see when stationary against the murky background display) which
|
||||
become active if you get too close or hit them with a ranged attack
|
||||
and become dormant again when you move away. The difference from
|
||||
our existing hiders is that they act more like bats once they're
|
||||
active, instead of being really slow moving engulfers or mimics.
|
||||
The venom code may allow for this. A new lava "venom" sharing the
|
||||
same class for generated-on-demand-liquid seems like the right
|
||||
place anyway.
|
||||
|
||||
|
||||
Rename #ifdef SOUNDS -> NOISES
|
||||
|
||||
Disintegrate object after it becomes completely corroded?
|
||||
|
||||
Don't put food in statues of stoned creatures.
|
||||
|
||||
Cancel intrinsics.
|
||||
|
||||
Zapping a wand wields it like a pick-axe.
|
||||
|
||||
Glowing Orcrist as a light source.
|
||||
|
||||
Make statue traps trapped objects, triggered after you step on their
|
||||
position. Perhaps bear traps too, but make them turn invisible.
|
||||
|
||||
Use oerosion for rings/gems damaged by engraving. [Perhaps also damp
|
||||
scrolls? goopy towels?]
|
||||
|
||||
Tourist search for lost Luggage.
|
||||
|
||||
Eating wood/iron golems whole, should iron golems really be poisonous?
|
||||
|
||||
Put -DWIZARD -DHACKDIR comments in makefiles.
|
||||
|
||||
Perhaps allow different poisoned weapon effects for different potions.
|
||||
Change "Interesting..." since it suggests something happens when nothing
|
||||
does.
|
||||
|
||||
Allow you, by #chat, to have shopkeepers identify objects in their specialty
|
||||
for you, for a fee. (500zm?)
|
||||
|
||||
Dallying with seducers unsets your u.uvirgin bit, which would cause unicorns
|
||||
to more actively avoid your company.
|
||||
|
||||
Hallucinate objects (on floor with /, swung/thrown at you...).
|
||||
|
||||
Horn of Geryon summons minotaurs.
|
||||
|
||||
Beheading Medusa with vorpal blade.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Ken's Doomed Agenda (see, I can have one too...)
|
||||
-------------------------------------------------------------------------
|
||||
Add a wand of wonder (like the AD&D item).
|
||||
|
||||
Shopkeepers angered when you break their door should be calmable by repairing
|
||||
the door (using a wand of locking or a spell of wizard lock).
|
||||
|
||||
Add SCR_ENCHANT_WEAPON, SCR_REMOVE_CURSE, SCR_ENCHANT_ARMOR, SCR_DESTROY_ARMOR
|
||||
to items usable by monsters.
|
||||
|
||||
Add one (or more) magic items that are mostly useful for monsters against
|
||||
players (though players _could_ use them).
|
||||
|
||||
The code contains several sections which were necessary when removing a
|
||||
fire resistance item (weapon, armor, ring) was instant death in Hell. These
|
||||
could use removal.
|
||||
|
||||
Effects for the blessed scrolls/potions with effects that are absent:
|
||||
-- destroy armor: (see controversial item section)
|
||||
|
||||
"Welcome to Experience Level ___" for pets.
|
||||
|
||||
What are all those pieces of glass doing in the dungeon? Possibly replace
|
||||
with "worthless colored rock" or specific worthless rock type (quartz,
|
||||
feldspar, etc.)
|
||||
|
||||
Container capacity limits (say, didn't we already have these once?)
|
||||
|
||||
Potions should, logically, not suddenly have their flasks disappear when you
|
||||
drink them. The main challenge in doing this is to make sure this does not
|
||||
produce infinite supplies of polymorph fodder and holy water fodder.
|
||||
-----------------------------------------------------
|
||||
controversial items
|
||||
-----------------------------------------------------
|
||||
Allow scrolls of destroy armor to enable the player to select the (worn)
|
||||
item to be destroyed if they are blessed.
|
||||
|
||||
Wild carnivores should eat corpses.
|
||||
|
||||
If all '#' commands are to be typed with a single letter, hitting backspace
|
||||
should erase the entire command, instead of requiring the player to hit several
|
||||
backspaces to do so.
|
||||
|
||||
When you wear things which get identified by putting them on, they get
|
||||
identified before being put on, so the on-message prints out the identified
|
||||
type. Whether this is reasonable can be argued either way.
|
||||
|
||||
Monsters with AT_WEAP attacks do damage equal to the sum of their non-weapon
|
||||
damage and the damage done by the weapon. Players polymorphed into such
|
||||
monsters only do the weapon damage, with no additions. This is arguably
|
||||
necessary for game balance.
|
||||
|
||||
Very_small non-flyers should have a penalty to hit levitated creatures. But
|
||||
this is a lot of work, causes no apparent difference (unless the penalty is
|
||||
really large), requires too much extra code and special cases (i.e. a
|
||||
monster with long tentacles or jumping ability shouldn't get the penalty),
|
||||
and adds nothing to the game, so why put it in?
|
||||
|
||||
Charged rings should be priced by their charge.
|
||||
Wands should be marked down when at 0 charges.
|
||||
Maybe mark down diluted potions as well.
|
||||
|
||||
A hit that misses due to AC should be taken by the armor. The armor should
|
||||
turn the blade, absorb the blow, or whatever, with various messages for each
|
||||
circumstance. In addition, it would be nice if armor accumulated damage,
|
||||
and after enough of it, became degraded or useless (or just destroyed).
|
||||
I imagine an object "hit point" (entropy?) field, which might also be a logical
|
||||
place to mark wet scrolls, diluted potions, and rotten corpses.
|
||||
|
||||
Various food items: mushroom, sandwich, tortilla, cheese, asian pear, pill,
|
||||
and holy wafer. Most of them because they are not needed and the latter
|
||||
because of it's potential to offend.
|
||||
|
||||
"Wallet of Perseus" bag of holding may be found in statue of Perseus on
|
||||
Medusa level.
|
||||
|
||||
Any addition of firearms met with strong opposition.
|
||||
|
||||
Flyswatters and paddles; designed to be effective against insects.
|
||||
|
||||
Fishing pole; added grapple hook instead.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
NetHack 3.3 Directory Tree (11/29/99)
|
||||
|
||||
Top
|
||||
|
|
||||
-------------------------------------------
|
||||
| | | | | | |
|
||||
src include dat doc sys win util
|
||||
| |
|
||||
---------------- --------------
|
||||
| |
|
||||
| -------------------------------------
|
||||
| | | | | | | |
|
||||
| share tty X11 Qt win32 gem gnome
|
||||
|
|
||||
--------------------------------------------------------
|
||||
| | | | | | | | | |
|
||||
unix vms mac amiga msdos os2 winnt atari be share
|
||||
| | | |
|
||||
old | old |
|
||||
| |
|
||||
splitter sounds
|
||||
143
doc/lists
143
doc/lists
@@ -1,143 +0,0 @@
|
||||
As of October 1999, these addresses were good, except for those marked.
|
||||
Those marked with - were bad (but left in case the person reappeared),
|
||||
and ? were unknown because mail hadn't been being sent to them.
|
||||
|
||||
|
||||
The Development Team
|
||||
|
||||
michael.allison2@sympatico.ca (Michael Allison)
|
||||
warwick@trolltech.com (Warwick Allison)
|
||||
arromdee@rahul.net (Ken Arromdee)
|
||||
d.cohrs@computer.org (David Cohrs)
|
||||
jccollet@eng.sun.com (Jessie Collet)
|
||||
creps@silver.ucs.indiana.edu (Steve Creps -- don't put on mailing lists) (?)
|
||||
kevin@rotag.mi.org (Kevin Darcy)
|
||||
thakulin@hila.hut.fi (Timo Hakulinen)
|
||||
eric@ux.acs.umn.edu (Eric Hendrickson)
|
||||
kmhugo@students.wisc.edu (Kevin Hugo)
|
||||
sxl6400@hertz.njit.edu (Steve Linhart, alias Mike Threepoint) (-)
|
||||
keni@his.com (Ken Lorber)
|
||||
dean@natinst.com (Dean Luick)
|
||||
nethack.rankin@eql.caltech.edu (Pat Rankin)
|
||||
esr@snark.thyrsus.com (Eric Raymond) (+/?)
|
||||
mike.stephenson@spectrasoftware.com (Mike Stephenson)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
PaulWinner@juno.com (Paul Winner)
|
||||
|
||||
The VMS group
|
||||
|
||||
joshua@altair.csustan.edu (Joshua Delahunty)
|
||||
nethack.rankin@eql.caltech.edu (Pat Rankin)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
The PC Group
|
||||
|
||||
michael.allison2@sympatico.ca (Michael Allison)
|
||||
dyer@cig.mot.com (Bill Dyer)
|
||||
y-keizo@tcp-ip.or.jp (Yamamoto Keizo) (-)
|
||||
sxl6400@hertz.njit.edu (Steve Linhart, alias Mike Threepoint) (-)
|
||||
esr@snark.thyrsus.com (Eric Raymond) (+/?)
|
||||
sapiri@inter.net.il (Yitzhak Sapir)
|
||||
Kevin@smolkowski.com (Kevin Smolkowski)
|
||||
mike.stephenson@spectrasoftware.com (Mike Stephenson)
|
||||
swhite@cs.mun.ca (Stephen White)
|
||||
north@kevin.cse.canon.co.jp (Ken Washikita)
|
||||
PaulWinner@juno.com (Paul Winner)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
The OS/2 Team
|
||||
|
||||
thakulin@hila.hut.fi (Timo Hakulinen)
|
||||
vaniwaar@ca.metsci.com (Ron Van Iwaarden)
|
||||
mike.stephenson@spectrasoftware.com (Mike Stephenson)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
The Amiga Team
|
||||
|
||||
achurch@dragonfire.net (Andy Church)
|
||||
jhsa@cs.tut.fi (Janne Salmijarvi)
|
||||
zu@iki.fi (Teemu Suikki)
|
||||
keni@his.com (Ken Lorber)
|
||||
daniel@cs.kun.nl (Olaf Seibert) (Do NOT put on mailing lists) (?)
|
||||
gregg.wonderly@pobox.com (Gregg Wonderly)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
mike.stephenson@spectrasoftware.com (Mike Stephenson)
|
||||
|
||||
The Mac Team
|
||||
|
||||
jhandler@ils.nwu.edu (Jonathan Handler)
|
||||
kmhugo@students.wisc.edu (Kevin Hugo)
|
||||
dean@natinst.com (Dean Luick)
|
||||
modrall@world.std.com (Mark W Modrall)
|
||||
chris_russo@gateway.qm.apple.com (Chris Russo)
|
||||
swanson@msc.cornell.edu (Andy Swanson) (-)
|
||||
hywang@pobox.com (Hao-yang Wang)
|
||||
h+@metrowerks.com (Jon Watte)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
The Atari Team
|
||||
|
||||
gaston@cs.tu-berlin.de (Christian "Marvin" Bressler)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
The Sounds Team
|
||||
|
||||
michael.allison2@sympatico.ca (Michael Allison)
|
||||
dyer@cig.mot.com (Bill Dyer)
|
||||
keni@his.com (Ken Lorber)
|
||||
dean@natinst.com (Dean Luick)
|
||||
ronnen@rbs.org (Ronnen Miller)
|
||||
esr@snark.thyrsus.com (Eric Raymond) (+/?)
|
||||
mike.stephenson@spectrasoftware.com (Mike Stephenson)
|
||||
PaulWinner@juno.com (Paul Winner)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
The (General) Windows Team
|
||||
|
||||
michael.allison2@sympatico.ca (Michael Allison)
|
||||
d.cohrs@computer.org (David Cohrs)
|
||||
sapiri@inter.net.il (Yitzhak Sapir)
|
||||
Kevin@smolkowski.com (Kevin Smolkowski)
|
||||
hywang@pobox.com (Hao-yang Wang)
|
||||
h+@metrowerks.com (Jon Watte)
|
||||
PaulWinner@juno.com (Paul Winner)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
The X Team
|
||||
|
||||
d.cohrs@computer.org (David Cohrs)
|
||||
warwick@trolltech.com (Warwick Allison)
|
||||
jccollet@eng.sun.com (Jessie Collet)
|
||||
kevin@rotag.mi.org (Kevin Darcy)
|
||||
dyer@cig.mot.com (Bill Dyer)
|
||||
helge.hafting@c2i.net (Helge Hafting)
|
||||
keni@his.com (Ken Lorber)
|
||||
dean@natinst.com (Dean Luick)
|
||||
ronnen@rbs.org (Ronnen Miller)
|
||||
nethack.rankin@eql.caltech.edu (Pat Rankin)
|
||||
mike.stephenson@spectrasoftware.com (Mike Stephenson)
|
||||
stevev@efn.org (Steve VanDevender)
|
||||
h+@metrowerks.com (Jon Watte)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
PC Window Group
|
||||
|
||||
michael.allison2@sympatico.ca (Michael Allison)
|
||||
dyer@cig.mot.com (Bill Dyer)
|
||||
mikey@binkley.cs.mcgill.ca (Mike Gallop)
|
||||
johnkal@microsoft.com (John Kallen) (-)
|
||||
mike.stephenson@spectrasoftware.com (Mike Stephenson)
|
||||
d.cohrs@computer.org (David Cohrs)
|
||||
jwalz@radix.net (Janet Walz)
|
||||
|
||||
Beta Testers
|
||||
|
||||
mathetes@tig.com.au (Bruce Cox)
|
||||
damerell@chiark.greenend.org.uk (David Damerell)
|
||||
michaelfeir@csi.com (Michael Feir)
|
||||
shift3@alltel.net (Adam Aronow, alias Nick Number)
|
||||
psmith@spod-central.org (Dylan O'Donnell)
|
||||
raisse@rempt.xs4all.nl (Irina Rempt-Drijfhout)
|
||||
kroisos@win.tue.nl (Boudewijn Waijers)
|
||||
nethack@gmx.de (Sascha Wostmann)
|
||||
|
||||
237
doc/mythos.doc
237
doc/mythos.doc
@@ -1,237 +0,0 @@
|
||||
SCCS Id: @(#)mythos.doc 3.3 2000/07/25
|
||||
|
||||
|
||||
Part I General Mythos
|
||||
|
||||
"Gehennom" (Gehenna) is a contraction of "Gei-ben-hinnom" (the valley of
|
||||
the son of Hinnom). It is a name of a small, deep, and dark valley south-
|
||||
east of ancient Jerusalem. In the pre-Hebraic era, that valley was the
|
||||
center for the worship of Moloch, who demanded that children be sacrificed
|
||||
to him. It was (and still is) considered a fearful, dreadful place, where
|
||||
suffering souls of dead people roam and seek revenge. Gehennom was consid-
|
||||
ered the place where a hidden port to the Under World exists. Through that
|
||||
port, demons, devils, and other servants of evil gods emerge sometimes to
|
||||
do havoc among the living.
|
||||
|
||||
Part II Quests Mythos
|
||||
|
||||
Archeologist
|
||||
|
||||
Leader: Lord Carnarvon
|
||||
(co-discoverer of Tutankhamen's tomb)
|
||||
Home: College of Archeology
|
||||
Nemesis: Minion of Huhetotl
|
||||
Goal: Tomb of the Toltec Kings
|
||||
Artifact: Orb of Detection
|
||||
Background:
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Barbarian
|
||||
|
||||
Leader: Pelias
|
||||
Home: Camp of the Duali Tribe
|
||||
Nemesis: Thoth Amon
|
||||
Goal: Duali Oasis
|
||||
Artifact: Heart of Ahriman
|
||||
Background: Conan the Barbarian series
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Caveman
|
||||
|
||||
Leader: Shaman Karnov
|
||||
Home: Caves of the Ancestors
|
||||
Nemesis: Chromatic Dragon
|
||||
Goal: Dragon's Lair
|
||||
Artifact: Sceptre of Might
|
||||
Background:
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Elf (retired in 3.3.0)
|
||||
|
||||
Leader: Earendil/Elwing
|
||||
Home: Great Circle of Earendil/Elwing
|
||||
Nemesis: Goblin King
|
||||
Goal: Goblins' Cave
|
||||
Artifact: Palantir of Westernesse
|
||||
Background: Loosely based on Tolkien, particularly pre-Third Age
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Healer
|
||||
Leader: Hippocrates
|
||||
Home: Temple of Epidaurus
|
||||
The temple of Epidaurus was the largest and most well known
|
||||
temple built by the cult of Aesculapius
|
||||
Nemesis: Cyclops
|
||||
Goal: Temple of Coeus
|
||||
Artifact: Staff of Aesculapius
|
||||
Background: Based on the greek mythology surrounding Aesculapius
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Knight
|
||||
Leader: King Arthur
|
||||
Home: Camelot Castle
|
||||
Nemesis: Ixoth
|
||||
Goal: Isle of Glass
|
||||
Artifact: Magic Mirror of Merlin
|
||||
Background: Legend of King Arthur
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Monk (added in 3.3.0)
|
||||
Leader: the Grand Master
|
||||
Home: the Monastery of Chan-Sune
|
||||
Nemesis: Master Kaen
|
||||
Goal: the Monastery of the Earth-Lord
|
||||
Artifact: Eyes of the Overworld
|
||||
Background: Militant Chinese cleric (Wu-dang Taoist, Shao-lin Buddhist)
|
||||
General: martial arts, enlightenment, vegetarianism
|
||||
Ranks:
|
||||
|
||||
Priest
|
||||
Leader: Arch Priest
|
||||
Home: Great Temple
|
||||
Nemesis: Nalzok
|
||||
Goal: Temple of Nalzok
|
||||
Artifact: Mitre of Holiness
|
||||
Background: As of 3.3.0, more of a Western-style cleric
|
||||
General: holy water, undead turning
|
||||
Ranks:
|
||||
|
||||
Ranger (replaced Elf in 3.3.0)
|
||||
Leader: Orion
|
||||
Home: Orion's camp
|
||||
Nemesis: Scorpius
|
||||
Goal: the cave of the wumpus
|
||||
Artifact: Longbow of Diana
|
||||
Background: Roman version of Orion/Sirius/Scorpius myth
|
||||
General: Locate level is in honor to the "wumpus" game
|
||||
Ranks:
|
||||
|
||||
Rogue
|
||||
Leader: Master of Thieves
|
||||
Home: Thieves' Guild Hall
|
||||
Nemesis: Master Assassin
|
||||
Goal: Assassins' Guild Hall
|
||||
Artifact: Master Key of Thievery
|
||||
Background: Fritz Leiber's Fafhrd and the Gray Mouser series of books
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Samurai
|
||||
Leader: Lord Sato
|
||||
Home: Castle of the Taro Clan
|
||||
Nemesis: Ashikaga Takauji
|
||||
Goal: Shogun's Castle
|
||||
Artifact: Tsurugi of Muramasa
|
||||
Background: Shogun. The Forty-Seven Ronin. The Crysanthemum and The
|
||||
Sword, by Ruth Benedict. Mirror, Sword and Jewel, by Kurt
|
||||
Singer.
|
||||
General: The player is referred to as player_name-san ('san' being an
|
||||
honorable title), once he has completed the quest, or obtained
|
||||
the artifact the reference changes to player_name-sama. 'Sama'
|
||||
is the title for Lord.
|
||||
Ranks: Hatamoto. "Banner Knights". "They were originally personal
|
||||
body guards to a military commander, but after completing
|
||||
their service they became samurai."
|
||||
Ronin. Samurai without alliegance to a daimyo, exiled or
|
||||
renegades.
|
||||
Ninja. Secretive society of samurai trained in killing arts.
|
||||
Joshu. A samurai who headed a castle.
|
||||
Ryoshu. A samurai who headed a small piece of territory.
|
||||
Kokushu. A samurai who headed a province-sized area.
|
||||
Daimyo. A samurai lord.
|
||||
Kuge. Nobles of the imperial court, they held presedence over
|
||||
the daimyos at court.
|
||||
Shogun. The reigning samurai "king".
|
||||
|
||||
Tourist
|
||||
Leader: Twoflower
|
||||
Home: Traveller's Aid Office
|
||||
Nemesis: Master of Thieves
|
||||
Goal: Thieves' Guild Hall
|
||||
Artifact: Yendorian Express Card
|
||||
Background: Terry Pratchett's Discworld series of books
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Valkyrie
|
||||
Leader: the Norn
|
||||
Home: Shrine of Destiny
|
||||
Nemesis: Lord Surtur
|
||||
Goal: Cave of Surtur
|
||||
Artifact: Orb of Fate
|
||||
Background: Norse mythology
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Wizard
|
||||
Leader: Neferet the Green
|
||||
Home: The Lonely Tower
|
||||
Nemesis: Dark One
|
||||
Goal: Tower of Darkness
|
||||
Artifact: Eye of the Aethiopica
|
||||
Background:
|
||||
General:
|
||||
Ranks:
|
||||
|
||||
Part III Game Objects (not described in data.base)
|
||||
|
||||
Maud and the DUAM XNAHT scroll. Maud was the suggestor of the intro-
|
||||
duction of amnesia into the game.
|
||||
|
||||
Part IV Artifacts (not described in data.base or artilist.h)
|
||||
Excalibur King Arthur's sword
|
||||
Stormbringer Michael Moorcock's Elric saga
|
||||
Mjollnir Thor's hammer (Norse mythology)
|
||||
Orcrist, Sting Tolkien
|
||||
Magicbane loosely based on the magic knife "Carnwennan"
|
||||
in "The Coming of the King" by Nikolai Tolstoy
|
||||
Grayswandir Corwin's sword in Roger Zelazny's Amber saga
|
||||
touchstones A touchstone in real life was historically used
|
||||
to judge the quality of a supposed sample of gold.
|
||||
Different purities of gold rubbed on a stone leave
|
||||
different colors/intensities streak. The term
|
||||
"touchstone" is still in use by analogy for something
|
||||
that helps you judge the value of a thing.
|
||||
The basic operation is this: a touchstone is a kind
|
||||
of Gem that can be applied. Applying the touchstone
|
||||
means choosing an item to rub on the stone. If the
|
||||
chosen item is a gem, glass will "make scratch marks"
|
||||
while real gems will leave colored streaks based on
|
||||
their type. Rings can be rubbed, and they also leave
|
||||
the appropriate streaks. This could help people know
|
||||
what gems leave what streaks: a diamond ring leaves
|
||||
white streaks, and a white gem that leaves white streaks
|
||||
is either a diamond or a dilithium crystal, while a white
|
||||
glass "gem" just scratches. Gold rubbed leaves gold
|
||||
streaks. Anything else just says "scritch, scritch".
|
||||
Blessed touchstones definitively identify rubbed gems,
|
||||
and otherwise act the same. Archeologists are always
|
||||
equipped with a blessed touchstone, so they continue to
|
||||
have the same ability as before 3.3.2.
|
||||
|
||||
|
||||
|
||||
Part V Game Monsters (not described in data.base)
|
||||
|
||||
Part VI Miscellaneous Knowledge
|
||||
|
||||
Elbereth is the Star-Queen of the elves of Middle Earth.
|
||||
-----
|
||||
"Lasciate ogni speranza voi ch'entrate" is italian for 'All hope abandon, ye
|
||||
who enter here'.
|
||||
-----
|
||||
"The throne vanishes in a puff of logic." analogy comes from Douglas Adams'
|
||||
Hitchikers Guide to the Galaxy:
|
||||
|
||||
"But," says man, "the Babel fish is a dead giveaway, isn't it? It could
|
||||
not have evolved by chance. It proves you exist, and so therefore, by your
|
||||
own argument, you don't. QED."
|
||||
"Oh dear," says God, "I hadn't thought of that," and promptly vanishes in
|
||||
a puff of logic.
|
||||
-----
|
||||
1106
doc/style.doc
1106
doc/style.doc
File diff suppressed because it is too large
Load Diff
@@ -1,57 +0,0 @@
|
||||
#!/bin/sh
|
||||
# wrap up "development" files using the same method as for the official
|
||||
# distribution files
|
||||
|
||||
douu=0
|
||||
|
||||
COMPRESS=compress
|
||||
TZINT=taz
|
||||
TZEXT=tar.Z
|
||||
TZUEXT=tzu
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case X$1 in
|
||||
X-x) echo "usage $0 [-u|-gz|-x]"
|
||||
echo "-u uuencode output."
|
||||
echo "-gz use gzip as compress utility (default, compress)."
|
||||
echo "-x display this text."
|
||||
exit ;;
|
||||
X-u) douu=1 ;;
|
||||
X-gz) COMPRESS=gzip
|
||||
TZINT=tgz
|
||||
TZEXT=tar.gz
|
||||
TZUEXT=tgu ;;
|
||||
X*) echo "usage $0 [-u|-gz|-x]" ; exit ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
PACKDIR=packages
|
||||
|
||||
if [ ! -d ${PACKDIR} ]
|
||||
then
|
||||
mkdir ${PACKDIR}
|
||||
fi
|
||||
|
||||
# wrap up files from top directory
|
||||
DEV1="doc/archives doc/direct.tre doc/fixes31.1 doc/fixes31.2 doc/fixes31.3 doc/fixes32.0 doc/fixes32.1 doc/fixes32.2 doc/fixes33.0 doc/lists"
|
||||
DEV2="doc/mythos.doc doc/style.doc util/heaputil.c sys/msdos/viewtib.c sys/msdos/def2mak.c"
|
||||
DEV3="sys/msdos/compwarn.lst sys/msdos/genschem.l sys/msdos/prebuild.mak sys/msdos/schema1 sys/msdos/schema2 sys/msdos/schema3 sys/msdos/template.mak"
|
||||
DEV4="doc/buglist sys/share/flexhack.skl sys/amiga/amibug sys/amiga/ship/README.shp sys/amiga/ship/cmove sys/amiga/ship/makescript sys/amiga/ship/metareadme sys/amiga/ship/mkdz.awk sys/amiga/ship/mkfd.awk sys/amiga/ship/shiplist sys/amiga/ship/strip"
|
||||
|
||||
( tar cvf dev1.tar $DEV1 ; tar cvf dev2.tar $DEV2 )
|
||||
( tar cvf dev3.tar $DEV3 ; tar cvf dev4.tar $DEV4 )
|
||||
for i in dev1 dev2 dev3 dev4
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
cp scripts/pack.sh scripts/unpack.sh ${PACKDIR}
|
||||
cp scripts/msunpack.bat scripts/vmsunpack.com ${PACKDIR}
|
||||
@@ -1,440 +0,0 @@
|
||||
@echo off
|
||||
REM MSDOS, Windows NT NetHack distribution unpacking routine 96/03/28
|
||||
|
||||
REM ***************************************
|
||||
REM * Housekeeping Section. DO NOT MODIFY *
|
||||
REM ***************************************
|
||||
REM This is just housekeeping, to prevent clobbering environment
|
||||
REM variables already in use on system. Skip to the "Modify" section.
|
||||
REM
|
||||
set _O1=%_arch%
|
||||
set _O2=%uncompress%
|
||||
set _O3=%untar%
|
||||
set _O4=%uudecode%
|
||||
set _O5=%newdirmsg%
|
||||
set _O6=%topdirmsg%
|
||||
set _O7=%blankline%
|
||||
set _O8=%F%
|
||||
set _O9=%E%
|
||||
set _OA=%compress%
|
||||
set _OB=%unixcomp%
|
||||
|
||||
REM ***********************************
|
||||
REM * Modify this section as required *
|
||||
REM ***********************************
|
||||
REM Location of distribution (change as necessary or overide with param 1)
|
||||
set _arch=\nhdev\320\arch
|
||||
if NOT "%1"=="" set _arch=%1
|
||||
if NOT exist %_arch%\*.* goto invalid
|
||||
|
||||
REM Note that output is a new tree beginning with your current directory
|
||||
|
||||
REM Utilities (change as necessary)
|
||||
set untar=tar -xvf
|
||||
set uncompress=comp16 -d -v
|
||||
set compress=comp16 -v
|
||||
set uudecode=uudecode
|
||||
|
||||
REM If your Unix-compatible decompressor changes the .taz to another extension
|
||||
REM such as dropping the z, please specify the resulting extension here
|
||||
set E=ta
|
||||
|
||||
REM The final step of this procedure can recompress the .tar files if you wish.
|
||||
REM If you would prefer not to do this unix-style file-by-file compression,
|
||||
REM perhaps because you would rather use a .zip utility to recompress the
|
||||
REM files yourself, or because you have ample disk space and would rather
|
||||
REM not devote your machine's time to recompressing the files,
|
||||
REM leave the REM in front of the "set unixcomp=Y" line below.
|
||||
REM Remove the REM from the statement to perform the unix-style compression.
|
||||
|
||||
REM set unixcomp=Y
|
||||
|
||||
REM Some short-forms
|
||||
set topdirmsg=echo Returning to top directory
|
||||
set newdirmsg=echo Entering directory
|
||||
set blankline=echo.
|
||||
|
||||
REM *************************************************
|
||||
REM * Nothing below here should need to be changed *
|
||||
REM *************************************************
|
||||
|
||||
REM * Make required subdirectory trees *
|
||||
if not exist sys\nul mkdir sys
|
||||
if not exist win\nul mkdir win
|
||||
|
||||
REM * top *
|
||||
%blankline%
|
||||
echo Entering Top directory
|
||||
set F=%_arch%\top
|
||||
if not exist %F%.* goto endtop
|
||||
if exist %F%.taz %uncompress% %F%.taz
|
||||
if exist %F%.%E% ren %F%.%E% *.tar
|
||||
if exist %F%.tar %untar% %F%.tar
|
||||
%blankline%
|
||||
:endtop
|
||||
|
||||
REM * src *
|
||||
set F=%_arch%\src
|
||||
if not exist %F%*.* goto endsrc
|
||||
if not exist src\nul mkdir src
|
||||
%newdirmsg% src
|
||||
chdir src
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..
|
||||
:endsrc
|
||||
|
||||
REM * util *
|
||||
set F=%_arch%\util
|
||||
if not exist %F%*.* goto endutil
|
||||
if not exist util\nul mkdir util
|
||||
%newdirmsg% util
|
||||
chdir util
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..
|
||||
:endutil
|
||||
|
||||
REM * doc *
|
||||
set F=%_arch%\doc
|
||||
if not exist %F%*.* goto enddoc
|
||||
if not exist doc\nul mkdir doc
|
||||
%newdirmsg% doc
|
||||
chdir doc
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..
|
||||
:enddoc
|
||||
|
||||
REM * dat *
|
||||
set F=%_arch%\dat
|
||||
if not exist %F%*.* goto enddat
|
||||
if not exist dat\nul mkdir dat
|
||||
%newdirmsg% dat
|
||||
chdir dat
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..
|
||||
:enddat
|
||||
|
||||
REM * include *
|
||||
set F=%_arch%\incl
|
||||
if not exist %F%*.* goto endincl
|
||||
if not exist include\nul mkdir include
|
||||
%newdirmsg% include
|
||||
chdir include
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..
|
||||
:endincl
|
||||
|
||||
REM ** Windows NT system **
|
||||
set F=%_arch%\nt_sys
|
||||
if not exist %F%*.* goto endnt
|
||||
if not exist sys\winnt\nul mkdir sys\winnt
|
||||
%newdirmsg% sys\winnt
|
||||
chdir sys\winnt
|
||||
if exist %F%.taz %uncompress% %F%.taz
|
||||
if exist %F%.%E% ren %F%.%E% *.tar
|
||||
if exist %F%.tar %untar% %F%.tar
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endnt
|
||||
|
||||
REM * Shared system **
|
||||
set F=%_arch%\shr_sys
|
||||
if not exist %_arch%\shr_sys*.* goto endshr
|
||||
if not exist sys\share\nul mkdir sys\share
|
||||
%newdirmsg% sys\share
|
||||
chdir sys\share
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endshr
|
||||
|
||||
REM * termcap **
|
||||
set F=%_arch%\shr_tc
|
||||
if not exist %F%.uu goto endtc
|
||||
if not exist sys\share\nul mkdir sys\share
|
||||
%newdirmsg% sys\share
|
||||
chdir sys\share
|
||||
if exist termcap.zip del termcap.zip
|
||||
if exist %F%.uu %uudecode% %F%.uu
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endtc
|
||||
|
||||
REM * Shared sound *
|
||||
set F=%_arch%\sound
|
||||
if not exist %F%*.* goto endsnd
|
||||
if not exist sys\share\sound\nul mkdir sys\share\sound
|
||||
%newdirmsg% sys\share\sound
|
||||
chdir sys\share\sound
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..\..
|
||||
:endsnd
|
||||
|
||||
REM ** Amiga *
|
||||
set F=%_arch%\amiga
|
||||
if not exist %F%*.* goto endamiga
|
||||
if not exist sys\amiga\nul mkdir sys\amiga
|
||||
if not exist sys\amiga\splitter\nul mkdir sys\amiga\splitter
|
||||
%newdirmsg% sys\amiga
|
||||
chdir sys\amiga
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%newdirmsg% sys\amiga\splitter
|
||||
chdir splitter
|
||||
set F=%_arch%\ami_spl
|
||||
if exist %F%.taz %uncompress% %F%.taz
|
||||
if exist %F%.%E% ren %F%.%E% *.tar
|
||||
if exist %F%.tar %untar% %F%.tar
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..\..
|
||||
:endamiga
|
||||
|
||||
REM ** Atari *
|
||||
set F=%_arch%\atari
|
||||
if not exist %F%*.* goto endatari
|
||||
if not exist sys\atari\nul mkdir sys\atari
|
||||
%newdirmsg% sys\atari
|
||||
chdir sys\atari
|
||||
if exist %F%.taz %uncompress% %F%.taz
|
||||
if exist %F%.%E% ren %F%.%E% *.tar
|
||||
if exist %F%.tar %untar% %F%.tar
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endatari
|
||||
|
||||
REM ** Be OS *
|
||||
set F=%_arch%\be
|
||||
if not exist %F%*.* goto endbe
|
||||
if not exist sys\be\nul mkdir sys\be
|
||||
%newdirmsg% sys\be
|
||||
chdir sys\be
|
||||
if exist %F%.taz %uncompress% %F%.taz
|
||||
if exist %F%.%E% ren %F%.%E% *.tar
|
||||
if exist %F%.tar %untar% %F%.tar
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endbe
|
||||
|
||||
REM * mac *
|
||||
set F=%_arch%\mac
|
||||
if not exist %F%*.* goto endmac
|
||||
if not exist sys\mac\nul mkdir sys\mac
|
||||
if not exist sys\mac\old\nul mkdir sys\mac\old
|
||||
%newdirmsg% sys\mac
|
||||
chdir sys\mac
|
||||
if exist %F%?.taz for %%N in (%F%?.taz) do %uncompress% %%N
|
||||
if exist %F%?.%E% ren %F%?.%E% *.tar
|
||||
if exist %F%?.tar for %%N in (%F%?.tar) do %untar% %%N
|
||||
%newdirmsg% sys\mac\old
|
||||
chdir old
|
||||
set F=%_arch%\macold
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..\..
|
||||
:endmac
|
||||
|
||||
REM ** msdos *
|
||||
set F=%_arch%\msdos
|
||||
if not exist %F%*.* goto endmsdos
|
||||
if not exist sys\msdos\nul mkdir sys\msdos
|
||||
if not exist sys\msdos\old\nul mkdir sys\msdos\old
|
||||
%newdirmsg% sys\msdos
|
||||
chdir sys\msdos
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%newdirmsg% sys\msdos\old
|
||||
chdir old
|
||||
set F=%_arch%\msold
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..\..
|
||||
:endmsdos
|
||||
|
||||
REM * OS/2 *
|
||||
set F=%_arch%\os2
|
||||
if not exist %F%*.* goto endos2
|
||||
if not exist sys\os2\nul mkdir sys\os2
|
||||
%newdirmsg% sys\os2
|
||||
chdir sys\os2
|
||||
if exist %F%.taz %uncompress% %F%.taz
|
||||
if exist %F%.%E% ren %F%.%E% *.tar
|
||||
if exist %F%.tar %untar% %F%.tar
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endos2
|
||||
|
||||
REM * Unix *
|
||||
set F=%_arch%\unix
|
||||
if not exist %F%*.* goto endunix
|
||||
if not exist sys\unix\nul mkdir sys\unix
|
||||
%newdirmsg% sys\unix
|
||||
chdir sys\unix
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endunix
|
||||
|
||||
REM * VMS *
|
||||
set F=%_arch%\vms
|
||||
if not exist %F%*.* goto endvms
|
||||
if not exist sys\vms\nul mkdir sys\vms
|
||||
%newdirmsg% sys\vms
|
||||
chdir sys\vms
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
copy %_arch%\vmsunp*.com
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endvms
|
||||
|
||||
REM * TTY Window port *
|
||||
set F=%_arch%\tty
|
||||
if not exist %F%*.* goto endtty
|
||||
if not exist win\tty\nul mkdir win\tty
|
||||
%newdirmsg% win\tty
|
||||
chdir win\tty
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endtty
|
||||
|
||||
REM * win32 *
|
||||
set F=%_arch%\nt_win
|
||||
if not exist %F%.* goto endwin32
|
||||
if not exist win\win32\nul mkdir win\win32
|
||||
%newdirmsg% win\win32
|
||||
chdir win\win32
|
||||
if exist %F%.taz %uncompress% %F%.taz
|
||||
if exist %F%.%E% ren %F%.%E% *.tar
|
||||
if exist %F%.tar %untar% %F%.tar
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endwin32
|
||||
|
||||
REM ** shared window stuff *
|
||||
set F=%_arch%\shr_win
|
||||
if not exist %F%*.* goto endwshr
|
||||
if not exist win\share\nul mkdir win\share
|
||||
%newdirmsg% win\share
|
||||
chdir win\share
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endwshr
|
||||
|
||||
REM * X11 *
|
||||
set F=%_arch%\x11
|
||||
if not exist %F%*.* goto endx11
|
||||
if not exist win\x11\nul mkdir win\x11
|
||||
%newdirmsg% win\x11
|
||||
chdir win\x11
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
%topdirmsg%
|
||||
%blankline%
|
||||
chdir ..\..
|
||||
:endx11
|
||||
|
||||
REM * dev *
|
||||
set F=%_arch%\dev
|
||||
if not exist %F%*.* goto enddev
|
||||
if exist %F%*.taz for %%N in (%F%*.taz) do %uncompress% %%N
|
||||
if exist %F%*.%E% ren %F%*.%E% *.tar
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %untar% %%N
|
||||
:enddev
|
||||
|
||||
:comp
|
||||
if "%unixcomp%"=="" goto endcomp
|
||||
echo Recompressing the tar files to save disk space.
|
||||
set F=%_arch%\
|
||||
if not exist %F%*.tar goto endcomp
|
||||
if exist %F%*.tar for %%N in (%F%*.tar) do %compress% %%N
|
||||
%blankline%
|
||||
:endcomp
|
||||
|
||||
echo Unpacking of NetHack completed.
|
||||
|
||||
goto done
|
||||
|
||||
:invalid
|
||||
echo The directory you specified as containing a NetHack distribution
|
||||
echo did not exist or was invalid. This procedure was looking for files
|
||||
echo %_arch%\*.*
|
||||
|
||||
:done
|
||||
set _arch=%_O1%
|
||||
set uncompress=%_O2%
|
||||
set untar=%_O3%
|
||||
set uudecode=%_O4%
|
||||
set newdirmsg=%_O5%
|
||||
set topdirmsg=%_O6%
|
||||
set blankline=%_O7%
|
||||
set F=%_O8%
|
||||
set E=%_O9%
|
||||
set compress=%_OA%
|
||||
set unixcomp=%_OB%
|
||||
set _O1=
|
||||
set _O2=
|
||||
set _O3=
|
||||
set _O4=
|
||||
set _O5=
|
||||
set _O6=
|
||||
set _O7=
|
||||
set _O8=
|
||||
set _O9=
|
||||
set _OA=
|
||||
set _OB=
|
||||
|
||||
509
scripts/pack.sh
509
scripts/pack.sh
@@ -1,509 +0,0 @@
|
||||
#! /bin/sh
|
||||
# package up all the files in an official NetHack source distribution (for
|
||||
# all supported ports) into a number of foo.tzu files (archive names
|
||||
# representable on all systems that may want to handle them), which should
|
||||
# all be under 60K and contain only ASCII characters so they can be safely
|
||||
# mailed
|
||||
|
||||
# a few large files get individual handling since they can't be combined with
|
||||
# others in a 60K package
|
||||
|
||||
# this script should be run from the top directory of a distribution, and
|
||||
# all the packed files will appear in the subdirectory PACKDIR
|
||||
|
||||
# to unpack foo1.tzu by hand,
|
||||
# move foo1.tzu into the appropriate directory
|
||||
# uudecode foo1.tzu
|
||||
# mv foo1.taz foo1.tar.Z
|
||||
# uncompress foo1.tar
|
||||
# tar xvf foo1.tar
|
||||
# rm foo1.tzu foo1.tar
|
||||
|
||||
douu=0
|
||||
|
||||
COMPRESS=compress
|
||||
TZINT=taz
|
||||
TZEXT=tar.Z
|
||||
TZUEXT=tzu
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case X$1 in
|
||||
X-x) echo "usage $0 [-u|-gz|-x]"
|
||||
echo "-u uuencode output."
|
||||
echo "-gz use gzip as compress utility (default, compress)."
|
||||
echo "-x display this text."
|
||||
exit ;;
|
||||
X-u) douu=1 ;;
|
||||
X-gz) COMPRESS=gzip
|
||||
TZINT=tgz
|
||||
TZEXT=tar.gz
|
||||
TZUEXT=tgu ;;
|
||||
X*) echo "usage $0 [-u|-gz|-x]" ; exit ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
PACKDIR=packages
|
||||
|
||||
if [ ! -d ${PACKDIR} ]
|
||||
then
|
||||
mkdir ${PACKDIR}
|
||||
fi
|
||||
|
||||
# wrap up files from top directory
|
||||
TOP="Files Porting README"
|
||||
tar cvf top.tar $TOP
|
||||
for i in top
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up data files
|
||||
DAT1="cmdhelp dungeon.def help hh history license opthelp wizhelp rumors.fal rumors.tru"
|
||||
DAT2="Arch.des Barb.des Caveman.des Elf.des Healer.des Knight.des Priest.des Rogue.des Samurai.des Tourist.des Valkyrie.des Wizard.des"
|
||||
DAT3="bigroom.des castle.des endgame.des gehennom.des knox.des medusa.des mines.des oracle.des tower.des yendor.des"
|
||||
DAT4="oracles.txt quest.txt"
|
||||
DAT5="data.base"
|
||||
( cd dat ; tar cvf ../dat1.tar $DAT1 ; tar cvf ../dat2.tar $DAT2 )
|
||||
( cd dat ; tar cvf ../dat3.tar $DAT3 ; tar cvf ../dat4.tar $DAT4 )
|
||||
( cd dat ; tar cvf ../dat5.tar $DAT5 )
|
||||
for i in dat1 dat2 dat3 dat4 dat5
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
#wrap up doc files
|
||||
DOC1="Guidebook.txt"
|
||||
DOC2="Guidebook.mn"
|
||||
DOC3="Guidebook.tex"
|
||||
DOC4="dlb.6 dlb.txt dgn_comp.6 dgn_comp.txt lev_comp.6 lev_comp.txt nethack.6 nethack.txt recover.6 recover.txt"
|
||||
DOC5="tmac.n window.doc"
|
||||
( cd doc ; tar cvf ../doc1.tar $DOC1 ; tar cvf ../doc2.tar $DOC2 )
|
||||
( cd doc ; tar cvf ../doc3.tar $DOC3 ; tar cvf ../doc4.tar $DOC4 )
|
||||
( cd doc ; tar cvf ../doc5.tar $DOC5 )
|
||||
for i in doc1 doc2 doc3 doc4 doc5
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up include files
|
||||
INCL1="align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h config.h coord.h decl.h def_os2.h dgn_file.h display.h dlb.h dungeon.h edog.h emin.h engrave.h epri.h"
|
||||
INCL2="eshk.h flag.h func_tab.h global.h extern.h hack.h lev.h macwin.h macconf.h"
|
||||
INCL3="mactty.h mail.h mfndpos.h micro.h mkroom.h monattk.h mondata.h monflag.h monst.h monsym.h mttypriv.h nhlan.h ntconf.h obj.h objclass.h os2conf.h patchlevel.h"
|
||||
INCL4="pcconf.h permonst.h prop.h qtext.h quest.h rect.h rm.h sp_lev.h spell.h system.h tcap.h tile2x11.h timeout.h tosconf.h tradstdc.h trampoli.h"
|
||||
INCL5="trap.h unixconf.h vault.h vision.h vmsconf.h winX.h winami.h winprocs.h wintty.h wintype.h xwindow.h xwindowp.h you.h youprop.h"
|
||||
( cd include ; tar cvf ../incl1.tar $INCL1 ; tar cvf ../incl2.tar $INCL2 )
|
||||
( cd include ; tar cvf ../incl3.tar $INCL3 ; tar cvf ../incl4.tar $INCL4 )
|
||||
( cd include ; tar cvf ../incl5.tar $INCL5 )
|
||||
for i in incl1 incl2 incl3 incl4 incl5
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up source files
|
||||
SRC01="allmain.c alloc.c apply.c bones.c"
|
||||
SRC02="artifact.c attrib.c ball.c botl.c"
|
||||
SRC03="cmd.c dbridge.c decl.c dlb.c"
|
||||
SRC04="detect.c display.c"
|
||||
SRC05="dig.c dog.c do_name.c"
|
||||
SRC06="do_wear.c do.c"
|
||||
SRC07="dogmove.c dokick.c drawing.c"
|
||||
SRC08="dothrow.c dungeon.c extralev.c"
|
||||
SRC09="eat.c end.c exper.c"
|
||||
SRC10="engrave.c explode.c files.c"
|
||||
SRC11="fountain.c hack.c hacklib.c light.c"
|
||||
SRC12="invent.c lock.c"
|
||||
SRC13="mail.c mhitm.c mkmaze.c"
|
||||
SRC14="mcastu.c mhitu.c minion.c mkmap.c"
|
||||
SRC15="makemon.c mkobj.c"
|
||||
SRC16="monst.c o_init.c"
|
||||
SRC17="mkroom.c mon.c mplayer.c"
|
||||
SRC18="monmove.c pray.c"
|
||||
SRC19="music.c options.c"
|
||||
SRC20="mondata.c mthrowu.c muse.c"
|
||||
SRC21="objnam.c polyself.c"
|
||||
SRC22="mklev.c objects.c"
|
||||
SRC23="pager.c pickup.c pline.c"
|
||||
SRC24="potion.c priest.c quest.c questpgr.c rect.c"
|
||||
SRC25="read.c restore.c rip.c rnd.c rumors.c"
|
||||
SRC26="shk.c"
|
||||
SRC27="save.c shknam.c sit.c sounds.c steal.c"
|
||||
SRC28="sp_lev.c spell.c"
|
||||
SRC29="teleport.c timeout.c track.c"
|
||||
SRC30="trap.c version.c"
|
||||
SRC31="topten.c uhitm.c write.c"
|
||||
SRC32="vault.c wield.c windows.c wizard.c"
|
||||
SRC33="u_init.c weapon.c were.c worm.c"
|
||||
SRC34="vision.c worn.c"
|
||||
SRC35="zap.c"
|
||||
( cd src ; tar cvf ../src01.tar $SRC01 ; tar cvf ../src02.tar $SRC02 )
|
||||
( cd src ; tar cvf ../src03.tar $SRC03 ; tar cvf ../src04.tar $SRC04 )
|
||||
( cd src ; tar cvf ../src05.tar $SRC05 ; tar cvf ../src06.tar $SRC06 )
|
||||
( cd src ; tar cvf ../src07.tar $SRC07 ; tar cvf ../src08.tar $SRC08 )
|
||||
( cd src ; tar cvf ../src09.tar $SRC09 ; tar cvf ../src10.tar $SRC10 )
|
||||
( cd src ; tar cvf ../src11.tar $SRC11 ; tar cvf ../src12.tar $SRC12 )
|
||||
( cd src ; tar cvf ../src13.tar $SRC13 ; tar cvf ../src14.tar $SRC14 )
|
||||
( cd src ; tar cvf ../src15.tar $SRC15 ; tar cvf ../src16.tar $SRC16 )
|
||||
( cd src ; tar cvf ../src17.tar $SRC17 ; tar cvf ../src18.tar $SRC18 )
|
||||
( cd src ; tar cvf ../src19.tar $SRC19 ; tar cvf ../src20.tar $SRC20 )
|
||||
( cd src ; tar cvf ../src21.tar $SRC21 ; tar cvf ../src22.tar $SRC22 )
|
||||
( cd src ; tar cvf ../src23.tar $SRC23 ; tar cvf ../src24.tar $SRC24 )
|
||||
( cd src ; tar cvf ../src25.tar $SRC25 ; tar cvf ../src26.tar $SRC26 )
|
||||
( cd src ; tar cvf ../src27.tar $SRC27 ; tar cvf ../src28.tar $SRC28 )
|
||||
( cd src ; tar cvf ../src29.tar $SRC29 ; tar cvf ../src30.tar $SRC30 )
|
||||
( cd src ; tar cvf ../src31.tar $SRC31 ; tar cvf ../src32.tar $SRC32 )
|
||||
( cd src ; tar cvf ../src33.tar $SRC33 ; tar cvf ../src34.tar $SRC34 )
|
||||
( cd src ; tar cvf ../src35.tar $SRC35 )
|
||||
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
||||
do
|
||||
$COMPRESS src$i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode src$i.${TZEXT} src$i.${TZINT} >${PACKDIR}/src$i.${TZUEXT}
|
||||
rm src$i.${TZEXT}
|
||||
else
|
||||
mv src$i.${TZEXT} ${PACKDIR}/src$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up utility source files
|
||||
UTIL1="lev_comp.l lev_comp.y lev_main.c dlb_main.c"
|
||||
UTIL2="dgn_comp.l dgn_comp.y dgn_main.c makedefs.c panic.c recover.c"
|
||||
( cd util ; tar cvf ../util1.tar $UTIL1 ; tar cvf ../util2.tar $UTIL2 )
|
||||
for i in util1 util2
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up Amiga files
|
||||
AMIGA1="Build.ami Install.ami Makefile.ami NetHack.cnf mkdmake amii.hlp hackwb.hlp ifchange"
|
||||
AMIGA2="HackWB.uu NHinfo.uu NewGame.uu amifont.uu amifont8.uu ask.uu charwin.uu clipwin.uu colors.uu dflticon.uu randwin.uu scroll.uu string.uu wbwin.uu wbdefs.h wbprotos.h wbstruct.h windefs.h winext.h winproto.h"
|
||||
AMIGA3="amidos.c amilib.c amigst.c amimenu.c amirip.c amisnd.c amitty.c amiwind.c clipwin.c"
|
||||
AMIGA4="amiwbench.c winchar.c winkey.c winreq.c winstr.c"
|
||||
AMIGA5="amidos.p amiwind.p winami.p dispmap.s colorwin.c winfuncs.c"
|
||||
AMIGA6="wbcli.c wbgads.c wbwin.c"
|
||||
AMIGA7="wb.c"
|
||||
AMIGA8="grave16.xpm winmenu.c"
|
||||
AMIGA9="char.c cvtsnd.c randwin.c wbdata.c winami.c txt2iff.c xpm2iff.c"
|
||||
AMIGA10="amiout.h arg.c arg.h loader.c multi.c multi.h split.doc split.h splitter.c"
|
||||
( cd sys/amiga ; tar cvf ../../amiga1.tar $AMIGA1 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga2.tar $AMIGA2 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga3.tar $AMIGA3 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga4.tar $AMIGA4 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga5.tar $AMIGA5 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga6.tar $AMIGA6 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga7.tar $AMIGA7 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga8.tar $AMIGA8 )
|
||||
( cd sys/amiga ; tar cvf ../../amiga9.tar $AMIGA9 )
|
||||
( cd sys/amiga/splitter ; tar cvf ../../../ami_spl.tar $AMIGA10 )
|
||||
for i in amiga1 amiga2 amiga3 amiga4 amiga5 amiga6 amiga7 amiga8 amiga9 ami_spl
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up Atari files
|
||||
ATARI="Install.tos Makefile.utl atari.cnf atarifnt.uue nethack.mnu setup.g tos.c"
|
||||
( cd sys/atari ; tar cvf ../../atari.tar $ATARI )
|
||||
for i in atari
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up BeBox files
|
||||
BE="README bemain.c"
|
||||
( cd sys/be ; tar cvf ../../be.tar $BE )
|
||||
for i in be
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up Mac files
|
||||
MAC1="Files.r Install.mw MacHelp NHDeflts NHrsrc.hqx News README macmain.c"
|
||||
MAC2="dprintf.c maccurs.c macerrs.c macfile.c macsnd.c mactopl.c mactty.c macunix.c"
|
||||
MAC3="macwin.c mgetline.c mmodal.c mstring.c"
|
||||
MAC4="macmenu.c mttymain.c mrecover.c mrecover.hqx"
|
||||
MACOLD1="Install.mpw Install.thk DCproj.hqx LCproj.hqx"
|
||||
MACOLD2="MDproj.hqx NHmake.hqx NetHack.r mhdump.c mpwhack.h"
|
||||
( cd sys/mac ; tar cvf ../../mac1.tar $MAC1 ; tar cvf ../../mac2.tar $MAC2 )
|
||||
( cd sys/mac ; tar cvf ../../mac3.tar $MAC3 ; tar cvf ../../mac4.tar $MAC4 )
|
||||
( cd sys/mac/old ; tar cvf ../../../macold1.tar $MACOLD1 )
|
||||
( cd sys/mac/old ; tar cvf ../../../macold2.tar $MACOLD2 )
|
||||
for i in mac1 mac2 mac3 mac4 macold1 macold2
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
cp sys/mac/old/NHproj.hqx ${PACKDIR}/mac-proj.hqx
|
||||
cp sys/mac/NHsound.hqx ${PACKDIR}/mac-snd.hqx
|
||||
|
||||
#wrap up MSDOS files
|
||||
MS1="Install.dos Makefile.BC schema1.BC schema2.BC pckeys.c"
|
||||
MS2="Makefile.MSC setup.bat pctiles.h pcvideo.h portio.h nhico.uu nhpif.uu ovlinit.c moveinit.pat"
|
||||
MS3="msdoshlp.txt msdos.c Makefile.GCC Makefile.SC schema1.MSC schema2.MSC schema3.MSC"
|
||||
MS4="pctiles.c sound.c tile2bin.c video.c vidtxt.c vidvga.c"
|
||||
MSOLD1="README.old exesmurf.c exesmurf.doc maintovl.doc schema.old trampoli.c"
|
||||
MSOLD2="ovlmgr.asm ovlmgr.doc ovlmgr.uu"
|
||||
MSOLD3="MakeMSC.src MakeMSC.utl Makefile.dat"
|
||||
( cd sys/msdos ; tar cvf ../../msdos1.tar $MS1 ; tar cvf ../../msdos2.tar $MS2 )
|
||||
( cd sys/msdos ; tar cvf ../../msdos3.tar $MS3 ; tar cvf ../../msdos4.tar $MS4 )
|
||||
( cd sys/msdos/old ; tar cvf ../../../msold1.tar $MSOLD1 )
|
||||
( cd sys/msdos/old ; tar cvf ../../../msold2.tar $MSOLD2 )
|
||||
( cd sys/msdos/old ; tar cvf ../../../msold3.tar $MSOLD3 )
|
||||
for i in msdos1 msdos2 msdos3 msdos4 msold1 msold2 msold3
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
#wrap up OS/2 files
|
||||
OS2="Install.os2 Makefile.os2 nhpmico.uu os2.c"
|
||||
( cd sys/os2 ; tar cvf ../../os2.tar $OS2 )
|
||||
for i in os2
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
#wrap up shared system files
|
||||
SSHR1="Makefile.lib NetHack.cnf termcap ioctl.c nhlan.c pcmain.c pcsys.c pctty.c pcunix.c random.c unixtty.c"
|
||||
SSHR2="tclib.c dgn_yacc.c lev_lex.c"
|
||||
SSHR3="dgn_comp.h dgn_lex.c lev_comp.h lev_yacc.c"
|
||||
( cd sys/share ; tar cvf ../../shr_sys1.tar $SSHR1 )
|
||||
( cd sys/share ; tar cvf ../../shr_sys2.tar $SSHR2 )
|
||||
( cd sys/share ; tar cvf ../../shr_sys3.tar $SSHR3 )
|
||||
for i in shr_sys1 shr_sys2 shr_sys3
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
cp sys/share/termcap.uu ${PACKDIR}/shr_tc.uu
|
||||
|
||||
#wrap up shared sound files
|
||||
SND1="README bell.uu firehorn.uu"
|
||||
SND2="erthdrum.uu frsthorn.uu"
|
||||
SND3="bugle.uu lethdrum.uu"
|
||||
SND4="mgcflute.uu mgcharp.uu"
|
||||
SND5="toolhorn.uu wdnflute.uu wdnharp.uu"
|
||||
( cd sys/share/sounds ; tar cvf ../../../sound1.tar $SND1 )
|
||||
( cd sys/share/sounds ; tar cvf ../../../sound2.tar $SND2 )
|
||||
( cd sys/share/sounds ; tar cvf ../../../sound3.tar $SND3 )
|
||||
( cd sys/share/sounds ; tar cvf ../../../sound4.tar $SND4 )
|
||||
( cd sys/share/sounds ; tar cvf ../../../sound5.tar $SND5 )
|
||||
for i in sound1 sound2 sound3 sound4 sound5
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
#wrap up UNIX files
|
||||
UNX1="Install.unx Makefile.dat Makefile.doc Makefile.src Makefile.top Makefile.utl depend.awk nethack.sh setup.sh"
|
||||
UNX2="unixmain.c unixunix.c snd86unx.shr"
|
||||
( cd sys/unix ; tar cvf ../../unix1.tar $UNX1 ; tar cvf ../../unix2.tar $UNX2 )
|
||||
for i in unix1 unix2
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
for i in 1 2 3
|
||||
do
|
||||
cp sys/unix/cpp$i.shr ${PACKDIR}/cpp$i.shr
|
||||
done
|
||||
|
||||
# wrap up VMS files
|
||||
VMS1="Install.vms Makefile.dat Makefile.doc Makefile.src Makefile.top Makefile.utl"
|
||||
VMS2="install.com nethack.com spec_lev.com vmsbuild.com lev_lex.h"
|
||||
VMS3="oldcrtl.c vmsfiles.c vmsmail.c vmsmain.c vmsmisc.c vmstty.c vmsunix.c"
|
||||
( cd sys/vms ; tar cvf ../../vms1.tar $VMS1 ; tar cvf ../../vms2.tar $VMS2 )
|
||||
( cd sys/vms ; tar cvf ../../vms3.tar $VMS3 )
|
||||
for i in vms1 vms2 vms3
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up NT files
|
||||
NT1="Install.nt Makefile.nt mapimail.c nethack.def nhico.uu nhsetup.bat ntsound.c nttty.c win32api.h winnt.c winnt.cnf"
|
||||
( cd sys/winnt ; tar cvf ../../nt_sys.tar $NT1 )
|
||||
for i in nt_sys
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
#wrap up shared window files
|
||||
WSH1="tile.doc tile.h gifread.c ppmwrite.c thintile.c tilemap.c other.txt"
|
||||
WSH2="monsters.txt"
|
||||
WSH3="tiletext.c objects.txt"
|
||||
WSH4="mthread.h nhprocs.c"
|
||||
( cd win/share ; tar cvf ../../shr_win1.tar $WSH1 )
|
||||
( cd win/share ; tar cvf ../../shr_win2.tar $WSH2 )
|
||||
( cd win/share ; tar cvf ../../shr_win3.tar $WSH3 )
|
||||
( cd win/share ; tar cvf ../../shr_win4.tar $WSH4 )
|
||||
for i in shr_win1 shr_win2 shr_win3 shr_win4
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up tty files
|
||||
TTY1="getline.c termcap.c topl.c"
|
||||
TTY2="wintty.c"
|
||||
( cd win/tty ; tar cvf ../../tty1.tar $TTY1 ; tar cvf ../../tty2.tar $TTY2 )
|
||||
for i in tty1 tty2
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up NT Win32 files
|
||||
NTW1="mtprocs.c nhwin32.h nhwin32.rc nhwin32x.h tile2bmp.c win32msg.c winmain.c"
|
||||
( cd win/win32 ; tar cvf ../../nt_win.tar $NTW1 )
|
||||
for i in nt_win
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
|
||||
# wrap up X files
|
||||
X1="Install.X11 NetHack.ad ibm.bdf nethack.rc nh10.bdf nh32icon nh56icon nh72icon nh_icon.xpm pet_mark.xbm tile2x11.c"
|
||||
X2="Window.c dialogs.c winmesg.c winmisc.c wintext.c"
|
||||
X3="winmap.c winmenu.c winval.c"
|
||||
X4="winstat.c winX.c"
|
||||
X5="rip.xpm"
|
||||
( cd win/X11 ; tar cvf ../../x11-1.tar $X1 ; tar cvf ../../x11-2.tar $X2 )
|
||||
( cd win/X11 ; tar cvf ../../x11-3.tar $X3 ; tar cvf ../../x11-4.tar $X4 )
|
||||
( cd win/X11 ; tar cvf ../../x11-5.tar $X5 )
|
||||
for i in x11-1 x11-2 x11-3 x11-4 x11-5
|
||||
do
|
||||
$COMPRESS $i.tar
|
||||
if [ $douu -gt 0 ]
|
||||
then
|
||||
uuencode $i.${TZEXT} $i.${TZINT} >${PACKDIR}/$i.${TZUEXT}
|
||||
rm $i.${TZEXT}
|
||||
else
|
||||
mv $i.${TZEXT} ${PACKDIR}/$i.${TZINT}
|
||||
fi
|
||||
done
|
||||
@@ -1,178 +0,0 @@
|
||||
#!/bin/sh
|
||||
# unpack.sh -- UNIX shell script to unpack nethack archives
|
||||
#
|
||||
# This eliminates a lot of the tedium from snarfing a new nethack version
|
||||
# from a nethack-bugs archive site. It automatically creates appropriate
|
||||
# directories, undoes uuencoding and compression, and untars tar files.
|
||||
# When it's done running, you should have a complete clean source-tree.
|
||||
|
||||
# System V style tars need the addition of the o option here
|
||||
#
|
||||
# If you didn't change this before running the script, you at least own
|
||||
# the created directories, so you can slowly and painfully rename and copy
|
||||
# each file so that you own it (or write your own simple script to
|
||||
# automate the process). Using chown with superuser privileges is of
|
||||
# course a much quicker recovery...
|
||||
#
|
||||
TAROPTS=xvf
|
||||
# TAROPTS=xovf
|
||||
|
||||
|
||||
# Nothing below here should need to be changed.
|
||||
|
||||
DECOMPRESS="compress -d"
|
||||
TZINT=taz
|
||||
TZEXT=tar.Z
|
||||
TZUEXT=tzu
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case X$1 in
|
||||
X-x) echo "usage $0 [-gz|-x]"
|
||||
echo "-gz use gunzip as decompress utility (default, decompress)."
|
||||
echo "-x display this text."
|
||||
exit ;;
|
||||
X-gz) DECOMPRESS=gunzip
|
||||
TZINT=tgz
|
||||
TZEXT=tar.gz
|
||||
TZUEXT=tgu ;;
|
||||
X*) echo "usage $0 [-gz|-x]" ; exit ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Changes to the source set should require at most additions to ARCHIVES
|
||||
# and (possibly) additions to the case statement mapping archives to
|
||||
# subdirectory names.
|
||||
#
|
||||
ARCHIVES1="top dat1 dat2 dat3 dat4 dat5 doc1 doc2 doc3 doc4 doc5 incl1 incl2 incl3 incl4 incl5 util1 util2"
|
||||
ARCHIVES2="src01 src02 src03 src04 src05 src06 src07 src08 src09 src10 src11 src12 src13 src14 src15 src16 src17 src18 src19 src20 src21 src22 src23 src24 src25 src26 src27 src28 src29 src30 src31 src32 src33 src34 src35"
|
||||
ARCHIVES3="amiga1 amiga2 amiga3 amiga4 amiga5 amiga6 amiga7 amiga8 amiga9 ami_spl atari be mac1 mac2 mac3 mac4 macold1 macold2"
|
||||
ARCHIVES4="msdos1 msdos2 msdos3 msdos4 msold1 msold2 msold3 nt_sys os2 shr_sys1 shr_sys2 shr_sys3 sound1 sound2 sound3 sound4 sound5"
|
||||
ARCHIVES5="unix1 unix2 vms1 vms2 vms3 shr_win1 shr_win2 shr_win3 shr_win4 tty1 tty2 nt_win x11-1 x11-2 x11-3 x11-4 x11-5 dev1 dev2 dev3 dev4"
|
||||
|
||||
# unconditionally create directories we may try to create subdirectories of
|
||||
if [ ! -d sys ]
|
||||
then
|
||||
mkdir sys
|
||||
fi
|
||||
if [ ! -d sys/amiga ]
|
||||
then
|
||||
mkdir sys/amiga
|
||||
fi
|
||||
if [ ! -d sys/mac ]
|
||||
then
|
||||
mkdir sys/mac
|
||||
fi
|
||||
if [ ! -d sys/msdos ]
|
||||
then
|
||||
mkdir sys/msdos
|
||||
fi
|
||||
if [ ! -d sys/share ]
|
||||
then
|
||||
mkdir sys/share
|
||||
fi
|
||||
if [ ! -d win ]
|
||||
then
|
||||
mkdir win
|
||||
fi
|
||||
|
||||
|
||||
# look for files packaged individually
|
||||
#
|
||||
if [ -f shr_tc.uu ]
|
||||
then
|
||||
# sys/share guaranteed via subdirectory above
|
||||
mv shr_tc.uu sys/share/termcap.uu
|
||||
fi
|
||||
if [ -f mac-snd.hqx ]
|
||||
then
|
||||
mv mac-snd.hqx sys/mac/NHsound.hqx
|
||||
fi
|
||||
if [ -f mac-proj.hqx ]
|
||||
then
|
||||
if [ ! -d sys/mac/old ]
|
||||
then
|
||||
mkdir sys/mac/old
|
||||
fi
|
||||
mv mac-proj.hqx sys/mac/old/NHproj.hqx
|
||||
fi
|
||||
for i in 1 2 3
|
||||
do
|
||||
if [ -f cpp$i.shr ]
|
||||
then
|
||||
if [ ! -d sys/unix ]
|
||||
then
|
||||
mkdir sys/unix
|
||||
fi
|
||||
mv cpp$i.shr sys/unix/cpp$i.shr
|
||||
fi
|
||||
done
|
||||
|
||||
# unpack the archives
|
||||
#
|
||||
topdir=`pwd`
|
||||
|
||||
for f in $ARCHIVES1 $ARCHIVES2 $ARCHIVES3 $ARCHIVES4 $ARCHIVES5
|
||||
do
|
||||
if [ -f ${f}.${TZUEXT} ]
|
||||
then
|
||||
uudecode ${f}.${TZUEXT}; rm ${f}.${TZUEXT}
|
||||
fi
|
||||
if [ -f ${f}.${TZINT} ]
|
||||
then
|
||||
mv ${f}.${TZINT} ${f}.${TZEXT}
|
||||
$DECOMPRESS ${f}.${TZEXT}
|
||||
fi
|
||||
|
||||
if [ -f ${f}.tar ]
|
||||
then
|
||||
# Here's the part that may need hacking as we add more machines
|
||||
case $f in
|
||||
amiga*) dir=sys/amiga;;
|
||||
ami_spl*) dir=sys/amiga/splitter;;
|
||||
atari*) dir=sys/atari;;
|
||||
be*) dir=sys/be;;
|
||||
dat*) dir=dat;;
|
||||
dev*) dir=.;;
|
||||
doc*) dir=doc;;
|
||||
incl*) dir=include;;
|
||||
macold*) dir=sys/mac/old;;
|
||||
mac*) dir=sys/mac;;
|
||||
msdos*) dir=sys/msdos;;
|
||||
msold*) dir=sys/msdos/old;;
|
||||
nt_sys*) dir=sys/winnt;;
|
||||
nt_win*) dir=win/win32;;
|
||||
os2*) dir=sys/os2;;
|
||||
shr_sys*) dir=sys/share;;
|
||||
shr_win*) dir=win/share;;
|
||||
sound*) dir=sys/share/sounds;;
|
||||
src*) dir=src;;
|
||||
top*) dir=.;;
|
||||
tty*) dir=win/tty;;
|
||||
unix*) dir=sys/unix;;
|
||||
util*) dir=util;;
|
||||
vms*) dir=sys/vms;;
|
||||
x11-*) dir=win/X11;;
|
||||
esac
|
||||
|
||||
echo Unpacking $f.tar into $dir ...
|
||||
if [ ! -d $dir ]
|
||||
then
|
||||
mkdir $dir
|
||||
fi
|
||||
if [ $dir != "." ]
|
||||
then
|
||||
mv $f.tar $dir;
|
||||
cd $dir
|
||||
fi
|
||||
tar $TAROPTS $f.tar
|
||||
rm $f.tar
|
||||
if [ $dir != "." ]
|
||||
then
|
||||
cd $topdir
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Remember to run setup.sh from the sys/unix directory if you're compiling"
|
||||
echo "for UNIX."
|
||||
@@ -1,126 +0,0 @@
|
||||
$! vmsunpack.com -- unpack NetHack's *.taz or *.tzu archive packages [pr]
|
||||
$! into individual source files, creating subdirectories
|
||||
$! as needed. The current directory must hold the input
|
||||
$! packages and will become the 'top' of Nethack source tree.
|
||||
$!
|
||||
$! Site-specific setup--define appropriate commands for unpacking operations.
|
||||
$ uudecode := $rpr:uudecode
|
||||
$ !! uncompress := $rpr:lzdcmp -b
|
||||
$ uncompress := $pub:gzip -d
|
||||
$ untar := $rpr:tar2vms xv "!"
|
||||
$ tar_setup := define/user_mode TAPE
|
||||
$! [Nothing below this line should need to be changed.]
|
||||
$!
|
||||
$! Operation (make sure that all archive packages are named correctly):
|
||||
$! uudecode SOMETHING.tzu -> SOMETHING.taz
|
||||
$! uncompress SOMETHING.taz -> SOMETHING.tar
|
||||
$! tar_setup SOMETHING.tar -> preparation for poor tar2vms interface
|
||||
$! untar SOMETHING.tar -> individual files extracted from archive
|
||||
$! delete SOMETHING.tar;,SOMETHING.taz;
|
||||
$! note: original .tzu file kept; it should be deleted manually.
|
||||
$!
|
||||
$ ARCHIVES1="top dat1 dat2 dat3 dat4 dat5 doc1 doc2 doc3 doc4 doc5 incl1 "-
|
||||
+"incl2 incl3 incl4 incl5 util1 util2"
|
||||
$ ARCHIVES2="src01 src02 src03 src04 src05 src06 src07 src08 src09 src10 "-
|
||||
+"src11 src12 src13 src14 src15 src16 src17 src18 src19 src20 "-
|
||||
+"src21 src22 src23 src24 src25 src26 src27 src28 src29 src30 "-
|
||||
+"src31 src32 src33 src34 src35"
|
||||
$ ARCHIVES3="amiga1 amiga2 amiga3 amiga4 amiga5 amiga6 amiga7 amiga8 amiga9 "-
|
||||
+"ami_spl atari be mac1 mac2 mac3 mac4 macold1 macold2"
|
||||
$ ARCHIVES4="msdos1 msdos2 msdos3 msdos4 msold1 msold2 msold3 nt_sys os2 "-
|
||||
+"shr_sys1 shr_sys2 shr_sys3 sound1 sound2 sound3 sound4 sound5"
|
||||
$ ARCHIVES5="unix1 unix2 vms1 vms2 vms3 shr_win1 shr_win2 shr_win3 shr_win4 "-
|
||||
+"tty1 tty2 nt_win x11-1 x11-2 x11-3 x11-4 x11-5 dev1 dev2 dev3 dev4"
|
||||
$ all = f$edit(ARCHIVES1+" "+ARCHIVES2+" "+ARCHIVES3+" "+ARCHIVES4+" "+ARCHIVES5,"COMPRESS")
|
||||
$ kits = "top |dat |doc |incl |util |src |amiga |ami_spl|"-
|
||||
+ "atari |be |mac |macold |msdos |msold |nt_sys |os2 |"-
|
||||
+ "shr_sys|sound |unix |vms |shr_win|tty |nt_win |x11- |"-
|
||||
+ "dev |"
|
||||
$ dirs = "[],[.dat],[.doc],[.include],[.util],[.src],"-
|
||||
+ "[.sys.amiga],[.sys.amiga.splitter],[.sys.atari],[.sys.be],"-
|
||||
+ "[.sys.mac],[.sys.mac.old],[.sys.msdos],[.sys.msdos.old],"-
|
||||
+ "[.sys.winnt],[.sys.os2],[.sys.share],[.sys.share.sounds],"-
|
||||
+ "[.sys.unix],[.sys.vms],"-
|
||||
+ "[.win.share],[.win.tty],[.win.win32],[.win.X11],[]"
|
||||
$! VMS can live without these:
|
||||
$ skippable = ":amiga:ami_spl:atari:be:mac:macold:msdos:msold:nt_sys:os2:"-
|
||||
+ "sound:unix:shr_win:nt_win:x11-:dev:"
|
||||
$!
|
||||
$ if f$parse("[.sys]").eqs."" then create/dir [.sys]/log
|
||||
$ if f$parse("[.win]").eqs."" then create/dir [.win]/log
|
||||
$!
|
||||
$! First handle some miscellaneous files --what a nuisance :-(
|
||||
$ if f$search("shr_tc.uu").nes.""
|
||||
$ then if f$parse("[.sys.share]").eqs."" then create/dir [.sys.share]/log
|
||||
$ rename/new_vers shr_tc.uu [.sys.share]termcap.uu
|
||||
$ endif
|
||||
$ if f$search("mac-snd.hqx").nes.""
|
||||
$ then if f$parse("[.sys.mac]").eqs."" then create/dir [.sys.mac]/log
|
||||
$ rename/new_vers mac-snd.hqx [.sys.mac]NHsound.hqx
|
||||
$ endif
|
||||
$ if f$search("mac-proj.hqx").nes.""
|
||||
$ then if f$parse("[.sys.mac.old]").eqs."" then create/dir [.sys.mac.old]/log
|
||||
$ rename/new_vers mac-proj.hqx [.sys.mac.old]NHproj.hqx
|
||||
$ endif
|
||||
$ if f$search("cpp%.shr").nes.""
|
||||
$ then if f$parse("[.sys.unix]").eqs."" then create/dir [.sys.unix]/log
|
||||
$ rename/new_vers cpp%.shr [.sys.unix]*.*
|
||||
$ endif
|
||||
$! [note: the above files aren't needed for the VMS port.]
|
||||
$!
|
||||
$ topdir = f$directory()
|
||||
$ kitsiz = f$length(f$element(0,"|",kits))+1
|
||||
$ kits = "|" + f$edit(kits,"UPCASE")
|
||||
$ k = 0 !count of archive files skipped
|
||||
$ i = 0 !loop index for archive substring
|
||||
$loop:
|
||||
$ f = f$element(i," ",all)
|
||||
$ if f.eqs."" .or. f.eqs." " then goto done
|
||||
$ d = f - "0" - "1" - "2" - "3" - "4" - "5" - "6" - "7" - "8" - "9" -
|
||||
- "0" - "1" - "2" - "3" - "4" - "5" - "6" - "7" - "8" - "9"
|
||||
$ if d.eqs."os" then d = "os2"
|
||||
$ if f$extract(0,2,d).eqs."x-" then d = "x11-"
|
||||
$ if f$search("''f'.tar").nes."" then goto detar
|
||||
$ if f$search("''f'.taz").nes."" then goto decompress
|
||||
$ if f$search("''f'.tzu").nes."" then -
|
||||
uudecode 'f'.tzu !>'f'.taz
|
||||
$decompress:
|
||||
$ if f$search("''f'.taz").nes."" then -
|
||||
- !! uncompress 'f'.taz 'f'.tar
|
||||
uncompress 'f'.taz
|
||||
$ if f$search("''f'.tar").nes."" then goto detar
|
||||
$!
|
||||
$! an expected file wasn't found--that's OK in _some_ instances
|
||||
$ msg_fmt = "!/ Missing archive file !AS skipped.!/"
|
||||
$ if d.eqs."dev" then - !not part of the public distribution
|
||||
msg_fmt = "!/ Optional archive file !AS skipped.!/"
|
||||
$ if f$locate(":"+d+":",skippable).ge.f$length(skippable) then -
|
||||
msg_fmt = "!/% Expected archive file !AS is missing!!!/"
|
||||
$ write sys$output f$fao(msg_fmt,"''f'.tzu")
|
||||
$ k = k + 1
|
||||
$ goto skip
|
||||
$!
|
||||
$detar:
|
||||
$ p = f$locate(f$edit("|"+d,"UPCASE"),kits) / kitsiz
|
||||
$ d = f$element(p,",",dirs)
|
||||
$ set default 'd'
|
||||
$ if f$parse("[]").eqs."" then create/dir []/log
|
||||
$ write sys$output "Unpacking ''f'.tar into ''d'..."
|
||||
$ f = topdir + f
|
||||
$ tar_setup 'f'.tar !define/user TAPE 'f'.tar
|
||||
$ untar 'f'.tar !tar2vms xv
|
||||
$!
|
||||
$ if f$search("''f'.tzu").nes."" -
|
||||
.or. f$search("''f'.taz").nes."" then delete 'f'.tar;
|
||||
$ if f$search("''f'.tzu").nes."" -
|
||||
.and. f$search("''f'.taz").nes."" then delete 'f'.taz;
|
||||
$ set default 'topdir'
|
||||
$skip:
|
||||
$ i = i + 1
|
||||
$ goto loop
|
||||
$done:
|
||||
$ msg_fmt = "!/ Unpacking completed."
|
||||
$ if k.gt.0 then -
|
||||
msg_fmt = msg_fmt + " !SL archive package!%S skipped.!/"
|
||||
$ write sys$output f$fao(msg_fmt,k)
|
||||
$ exit
|
||||
@@ -1,424 +0,0 @@
|
||||
/* SCCS Id: @(#)viewtib.c 3.3 94/03/20 */
|
||||
/* Copyright (c) NetHack PC Development Team 1993, 1994 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
/*
|
||||
* View a NetHack binary tile file (.tib file)
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef __GO32__
|
||||
#include <unistd.h>
|
||||
#define _far
|
||||
#endif
|
||||
#include <dos.h>
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#pragma warning(disable:4309) /* initializing */
|
||||
#pragma warning(disable:4018) /* signed/unsigned mismatch */
|
||||
#pragma warning(disable:4131) /* old style declarator */
|
||||
#pragma warning(disable:4127) /* conditional express. is constant */
|
||||
|
||||
|
||||
#define VIDEO_BIOS 0x10
|
||||
#define DOSCALL 0x21
|
||||
|
||||
#define USHORT unsigned short
|
||||
#define MODE640x480 0x0012 /* Switch to VGA 640 x 480 Graphics mode */
|
||||
#define MODETEXT 0x0003 /* Switch to Text mode 3 */
|
||||
|
||||
#define BACKGROUND_VGA_COLOR 0
|
||||
#define SCREENWIDTH 640
|
||||
#define SCREENHEIGHT 480
|
||||
#define SCREENBYTES 80
|
||||
#define VIDEOSEG 0xa000
|
||||
#define VFPTRSEG 0x0000
|
||||
#define VFPTROFF 0x010C
|
||||
#define SCREENPLANES 4
|
||||
#define COLORDEPTH 16
|
||||
#define egawriteplane(n) { outportb(0x3c4,2); outportb(0x3c5,n); }
|
||||
#define col2x8(c) ((c) * 8)
|
||||
#define col2x16(c) ((c) * 16)
|
||||
#define col2x(c) ((c) * 2)
|
||||
#define row2y(c) ((c) * 16)
|
||||
|
||||
#define ROWS_PER_TILE 16
|
||||
#define COLS_PER_TILE 16
|
||||
#define EMPTY_TILE -1
|
||||
#define TIBHEADER_SIZE 1024 /* Use this for size, allows expansion */
|
||||
#define PLANAR_STYLE 0
|
||||
#define PIXEL_STYLE 1
|
||||
#define DJGPP_COMP 0
|
||||
#define MSC_COMP 1
|
||||
#define BC_COMP 2
|
||||
#define OTHER_COMP 10
|
||||
|
||||
struct tibhdr_struct {
|
||||
char ident[80]; /* Identifying string */
|
||||
char timestamp[26]; /* Ascii timestamp */
|
||||
char tilestyle; /* 0 = planar, 1 = pixel */
|
||||
char compiler; /* 0 = DJGPP, 1 = MSC, >1 other */
|
||||
short tilecount; /* number of tiles in file */
|
||||
short numcolors; /* number of colors in palette */
|
||||
char palette[256 * 3]; /* palette */
|
||||
};
|
||||
|
||||
struct tileplane {
|
||||
char image[ROWS_PER_TILE][2];
|
||||
};
|
||||
|
||||
struct planar_tile_struct {
|
||||
struct tileplane plane[SCREENPLANES];
|
||||
};
|
||||
|
||||
|
||||
#ifndef MK_PTR
|
||||
/*
|
||||
* Depending on environment, this is a macro to construct either:
|
||||
*
|
||||
* - a djgpp long 32 bit pointer from segment & offset values
|
||||
* - a far pointer from segment and offset values
|
||||
*
|
||||
*/
|
||||
# ifdef __GO32__
|
||||
# define MK_PTR(seg, offset) (void *)(0xE0000000+((((unsigned)seg << 4) \
|
||||
+ (unsigned)offset)))
|
||||
# else
|
||||
# define MK_PTR(seg, offset) (void __far *)(((unsigned long)seg << 16) \
|
||||
+ (unsigned long)(unsigned)offset)
|
||||
# endif /* __GO32__ */
|
||||
#endif /* MK_PTR */
|
||||
|
||||
# ifdef __GO32__
|
||||
#define __far
|
||||
# endif
|
||||
# ifdef _MSC_VER
|
||||
#define outportb _outp
|
||||
#define outportw _outpw
|
||||
# endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#define MEMCPY(dest,src,n) _fmemcpy(dest,src,n)
|
||||
#else
|
||||
#define MEMCPY(dest,src,n) memcpy(dest,src,n)
|
||||
#endif
|
||||
|
||||
void vga_SwitchMode(unsigned int);
|
||||
void vga_SetPalette(char *);
|
||||
/* void vga_NoBorder(int); */
|
||||
int vga_vgaCheck(void);
|
||||
char __far *vga_FontPtrs(void);
|
||||
void vga_WriteStr(char *,int, int, int, int);
|
||||
void vga_WriteChar(int, int, int, int);
|
||||
void vga_ClearScreen(int);
|
||||
void vga_DisplayTile(struct planar_tile_struct *, int, int);
|
||||
int OpenTileFile(char *);
|
||||
void CloseTileFile(void);
|
||||
int ReadTileFile(int, struct planar_tile_struct *);
|
||||
int ReadTileFileHeader(struct tibhdr_struct *);
|
||||
|
||||
char __far *screentable[SCREENHEIGHT];
|
||||
char tmp[SCREENWIDTH];
|
||||
int vp[4];
|
||||
char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
|
||||
int curcol,currow;
|
||||
char *paletteptr;
|
||||
struct planar_tile_struct ptile;
|
||||
FILE *tilefile;
|
||||
struct tibhdr_struct tibheader;
|
||||
char __far *font;
|
||||
|
||||
main(argc,argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
unsigned int i;
|
||||
int row,col;
|
||||
int gcount;
|
||||
char buf[80];
|
||||
|
||||
puts("VIEW NetHack Tile File version 1.1\n\n");
|
||||
|
||||
if(argc <= 1) {
|
||||
printf("Please provide a path to a .TIB file\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* make the argument upper case */
|
||||
strupr(argv[1]);
|
||||
|
||||
for (i=0; i < SCREENHEIGHT; ++i) {
|
||||
screentable[i]=MK_PTR(VIDEOSEG, (i * SCREENBYTES));
|
||||
}
|
||||
vga_SwitchMode(MODE640x480);
|
||||
font = vga_FontPtrs();
|
||||
/* vga_NoBorder(BACKGROUND_VGA_COLOR); */
|
||||
OpenTileFile(argv[1]);
|
||||
if (ReadTileFileHeader(&tibheader)) {
|
||||
printf("Error reading %s header",argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
paletteptr = tibheader.palette;
|
||||
vga_SetPalette(paletteptr);
|
||||
vga_ClearScreen(BACKGROUND_VGA_COLOR);
|
||||
vp[0] = 8;
|
||||
vp[1] = 4;
|
||||
vp[2] = 2;
|
||||
vp[3] = 1;
|
||||
gcount = 0;
|
||||
for (row = 0; row < 30; ++row) {
|
||||
for (col = 0; col < 40; ++col) {
|
||||
ReadTileFile(gcount++,&ptile);
|
||||
vga_DisplayTile(&ptile,col,row);
|
||||
if (gcount >= tibheader.tilecount) break;
|
||||
}
|
||||
if (gcount >= tibheader.tilecount) break;
|
||||
}
|
||||
if (row < 26) {
|
||||
char *compiler;
|
||||
++row;
|
||||
col = 0;
|
||||
vga_WriteStr(tibheader.ident,strlen(tibheader.ident)
|
||||
,col,row,9);
|
||||
|
||||
sprintf(buf,"Created %s",tibheader.timestamp);
|
||||
++row;
|
||||
vga_WriteStr(buf,strlen(buf),col,row,9);
|
||||
|
||||
sprintf(buf,"%s style, %d colors",
|
||||
tibheader.tilestyle ? "Pixel" : "Planar",
|
||||
tibheader.numcolors);
|
||||
++row;
|
||||
vga_WriteStr(buf,strlen(buf),col,row,9);
|
||||
|
||||
if (tibheader.compiler == MSC_COMP)
|
||||
compiler = "Microsoft C";
|
||||
else if (tibheader.compiler == BC_COMP)
|
||||
compiler = "Borland C";
|
||||
else if (tibheader.compiler == DJGPP_COMP)
|
||||
compiler = "djgpp";
|
||||
else
|
||||
compiler = "unknown";
|
||||
|
||||
sprintf(buf,"Written by %s compiler",compiler);
|
||||
++row;
|
||||
vga_WriteStr(buf,strlen(buf),col,row,9);
|
||||
}
|
||||
CloseTileFile();
|
||||
getch();
|
||||
vga_SwitchMode(MODETEXT);
|
||||
puts("Ok");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void vga_SwitchMode(unsigned int mode)
|
||||
{
|
||||
union REGS regs;
|
||||
|
||||
regs.x.ax = mode;
|
||||
(void) int86(VIDEO_BIOS, ®s, ®s);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void vga_NoBorder(int bc)
|
||||
{
|
||||
union REGS regs;
|
||||
|
||||
regs.h.ah = (char)0x10;
|
||||
regs.h.al = (char)0x01;
|
||||
regs.h.bh = (char)bc;
|
||||
regs.h.bl = 0;
|
||||
(void) int86(VIDEO_BIOS, ®s, ®s);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
vga_DisplayTile(gp,x,y)
|
||||
struct planar_tile_struct *gp;
|
||||
int x,y;
|
||||
{
|
||||
int i,pixx,pixy;
|
||||
char __far *tmp;
|
||||
int vplane;
|
||||
|
||||
pixy = row2y(y); /* convert to pixels */
|
||||
pixx = col2x(x);
|
||||
|
||||
for(vplane=0; vplane < 4; ++vplane) {
|
||||
egawriteplane(vp[vplane]);
|
||||
for(i=0;i < ROWS_PER_TILE; ++i) {
|
||||
tmp = screentable[i+pixy];
|
||||
tmp += pixx;
|
||||
MEMCPY(tmp,gp->plane[vplane].image[i],2);
|
||||
}
|
||||
}
|
||||
egawriteplane(15);
|
||||
}
|
||||
|
||||
void
|
||||
vga_SetPalette(p)
|
||||
char *p;
|
||||
{
|
||||
union REGS regs;
|
||||
int i;
|
||||
|
||||
outportb(0x3c6,0xff);
|
||||
for(i=0;i < COLORDEPTH; ++i) {
|
||||
outportb(0x3c8,i);
|
||||
outportb(0x3c9,(*p++) >> 2);
|
||||
outportb(0x3c9,(*p++) >> 2);
|
||||
outportb(0x3c9,(*p++) >> 2);
|
||||
}
|
||||
regs.x.bx = 0x0000;
|
||||
for(i=0;i < COLORDEPTH; ++i) {
|
||||
regs.x.ax = 0x1000;
|
||||
(void) int86(VIDEO_BIOS,®s,®s);
|
||||
regs.x.bx += 0x0101;
|
||||
}
|
||||
}
|
||||
|
||||
int ReadTileFile(tilenum,gp)
|
||||
int tilenum;
|
||||
struct planar_tile_struct *gp;
|
||||
{
|
||||
long fpos;
|
||||
|
||||
fpos = ((long)(tilenum) * (long)sizeof(struct planar_tile_struct)) +
|
||||
(long)TIBHEADER_SIZE;
|
||||
if (fseek(tilefile,fpos,SEEK_SET)) {
|
||||
return 1;
|
||||
} else {
|
||||
fread(gp, sizeof(struct planar_tile_struct), 1, tilefile);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ReadTileFileHeader(tibhdr)
|
||||
struct tibhdr_struct *tibhdr;
|
||||
{
|
||||
if (fseek(tilefile,0L,SEEK_SET)) {
|
||||
return 1;
|
||||
} else {
|
||||
fread(tibhdr, sizeof(struct tibhdr_struct), 1, tilefile);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
OpenTileFile(fname)
|
||||
char *fname;
|
||||
{
|
||||
tilefile = fopen(fname,"rb");
|
||||
if (tilefile == (FILE *)0) {
|
||||
printf("Unable to open tile file %s\n",
|
||||
fname);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
CloseTileFile()
|
||||
{
|
||||
fclose(tilefile);
|
||||
}
|
||||
|
||||
char __far *vga_FontPtrs(void)
|
||||
{
|
||||
USHORT __far *tmp;
|
||||
char __far *retval;
|
||||
USHORT fseg, foff;
|
||||
tmp = (USHORT __far *)MK_PTR(((USHORT)VFPTRSEG),((USHORT)VFPTROFF));
|
||||
foff = *tmp++;
|
||||
fseg = *tmp;
|
||||
retval = (char __far *)MK_PTR(fseg,foff);
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
vga_WriteChar(ch,x,y,colour)
|
||||
int ch,x,y,colour;
|
||||
{
|
||||
char __far *cp;
|
||||
|
||||
int i,mx,my;
|
||||
int pixx,pixy;
|
||||
int chr,floc;
|
||||
char volatile tc;
|
||||
|
||||
mx = x;
|
||||
my = y;
|
||||
chr = ch;
|
||||
if (chr < 32) chr = ' ';
|
||||
|
||||
outportb(0x3ce,5);
|
||||
outportb(0x3cf,2);
|
||||
pixy = row2y(my);
|
||||
pixx = col2x8(mx);
|
||||
|
||||
for (i=0; i < 16; ++i) {
|
||||
cp = screentable[pixy+i];
|
||||
cp += (pixx >> 3);
|
||||
floc = (chr<<4)+i;
|
||||
outportb(0x3ce,8);
|
||||
outportb(0x3cf,font[floc]);
|
||||
tc = *cp; /* wrt mode 2, must read, then write */
|
||||
*cp = (char)colour;
|
||||
outportb(0x3ce,8);
|
||||
outportb(0x3cf,~font[floc]);
|
||||
tc = *cp; /* wrt mode 2, must read, then write */
|
||||
*cp = (char)BACKGROUND_VGA_COLOR;
|
||||
}
|
||||
if (mx < (80 - 1 )) ++mx;
|
||||
outportb(0x3ce,5);
|
||||
outportb(0x3cf,0);
|
||||
outportb(0x3ce,8);
|
||||
outportb(0x3cf,255);
|
||||
}
|
||||
|
||||
void
|
||||
vga_WriteStr(s,len,x,y,colour)
|
||||
char *s;
|
||||
int len,x,y,colour;
|
||||
{
|
||||
int i,mx,my;
|
||||
char *cp;
|
||||
|
||||
cp = s;
|
||||
i = 0;
|
||||
mx = x;
|
||||
my = y;
|
||||
while( (*cp != 0) && (i < len) && (mx < (79))) {
|
||||
vga_WriteChar(*cp,mx,my,colour);
|
||||
++cp;
|
||||
++i;
|
||||
++mx;
|
||||
}
|
||||
}
|
||||
|
||||
void vga_ClearScreen(colour)
|
||||
int colour;
|
||||
{
|
||||
int y,j;
|
||||
char a;
|
||||
char _far *pch;
|
||||
|
||||
outportb(0x3ce,5);
|
||||
outportb(0x3cf,2);
|
||||
|
||||
for (y=0; y < SCREENHEIGHT; ++y) {
|
||||
pch = screentable[y];
|
||||
for (j=0; j < SCREENBYTES; ++j) {
|
||||
outportb(0x3ce,8);
|
||||
outportb(0x3cf,255);
|
||||
a = pch[j];
|
||||
pch[j] = (char)colour;
|
||||
}
|
||||
}
|
||||
outportb(0x3ce,5);
|
||||
outportb(0x3cf,0);
|
||||
}
|
||||
@@ -1,959 +0,0 @@
|
||||
/* A lexical scanner for NetHack generated by flex */
|
||||
|
||||
/* Scanner skeleton version:
|
||||
* flexhack.skl 3.3.0 (from .../flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47)
|
||||
*/
|
||||
#define FLEXHACK_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
|
||||
#include "config.h"
|
||||
#define yyconst const /* some code inserted by flex will refer to yyconst */
|
||||
|
||||
/* Returned upon end-of-file. */
|
||||
#define YY_NULL 0
|
||||
|
||||
/* Promotes a possibly negative, possibly signed char to an unsigned
|
||||
* integer for use as an array index. If the signed char is negative,
|
||||
* we want to instead treat it as an 8-bit unsigned char, hence the
|
||||
* double cast.
|
||||
*/
|
||||
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
||||
|
||||
/* Enter a start condition. This macro really ought to take a parameter,
|
||||
* but we do it the disgusting crufty way forced on us by the ()-less
|
||||
* definition of BEGIN.
|
||||
*/
|
||||
#define BEGIN yy_start = 1 + 2 *
|
||||
|
||||
/* Translate the current start state into a value that can be later handed
|
||||
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
||||
* compatibility.
|
||||
*/
|
||||
#define YY_START ((yy_start - 1) / 2)
|
||||
#define YYSTATE YY_START
|
||||
|
||||
/* Action number for EOF rule of a given start state. */
|
||||
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
||||
|
||||
/* Special action meaning "start processing a new file". */
|
||||
#define YY_NEW_FILE yyrestart( yyin )
|
||||
|
||||
#define YY_END_OF_BUFFER_CHAR 0
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#define YY_BUF_SIZE 16384
|
||||
|
||||
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||
|
||||
extern int yyleng;
|
||||
extern FILE *yyin, *yyout;
|
||||
|
||||
#define EOB_ACT_CONTINUE_SCAN 0
|
||||
#define EOB_ACT_END_OF_FILE 1
|
||||
#define EOB_ACT_LAST_MATCH 2
|
||||
|
||||
/* Return all but the first 'n' matched characters back to the input stream. */
|
||||
#define yyless(n) \
|
||||
do \
|
||||
{ \
|
||||
/* Undo effects of setting up yytext. */ \
|
||||
*yy_cp = yy_hold_char; \
|
||||
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
|
||||
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
||||
} \
|
||||
while ( 0 )
|
||||
|
||||
#define unput(c) yyunput( c, yytext_ptr )
|
||||
|
||||
/* The following is because we cannot portably get our hands on size_t
|
||||
* (without autoconf's help, which isn't available because we want
|
||||
* flex-generated scanners to compile on their own).
|
||||
*/
|
||||
typedef unsigned int yy_size_t;
|
||||
|
||||
|
||||
struct yy_buffer_state
|
||||
{
|
||||
FILE *yy_input_file;
|
||||
|
||||
char *yy_ch_buf; /* input buffer */
|
||||
char *yy_buf_pos; /* current position in input buffer */
|
||||
|
||||
/* Size of input buffer in bytes, not including room for EOB
|
||||
* characters.
|
||||
*/
|
||||
yy_size_t yy_buf_size;
|
||||
|
||||
/* Number of characters read into yy_ch_buf, not including EOB
|
||||
* characters.
|
||||
*/
|
||||
int yy_n_chars;
|
||||
|
||||
/* Whether we "own" the buffer - i.e., we know we created it,
|
||||
* and can realloc() it to grow it, and should free() it to
|
||||
* delete it.
|
||||
*/
|
||||
int yy_is_our_buffer;
|
||||
|
||||
/* Whether this is an "interactive" input source; if so, and
|
||||
* if we're using stdio for input, then we want to use getc()
|
||||
* instead of fread(), to make sure we stop fetching input after
|
||||
* each newline.
|
||||
*/
|
||||
int yy_is_interactive;
|
||||
|
||||
/* Whether we're considered to be at the beginning of a line.
|
||||
* If so, '^' rules will be active on the next match, otherwise
|
||||
* not.
|
||||
*/
|
||||
int yy_at_bol;
|
||||
|
||||
/* Whether to try to fill the input buffer when we reach the
|
||||
* end of it.
|
||||
*/
|
||||
int yy_fill_buffer;
|
||||
|
||||
int yy_buffer_status;
|
||||
#define YY_BUFFER_NEW 0
|
||||
#define YY_BUFFER_NORMAL 1
|
||||
/* When an EOF's been seen but there's still some text to process
|
||||
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
||||
* shouldn't try reading from the input source any more. We might
|
||||
* still have a bunch of tokens to match, though, because of
|
||||
* possible backing-up.
|
||||
*
|
||||
* When we actually see the EOF, we change the status to "new"
|
||||
* (via yyrestart()), so that the user can continue scanning by
|
||||
* just pointing yyin at a new input file.
|
||||
*/
|
||||
#define YY_BUFFER_EOF_PENDING 2
|
||||
};
|
||||
|
||||
static YY_BUFFER_STATE yy_current_buffer = 0;
|
||||
|
||||
/* We provide macros for accessing buffer states in case in the
|
||||
* future we want to put the buffer states in a more general
|
||||
* "scanner state".
|
||||
*/
|
||||
#define YY_CURRENT_BUFFER yy_current_buffer
|
||||
|
||||
/* yy_hold_char holds the character lost when yytext is formed. */
|
||||
static char yy_hold_char;
|
||||
|
||||
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
|
||||
int yyleng;
|
||||
|
||||
/* Points to current character in buffer. */
|
||||
static char *yy_c_buf_p = (char *) 0;
|
||||
static int yy_init = 1; /* whether we need to initialize */
|
||||
static int yy_start = 0; /* start state number */
|
||||
|
||||
/* Flag which is used to allow yywrap()'s to do buffer switches
|
||||
* instead of setting up a fresh yyin. A bit of a hack ...
|
||||
*/
|
||||
static int yy_did_buffer_switch_on_eof;
|
||||
|
||||
void FDECL(yyrestart, (FILE *));
|
||||
|
||||
void FDECL(yy_switch_to_buffer, (YY_BUFFER_STATE));
|
||||
void NDECL(yy_load_buffer_state);
|
||||
YY_BUFFER_STATE FDECL(yy_create_buffer, (FILE *,int));
|
||||
void FDECL(yy_delete_buffer, (YY_BUFFER_STATE));
|
||||
void FDECL(yy_init_buffer, (YY_BUFFER_STATE,FILE *));
|
||||
void FDECL(yy_flush_buffer, (YY_BUFFER_STATE));
|
||||
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
|
||||
|
||||
static genericptr_t FDECL(yy_flex_alloc, (yy_size_t));
|
||||
static genericptr_t FDECL(yy_flex_realloc2, (genericptr_t,yy_size_t,int));
|
||||
static void FDECL(yy_flex_free, (genericptr_t));
|
||||
|
||||
#define yy_new_buffer yy_create_buffer
|
||||
|
||||
#define yy_set_interactive(is_interactive) \
|
||||
{ \
|
||||
if ( ! yy_current_buffer ) \
|
||||
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
||||
yy_current_buffer->yy_is_interactive = is_interactive; \
|
||||
}
|
||||
|
||||
#define yy_set_bol(at_bol) \
|
||||
{ \
|
||||
if ( ! yy_current_buffer ) \
|
||||
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
||||
yy_current_buffer->yy_at_bol = at_bol; \
|
||||
}
|
||||
|
||||
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
|
||||
|
||||
%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
|
||||
|
||||
static yy_state_type NDECL(yy_get_previous_state);
|
||||
static yy_state_type FDECL(yy_try_NUL_trans, (yy_state_type));
|
||||
static int NDECL(yy_get_next_buffer);
|
||||
static void FDECL(yy_fatal_error, (const char *));
|
||||
|
||||
/* Done after the current pattern has been matched and before the
|
||||
* corresponding action - sets up yytext.
|
||||
*/
|
||||
#define YY_DO_BEFORE_ACTION \
|
||||
yytext_ptr = yy_bp; \
|
||||
%% code to fiddle yytext and yyleng for yymore() goes here
|
||||
yy_hold_char = *yy_cp; \
|
||||
*yy_cp = '\0'; \
|
||||
%% code to copy yytext_ptr to yytext[] goes here, if %array
|
||||
yy_c_buf_p = yy_cp;
|
||||
|
||||
%% data tables for the DFA and the user's section 1 definitions go here
|
||||
|
||||
/* Macros after this point can all be overridden by user definitions in
|
||||
* section 1.
|
||||
*/
|
||||
|
||||
#ifndef YY_SKIP_YYWRAP
|
||||
extern int NDECL(yywrap);
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_UNPUT
|
||||
static void FDECL(yyunput, (int,char *));
|
||||
#endif
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void FDECL(yy_flex_strncpy, (char *,const char *,int));
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_INPUT
|
||||
static int NDECL(input);
|
||||
#endif
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
|
||||
#ifndef ECHO
|
||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
* is returned in "result".
|
||||
*/
|
||||
#ifndef YY_INPUT
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
%% fread()/read() definition of YY_INPUT goes here unless we're doing C++
|
||||
#endif
|
||||
|
||||
/* No semi-colon after return; correct usage is to write "yyterminate();" -
|
||||
* we don't want an extra ';' after the "return" because that will cause
|
||||
* some compilers to complain about unreachable statements.
|
||||
*/
|
||||
#ifndef yyterminate
|
||||
#define yyterminate() return YY_NULL
|
||||
#endif
|
||||
|
||||
/* Number of entries by which start-condition stack grows. */
|
||||
#ifndef YY_START_STACK_INCR
|
||||
#define YY_START_STACK_INCR 25
|
||||
#endif
|
||||
|
||||
/* Report a fatal error. */
|
||||
#ifndef YY_FATAL_ERROR
|
||||
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
|
||||
#endif
|
||||
|
||||
/* Code executed at the beginning of each rule, after yytext and yyleng
|
||||
* have been set up.
|
||||
*/
|
||||
#ifndef YY_USER_ACTION
|
||||
#define YY_USER_ACTION
|
||||
#endif
|
||||
|
||||
/* Code executed at the end of each rule. */
|
||||
#ifndef YY_BREAK
|
||||
#define YY_BREAK break;
|
||||
#endif
|
||||
|
||||
%% YY_RULE_SETUP definition goes here
|
||||
|
||||
int NDECL(yylex);
|
||||
int yylex()
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register char *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
|
||||
%% user's declarations go here
|
||||
|
||||
if ( yy_init )
|
||||
{
|
||||
yy_init = 0;
|
||||
|
||||
#ifdef YY_USER_INIT
|
||||
YY_USER_INIT;
|
||||
#endif
|
||||
|
||||
if ( ! yy_start )
|
||||
yy_start = 1; /* first start state */
|
||||
|
||||
if ( ! yyin )
|
||||
yyin = stdin;
|
||||
|
||||
if ( ! yyout )
|
||||
yyout = stdout;
|
||||
|
||||
if ( ! yy_current_buffer )
|
||||
yy_current_buffer =
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE );
|
||||
|
||||
yy_load_buffer_state();
|
||||
}
|
||||
|
||||
while ( 1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
%% yymore()-related code goes here
|
||||
yy_cp = yy_c_buf_p;
|
||||
|
||||
/* Support of yytext. */
|
||||
*yy_cp = yy_hold_char;
|
||||
|
||||
/* yy_bp points to the position in yy_ch_buf of the start of
|
||||
* the current run.
|
||||
*/
|
||||
yy_bp = yy_cp;
|
||||
|
||||
%% code to set up and find next match goes here
|
||||
|
||||
yy_find_action:
|
||||
%% code to find the action number goes here
|
||||
|
||||
YY_DO_BEFORE_ACTION;
|
||||
|
||||
%% code for yylineno update goes here
|
||||
|
||||
do_action: /* This label is used only to access EOF actions. */
|
||||
|
||||
%% debug code goes here
|
||||
|
||||
switch ( yy_act )
|
||||
{ /* beginning of action switch */
|
||||
%% actions go here
|
||||
|
||||
case YY_END_OF_BUFFER:
|
||||
{
|
||||
/* Amount of text matched not including the EOB char. */
|
||||
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
|
||||
|
||||
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
||||
*yy_cp = yy_hold_char;
|
||||
|
||||
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
|
||||
{
|
||||
/* We're scanning a new file or input source. It's
|
||||
* possible that this happened because the user
|
||||
* just pointed yyin at a new source and called
|
||||
* yylex(). If so, then we have to assure
|
||||
* consistency between yy_current_buffer and our
|
||||
* globals. Here is the right place to do so, because
|
||||
* this is the first action (other than possibly a
|
||||
* back-up) that will match for the new input source.
|
||||
*/
|
||||
yy_n_chars = yy_current_buffer->yy_n_chars;
|
||||
yy_current_buffer->yy_input_file = yyin;
|
||||
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
|
||||
}
|
||||
|
||||
/* Note that here we test for yy_c_buf_p "<=" to the position
|
||||
* of the first EOB in the buffer, since yy_c_buf_p will
|
||||
* already have been incremented past the NUL character
|
||||
* (since all states make transitions on EOB to the
|
||||
* end-of-buffer state). Contrast this with the test
|
||||
* in input().
|
||||
*/
|
||||
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
|
||||
{ /* This was really a NUL. */
|
||||
yy_state_type yy_next_state;
|
||||
|
||||
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
|
||||
|
||||
yy_current_state = yy_get_previous_state();
|
||||
|
||||
/* Okay, we're now positioned to make the NUL
|
||||
* transition. We couldn't have
|
||||
* yy_get_previous_state() go ahead and do it
|
||||
* for us because it doesn't know how to deal
|
||||
* with the possibility of jamming (and we don't
|
||||
* want to build jamming into it because then it
|
||||
* will run more slowly).
|
||||
*/
|
||||
|
||||
yy_next_state = yy_try_NUL_trans( yy_current_state );
|
||||
|
||||
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
||||
|
||||
if ( yy_next_state )
|
||||
{
|
||||
/* Consume the NUL. */
|
||||
yy_cp = ++yy_c_buf_p;
|
||||
yy_current_state = yy_next_state;
|
||||
goto yy_match;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
%% code to do back-up for compressed tables and set up yy_cp goes here
|
||||
goto yy_find_action;
|
||||
}
|
||||
}
|
||||
|
||||
else switch ( yy_get_next_buffer() )
|
||||
{
|
||||
case EOB_ACT_END_OF_FILE:
|
||||
{
|
||||
yy_did_buffer_switch_on_eof = 0;
|
||||
|
||||
if ( yywrap() )
|
||||
{
|
||||
/* Note: because we've taken care in
|
||||
* yy_get_next_buffer() to have set up
|
||||
* yytext, we can now set up
|
||||
* yy_c_buf_p so that if some total
|
||||
* hoser (like flex itself) wants to
|
||||
* call the scanner after we return the
|
||||
* YY_NULL, it'll still work - another
|
||||
* YY_NULL will get returned.
|
||||
*/
|
||||
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
|
||||
|
||||
yy_act = YY_STATE_EOF(YY_START);
|
||||
goto do_action;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if ( ! yy_did_buffer_switch_on_eof )
|
||||
YY_NEW_FILE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case EOB_ACT_CONTINUE_SCAN:
|
||||
yy_c_buf_p =
|
||||
yytext_ptr + yy_amount_of_matched_text;
|
||||
|
||||
yy_current_state = yy_get_previous_state();
|
||||
|
||||
yy_cp = yy_c_buf_p;
|
||||
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
||||
goto yy_match;
|
||||
|
||||
case EOB_ACT_LAST_MATCH:
|
||||
yy_c_buf_p =
|
||||
&yy_current_buffer->yy_ch_buf[yy_n_chars];
|
||||
|
||||
yy_current_state = yy_get_previous_state();
|
||||
|
||||
yy_cp = yy_c_buf_p;
|
||||
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
||||
goto yy_find_action;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
YY_FATAL_ERROR(
|
||||
"fatal flex scanner internal error--no action found" );
|
||||
} /* end of action switch */
|
||||
} /* end of scanning one token */
|
||||
} /* end of yylex */
|
||||
|
||||
|
||||
/* yy_get_next_buffer - try to read in a new buffer
|
||||
*
|
||||
* Returns a code representing an action:
|
||||
* EOB_ACT_LAST_MATCH -
|
||||
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
||||
* EOB_ACT_END_OF_FILE - end of file
|
||||
*/
|
||||
|
||||
static int yy_get_next_buffer()
|
||||
{
|
||||
register char *dest = yy_current_buffer->yy_ch_buf;
|
||||
register char *source = yytext_ptr;
|
||||
register int number_to_move, i;
|
||||
int ret_val;
|
||||
|
||||
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
|
||||
YY_FATAL_ERROR(
|
||||
"fatal flex scanner internal error--end of buffer missed" );
|
||||
|
||||
if ( yy_current_buffer->yy_fill_buffer == 0 )
|
||||
{ /* Don't try to fill the buffer, so this is an EOF. */
|
||||
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
|
||||
{
|
||||
/* We matched a singled characater, the EOB, so
|
||||
* treat this as a final EOF.
|
||||
*/
|
||||
return EOB_ACT_END_OF_FILE;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* We matched some text prior to the EOB, first
|
||||
* process it.
|
||||
*/
|
||||
return EOB_ACT_LAST_MATCH;
|
||||
}
|
||||
}
|
||||
|
||||
/* Try to read more data. */
|
||||
|
||||
/* First move last chars to start of buffer. */
|
||||
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
|
||||
|
||||
for ( i = 0; i < number_to_move; ++i )
|
||||
*(dest++) = *(source++);
|
||||
|
||||
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
||||
/* don't do the read, it's not guaranteed to return an EOF,
|
||||
* just force an EOF
|
||||
*/
|
||||
yy_n_chars = 0;
|
||||
|
||||
else
|
||||
{
|
||||
int num_to_read =
|
||||
yy_current_buffer->yy_buf_size - number_to_move - 1;
|
||||
|
||||
while ( num_to_read <= 0 )
|
||||
{ /* Not enough room in the buffer - grow it. */
|
||||
#ifdef YY_USES_REJECT
|
||||
YY_FATAL_ERROR(
|
||||
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
|
||||
#else
|
||||
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = yy_current_buffer;
|
||||
|
||||
int yy_c_buf_p_offset =
|
||||
(int) (yy_c_buf_p - b->yy_ch_buf);
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
{
|
||||
int old_size = b->yy_buf_size + 2;
|
||||
int new_size = b->yy_buf_size * 2;
|
||||
|
||||
if ( new_size <= 0 )
|
||||
b->yy_buf_size += b->yy_buf_size / 8;
|
||||
else
|
||||
b->yy_buf_size *= 2;
|
||||
|
||||
b->yy_ch_buf = (char *)
|
||||
/* Include room in for 2 EOB chars. */
|
||||
yy_flex_realloc2( (genericptr_t) b->yy_ch_buf,
|
||||
b->yy_buf_size + 2, old_size );
|
||||
}
|
||||
else
|
||||
/* Can't grow it, we don't own it. */
|
||||
b->yy_ch_buf = 0;
|
||||
|
||||
if ( ! b->yy_ch_buf )
|
||||
YY_FATAL_ERROR(
|
||||
"fatal error - scanner input buffer overflow" );
|
||||
|
||||
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
|
||||
|
||||
num_to_read = yy_current_buffer->yy_buf_size -
|
||||
number_to_move - 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( num_to_read > YY_READ_BUF_SIZE )
|
||||
num_to_read = YY_READ_BUF_SIZE;
|
||||
|
||||
/* Read in more data. */
|
||||
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
|
||||
yy_n_chars, num_to_read );
|
||||
}
|
||||
|
||||
if ( yy_n_chars == 0 )
|
||||
{
|
||||
if ( number_to_move == YY_MORE_ADJ )
|
||||
{
|
||||
ret_val = EOB_ACT_END_OF_FILE;
|
||||
yyrestart( yyin );
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ret_val = EOB_ACT_LAST_MATCH;
|
||||
yy_current_buffer->yy_buffer_status =
|
||||
YY_BUFFER_EOF_PENDING;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||||
|
||||
yy_n_chars += number_to_move;
|
||||
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
|
||||
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
|
||||
|
||||
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
||||
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
||||
|
||||
static yy_state_type yy_get_previous_state()
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register char *yy_cp;
|
||||
|
||||
%% code to get the start state into yy_current_state goes here
|
||||
|
||||
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
|
||||
{
|
||||
%% code to find the next state goes here
|
||||
}
|
||||
|
||||
return yy_current_state;
|
||||
}
|
||||
|
||||
|
||||
/* yy_try_NUL_trans - try to make a transition on the NUL character
|
||||
*
|
||||
* synopsis
|
||||
* next_state = yy_try_NUL_trans( current_state );
|
||||
*/
|
||||
|
||||
static yy_state_type yy_try_NUL_trans( yy_current_state )
|
||||
yy_state_type yy_current_state;
|
||||
{
|
||||
register int yy_is_jam;
|
||||
%% code to find the next state, and perhaps do backing up, goes here
|
||||
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
|
||||
|
||||
#ifndef YY_NO_UNPUT
|
||||
static void yyunput( c, yy_bp )
|
||||
int c;
|
||||
register char *yy_bp;
|
||||
{
|
||||
register char *yy_cp = yy_c_buf_p;
|
||||
|
||||
/* undo effects of setting up yytext */
|
||||
*yy_cp = yy_hold_char;
|
||||
|
||||
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
||||
{ /* need to shift things up to make room */
|
||||
/* +2 for EOB chars. */
|
||||
register int number_to_move = yy_n_chars + 2;
|
||||
register char *dest = &yy_current_buffer->yy_ch_buf[
|
||||
yy_current_buffer->yy_buf_size + 2];
|
||||
register char *source =
|
||||
&yy_current_buffer->yy_ch_buf[number_to_move];
|
||||
|
||||
while ( source > yy_current_buffer->yy_ch_buf )
|
||||
*--dest = *--source;
|
||||
|
||||
yy_cp += (int) (dest - source);
|
||||
yy_bp += (int) (dest - source);
|
||||
yy_n_chars = yy_current_buffer->yy_buf_size;
|
||||
|
||||
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
||||
YY_FATAL_ERROR( "flex scanner push-back overflow" );
|
||||
}
|
||||
|
||||
*--yy_cp = (char) c;
|
||||
|
||||
%% update yylineno here
|
||||
|
||||
yytext_ptr = yy_bp;
|
||||
yy_hold_char = *yy_cp;
|
||||
yy_c_buf_p = yy_cp;
|
||||
}
|
||||
#endif /* ifndef YY_NO_UNPUT */
|
||||
|
||||
|
||||
static int input()
|
||||
{
|
||||
int c;
|
||||
|
||||
*yy_c_buf_p = yy_hold_char;
|
||||
|
||||
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
|
||||
{
|
||||
/* yy_c_buf_p now points to the character we want to return.
|
||||
* If this occurs *before* the EOB characters, then it's a
|
||||
* valid NUL; if not, then we've hit the end of the buffer.
|
||||
*/
|
||||
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
|
||||
/* This was really a NUL. */
|
||||
*yy_c_buf_p = '\0';
|
||||
|
||||
else
|
||||
{ /* need more input */
|
||||
yytext_ptr = yy_c_buf_p;
|
||||
++yy_c_buf_p;
|
||||
|
||||
switch ( yy_get_next_buffer() )
|
||||
{
|
||||
case EOB_ACT_END_OF_FILE:
|
||||
{
|
||||
if ( yywrap() )
|
||||
{
|
||||
yy_c_buf_p =
|
||||
yytext_ptr + YY_MORE_ADJ;
|
||||
return EOF;
|
||||
}
|
||||
|
||||
if ( ! yy_did_buffer_switch_on_eof )
|
||||
YY_NEW_FILE;
|
||||
return input();
|
||||
}
|
||||
|
||||
case EOB_ACT_CONTINUE_SCAN:
|
||||
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
|
||||
break;
|
||||
|
||||
case EOB_ACT_LAST_MATCH:
|
||||
YY_FATAL_ERROR(
|
||||
"unexpected last match in input()" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
|
||||
*yy_c_buf_p = '\0'; /* preserve yytext */
|
||||
yy_hold_char = *++yy_c_buf_p;
|
||||
|
||||
%% update BOL and yylineno
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
void yyrestart( input_file )
|
||||
FILE *input_file;
|
||||
{
|
||||
if ( ! yy_current_buffer )
|
||||
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
|
||||
|
||||
yy_init_buffer( yy_current_buffer, input_file );
|
||||
yy_load_buffer_state();
|
||||
}
|
||||
|
||||
|
||||
void yy_switch_to_buffer( new_buffer )
|
||||
YY_BUFFER_STATE new_buffer;
|
||||
{
|
||||
if ( yy_current_buffer == new_buffer )
|
||||
return;
|
||||
|
||||
if ( yy_current_buffer )
|
||||
{
|
||||
/* Flush out information for old buffer. */
|
||||
*yy_c_buf_p = yy_hold_char;
|
||||
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
|
||||
yy_current_buffer->yy_n_chars = yy_n_chars;
|
||||
}
|
||||
|
||||
yy_current_buffer = new_buffer;
|
||||
yy_load_buffer_state();
|
||||
|
||||
/* We don't actually know whether we did this switch during
|
||||
* EOF (yywrap()) processing, but the only time this flag
|
||||
* is looked at is after yywrap() is called, so it's safe
|
||||
* to go ahead and always set it.
|
||||
*/
|
||||
yy_did_buffer_switch_on_eof = 1;
|
||||
}
|
||||
|
||||
|
||||
void yy_load_buffer_state()
|
||||
{
|
||||
yy_n_chars = yy_current_buffer->yy_n_chars;
|
||||
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
|
||||
yyin = yy_current_buffer->yy_input_file;
|
||||
yy_hold_char = *yy_c_buf_p;
|
||||
}
|
||||
|
||||
|
||||
YY_BUFFER_STATE yy_create_buffer( file, size )
|
||||
FILE *file;
|
||||
int size;
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
|
||||
b->yy_buf_size = size;
|
||||
|
||||
/* yy_ch_buf has to be 2 characters longer than the size given because
|
||||
* we need to put in 2 end-of-buffer characters.
|
||||
*/
|
||||
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
|
||||
if ( ! b->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
|
||||
b->yy_is_our_buffer = 1;
|
||||
|
||||
yy_init_buffer( b, file );
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
void yy_delete_buffer( b )
|
||||
YY_BUFFER_STATE b;
|
||||
{
|
||||
if ( ! b )
|
||||
return;
|
||||
|
||||
if ( b == yy_current_buffer )
|
||||
yy_current_buffer = (YY_BUFFER_STATE) 0;
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
yy_flex_free( (genericptr_t) b->yy_ch_buf );
|
||||
|
||||
yy_flex_free( (genericptr_t) b );
|
||||
}
|
||||
|
||||
|
||||
#ifndef YY_ALWAYS_INTERACTIVE
|
||||
#ifndef YY_NEVER_INTERACTIVE
|
||||
extern int FDECL(isatty, (int));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void yy_init_buffer( b, file )
|
||||
YY_BUFFER_STATE b;
|
||||
FILE *file;
|
||||
{
|
||||
yy_flush_buffer( b );
|
||||
|
||||
b->yy_input_file = file;
|
||||
b->yy_fill_buffer = 1;
|
||||
|
||||
#ifdef YY_ALWAYS_INTERACTIVE
|
||||
b->yy_is_interactive = 1;
|
||||
#else
|
||||
#ifdef YY_NEVER_INTERACTIVE
|
||||
b->yy_is_interactive = 0;
|
||||
#else
|
||||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void yy_flush_buffer( b )
|
||||
YY_BUFFER_STATE b;
|
||||
{
|
||||
b->yy_n_chars = 0;
|
||||
|
||||
/* We always need two end-of-buffer characters. The first causes
|
||||
* a transition to the end-of-buffer state. The second causes
|
||||
* a jam in that state.
|
||||
*/
|
||||
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
||||
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
||||
|
||||
b->yy_buf_pos = &b->yy_ch_buf[0];
|
||||
|
||||
b->yy_at_bol = 1;
|
||||
b->yy_buffer_status = YY_BUFFER_NEW;
|
||||
|
||||
if ( b == yy_current_buffer )
|
||||
yy_load_buffer_state();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifndef YY_EXIT_FAILURE
|
||||
#define YY_EXIT_FAILURE 2
|
||||
#endif
|
||||
|
||||
static void yy_fatal_error( msg )
|
||||
const char msg[];
|
||||
{
|
||||
(void) fprintf( stderr, "%s\n", msg );
|
||||
exit( YY_EXIT_FAILURE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Redefine yyless() so it works in section 3 code. */
|
||||
|
||||
#undef yyless
|
||||
#define yyless(n) \
|
||||
do \
|
||||
{ \
|
||||
/* Undo effects of setting up yytext. */ \
|
||||
yytext[yyleng] = yy_hold_char; \
|
||||
yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
|
||||
yy_hold_char = *yy_c_buf_p; \
|
||||
*yy_c_buf_p = '\0'; \
|
||||
yyleng = n; \
|
||||
} \
|
||||
while ( 0 )
|
||||
|
||||
|
||||
/* Internal utility routines. */
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy( s1, s2, n )
|
||||
char *s1;
|
||||
const char *s2;
|
||||
int n;
|
||||
{
|
||||
register int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static genericptr_t yy_flex_alloc( size )
|
||||
yy_size_t size;
|
||||
{
|
||||
return (genericptr_t) alloc((unsigned)size);
|
||||
}
|
||||
|
||||
/* we want to avoid use of realloc(), so we require that caller supply the
|
||||
size of the old block of memory */
|
||||
static genericptr_t yy_flex_realloc2( ptr, size, old_size )
|
||||
genericptr_t ptr;
|
||||
yy_size_t size;
|
||||
int old_size;
|
||||
{
|
||||
genericptr_t outptr = yy_flex_alloc(size);
|
||||
|
||||
if (ptr) {
|
||||
char *p = (char *) outptr, *q = (char *) ptr;
|
||||
|
||||
while (--old_size >= 0) *p++ = *q++;
|
||||
yy_flex_free(ptr);
|
||||
}
|
||||
return outptr;
|
||||
}
|
||||
|
||||
static void yy_flex_free( ptr )
|
||||
genericptr_t ptr;
|
||||
{
|
||||
free( ptr );
|
||||
}
|
||||
|
||||
/*flexhack.skl*/
|
||||
325
util/heaputil.c
325
util/heaputil.c
@@ -1,325 +0,0 @@
|
||||
/* SCCS Id: @(#)heaputil.c 3.3 94/07/17 */
|
||||
/* Copyright (c) Michael Allison, Toronto, 1994 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
* We want to know the following information:
|
||||
*
|
||||
* 1. allocations that are made but never freed, and where they occur.
|
||||
* 2. attempts to free unallocated blocks.
|
||||
* 3. the peak amount of heap space allocated during the program.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef MICRO
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef MICRO /* see src/alloc.c */
|
||||
# define MONITOR_HEAP_FMT
|
||||
#endif
|
||||
|
||||
#ifdef MONITOR_HEAP_FMT
|
||||
# define PTR_FMT "%p"
|
||||
# define PTR_TYP genericptr_t /* (void *) */
|
||||
#else
|
||||
# define PTR_FMT "%lx"
|
||||
# define PTR_TYP unsigned long
|
||||
#endif
|
||||
|
||||
extern genericptr_t FDECL(malloc,(size_t));
|
||||
#ifdef free
|
||||
#undef free
|
||||
#endif
|
||||
extern void FDECL(free,(genericptr_t));
|
||||
|
||||
#define quit() exit(EXIT_FAILURE)
|
||||
|
||||
static void NDECL(out_of_memory);
|
||||
static void FDECL(doline,(char *));
|
||||
static void FDECL(chain,(char *));
|
||||
static void FDECL(unchain,(char *));
|
||||
static void NDECL(walkblocks);
|
||||
static struct memblock *FDECL(findprev,(PTR_TYP));
|
||||
static void FDECL(btempl,(char *));
|
||||
|
||||
#ifdef VMS
|
||||
static FILE *vms_fopen(name, mode) const char *name, *mode;
|
||||
{
|
||||
return fopen(name, mode, "mbc=64", "shr=nil");
|
||||
}
|
||||
# define fopen(f,m) vms_fopen(f,m)
|
||||
#endif
|
||||
|
||||
|
||||
#define DEFAULTNAME "heapuse.log"
|
||||
#define MAXERR 4
|
||||
#ifndef _MAX_PATH
|
||||
#define _MAX_PATH 120
|
||||
#endif
|
||||
|
||||
struct memblock {
|
||||
struct memblock *next;
|
||||
long sequence, bsize;
|
||||
PTR_TYP address;
|
||||
char fileinfo[5 + _MAX_PATH + 1];
|
||||
};
|
||||
|
||||
/* a cheap way to try to split addresses into two categories */
|
||||
#define CHAIN_SELECT(X) (((unsigned long)X >> 10) & 1)
|
||||
|
||||
#define OPERATION 0 /* first character; + for alloc, - for free */
|
||||
#define BLKSIZE 1 /* block size; 5 digits starting at 2nd char */
|
||||
#define ADDRESS 7 /* sizeof "+12345 " - sizeof "" */
|
||||
#define FILEINFO fileinfo_offset
|
||||
|
||||
#define terminate_fields(a) \
|
||||
a[ADDRESS - 1] = a[FILEINFO - 1] = '\0'
|
||||
#define zero_fields(a) \
|
||||
a[OPERATION] = a[BLKSIZE] = a[ADDRESS] = a[FILEINFO] = '\0'
|
||||
|
||||
static int fileinfo_offset;
|
||||
static struct memblock *firstblock[2] = {0,0}, *blkcache = 0;
|
||||
static long peakmem;
|
||||
static long curmem;
|
||||
static long totaldynmem;
|
||||
static long lineno;
|
||||
static FILE *infile;
|
||||
static char line[255];
|
||||
static const char *infilenm;
|
||||
static int errcount;
|
||||
static int have_template;
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
infilenm = (argc < 2) ? getenv("NH_HEAPLOG") : argv[1];
|
||||
if (!infilenm || !*infilenm) infilenm = DEFAULTNAME;
|
||||
|
||||
infile = fopen(infilenm,"r");
|
||||
if (!infile) {
|
||||
printf("%s not found or unavailable\n",infilenm);
|
||||
quit();
|
||||
}
|
||||
|
||||
while (fgets(line, sizeof line, infile)) {
|
||||
++lineno;
|
||||
doline(line);
|
||||
zero_fields(line);
|
||||
}
|
||||
|
||||
fclose(infile);
|
||||
walkblocks();
|
||||
printf("Peak heap usage was %ld bytes.\n",peakmem);
|
||||
printf("Total heap memory allocations was %ld bytes.\n", totaldynmem);
|
||||
exit(EXIT_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void out_of_memory()
|
||||
{
|
||||
printf("heaputil: out of memory at line %ld of %s\n",
|
||||
lineno, infilenm);
|
||||
quit();
|
||||
}
|
||||
|
||||
/*
|
||||
* Sample:
|
||||
+ 43 6852:0A0A 568 ..\win\tty\wintty.c
|
||||
- 6852:0A0A 1291 ..\win\tty\wintty.c
|
||||
* Description:
|
||||
^ size address line file ^: + => alloc, - => free
|
||||
*
|
||||
* Note: In environments other than MSDOS 16 bit segmented ones,
|
||||
* the address field will just be a single string of digits.
|
||||
*
|
||||
* Parsing:
|
||||
* The operation flag and allocation size are in fixed columns;
|
||||
* the address starts at a fixed offset and its width is expected
|
||||
* to be the same for every entry, but that width may vary from
|
||||
* platform to platform; the line number is a right-justified
|
||||
* 4-digit number separated from the address by one space and
|
||||
* followed after a space by the filename; line+file+newline
|
||||
* are treated as a single unit throughout.
|
||||
*
|
||||
* Only the first line obtained from the file will be scanned
|
||||
* to determine the offsets of the various fields: operation,
|
||||
* size, address, and fileinfo. Subsequent lines are processed
|
||||
* by depositing NUL at the appropriate offsets in the string.
|
||||
* This method seems to be quite fast and avoids complicated
|
||||
* parsing.
|
||||
*/
|
||||
|
||||
static void doline(line)
|
||||
char *line;
|
||||
{
|
||||
if (!have_template) btempl(line);
|
||||
if (line[OPERATION] == '+') chain(line);
|
||||
else if (line[OPERATION] == '-') unchain(line);
|
||||
else {
|
||||
printf("%6ld: invalid operation, badly formatted line.\n",
|
||||
lineno);
|
||||
printf(" -> %s",line);
|
||||
if (++errcount > MAXERR) {
|
||||
printf("Giving up on this file, its not right.\n");
|
||||
quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void chain(line)
|
||||
char *line;
|
||||
{
|
||||
struct memblock *block;
|
||||
int i;
|
||||
|
||||
terminate_fields(line);
|
||||
if (blkcache) {
|
||||
block = blkcache;
|
||||
blkcache = block->next;
|
||||
} else {
|
||||
block = (struct memblock *)malloc(sizeof(struct memblock));
|
||||
if (!block) out_of_memory();
|
||||
}
|
||||
|
||||
block->sequence = lineno;
|
||||
block->bsize = atol(&line[BLKSIZE]);
|
||||
(void)sscanf(&line[ADDRESS], PTR_FMT, &block->address);
|
||||
Strcpy(block->fileinfo, &line[FILEINFO]);
|
||||
if (block->address == 0) {
|
||||
printf("%6ld: allocation of %ld bytes returned null pointer, %s",
|
||||
block->sequence, block->bsize, block->fileinfo);
|
||||
return;
|
||||
}
|
||||
|
||||
i = CHAIN_SELECT(block->address);
|
||||
block->next = firstblock[i];
|
||||
firstblock[i] = block;
|
||||
|
||||
curmem += block->bsize;
|
||||
if (curmem > peakmem) peakmem = curmem;
|
||||
totaldynmem += block->bsize;
|
||||
}
|
||||
|
||||
static void unchain(line)
|
||||
char *line;
|
||||
{
|
||||
struct memblock *block;
|
||||
struct memblock *rmblock = (struct memblock *)0;
|
||||
PTR_TYP address;
|
||||
int i;
|
||||
|
||||
terminate_fields(line);
|
||||
(void)sscanf(&line[ADDRESS], PTR_FMT, &address);
|
||||
i = CHAIN_SELECT(address);
|
||||
|
||||
if (address == 0) {
|
||||
printf("%6ld: attempt to free null pointer, %s",
|
||||
lineno, &line[FILEINFO]);
|
||||
return;
|
||||
} else if (firstblock[i]) {
|
||||
/* special case, first one so no prev available */
|
||||
if (address == firstblock[i]->address) {
|
||||
rmblock = firstblock[i];
|
||||
firstblock[i] = rmblock->next;
|
||||
} else {
|
||||
block = findprev(address);
|
||||
if (block) {
|
||||
rmblock = block->next;
|
||||
block->next = rmblock->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!rmblock) {
|
||||
printf("%6ld: attempt to free unallocated block, %s",
|
||||
lineno, &line[FILEINFO]);
|
||||
} else {
|
||||
curmem -= rmblock->bsize;
|
||||
if (curmem < 0) {
|
||||
printf("%6ld: impossible, current memory use negative, %s",
|
||||
lineno, &line[FILEINFO]);
|
||||
}
|
||||
rmblock->next = blkcache;
|
||||
blkcache = rmblock;
|
||||
}
|
||||
}
|
||||
|
||||
static struct memblock *
|
||||
findprev(maddress)
|
||||
PTR_TYP maddress;
|
||||
{
|
||||
struct memblock *tmpblk, *nextblk;
|
||||
|
||||
tmpblk = firstblock[CHAIN_SELECT(maddress)];
|
||||
while (tmpblk) {
|
||||
nextblk = tmpblk->next;
|
||||
if (nextblk) {
|
||||
if (maddress == nextblk->address) return tmpblk;
|
||||
}
|
||||
tmpblk = nextblk;
|
||||
}
|
||||
return (struct memblock *)0;
|
||||
}
|
||||
|
||||
static void walkblocks()
|
||||
{
|
||||
struct memblock *tmpblk, *nextblk;
|
||||
int i, k;
|
||||
long unfreedmem = 0L;
|
||||
|
||||
/* make a sorted list from all the chains; expected to be short */
|
||||
tmpblk = 0;
|
||||
do {
|
||||
k = 0;
|
||||
for (i = 1; i < SIZE(firstblock); i++)
|
||||
if (!firstblock[k] || (firstblock[i] &&
|
||||
firstblock[i]->sequence > firstblock[k]->sequence))
|
||||
k = i;
|
||||
nextblk = firstblock[k];
|
||||
if (nextblk) {
|
||||
firstblock[k] = nextblk->next;
|
||||
nextblk->next = tmpblk;
|
||||
tmpblk = nextblk;
|
||||
}
|
||||
} while (nextblk);
|
||||
|
||||
while (tmpblk) {
|
||||
printf("%6ld: not freed: %5ld bytes, %s",
|
||||
tmpblk->sequence, tmpblk->bsize, tmpblk->fileinfo);
|
||||
unfreedmem += tmpblk->bsize;
|
||||
nextblk = tmpblk->next;
|
||||
free((genericptr_t)tmpblk);
|
||||
tmpblk = nextblk;
|
||||
}
|
||||
|
||||
printf("Total of %ld bytes not freed before exit.\n", unfreedmem);
|
||||
|
||||
/* free memblock cache */
|
||||
while (blkcache) {
|
||||
tmpblk = blkcache;
|
||||
blkcache = tmpblk->next;
|
||||
free((genericptr_t)tmpblk);
|
||||
}
|
||||
}
|
||||
|
||||
static void btempl(line)
|
||||
char *line;
|
||||
{
|
||||
char *p;
|
||||
|
||||
p = &line[ADDRESS - 1];
|
||||
while (isspace(*p)) ++p;
|
||||
while (*p && *p != ' ' && *p != '\n') ++p;
|
||||
if (*p == ' ') ++p; /* skip first space */
|
||||
fileinfo_offset = p - line;
|
||||
|
||||
++have_template;
|
||||
}
|
||||
|
||||
/*heaputil.c*/
|
||||
Reference in New Issue
Block a user