Commit Graph

20 Commits

Author SHA1 Message Date
Sean Hunt
1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00
Sean Hunt
8b57d96fd2 Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
2015-05-25 09:21:15 +09:00
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -04:00
Sean Hunt
0001534d04 Make REDO unconditional. 2015-02-27 19:33:52 -05:00
Sean Hunt
4f59f5c6fd Make WIZARD unconditional. 2015-02-27 19:33:22 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
nethack.rankin
17ba5651fa PANICTRACE on VMS (trunk only)
The preliminary implementation of PANICTRACE on VMS had a "Fixme"
that this fixes, and a "TODO" that this makes moot, but the main reason
for this patch is that vmsmisc.c had been changed to call vms_define(),
which resides in vmsunix.c.  Since vmsmisc.obj is linked into progarms
in util/ and vmsunix.obj isn't, enabling PANICTRACE caused linking
problems for those.  This moves the code that wants to call vms_define()
into vmsunix.c (despite the fact that it's not even vaguely related to
Unix emulation), so that it only matters to nethack and doesn't impact
the utility programs anymore.

     This uses a VMS facility called LIB$INITIALIZE to call code before
main() starts.  It's rather messy--at least when written in something
other than assembler or Bliss--and shouldn't be needed for nethack,
but I couldn't figure out how to trap the condition signalled by
lib$signal(SS$_DEBUG) when the debugger isn't available to do so, so I
needed a way to make issuing that signal be conditional upon debugger
availability.  One of the arguments passed to LIB$INITIALIZE-invoked
routines contains information that makes if feasible to deduce whether
the debugger is available.

     Even when PANICTRACE is disabled, that's useful for handling abort
due to panic while in running in wizard mode.
2011-09-01 01:47:00 +00:00
nethack.rankin
0b97c1be42 sort of/kind of support PANICTRACE on VMS (trunk only)
I don't think this is useful enough to recommend ordinary users
enable it, but it's close enough to being useful that I don't want
to leave it to become subject to bit rot like umpteen other unfinished
patches.  Anyone running in wizard mode who has a panic already gets
pushed into the debugger on VMS, although it doesn't work for what might
be considered the most important configuration (a secure playground, as
opposed to the wide-open one I've always been content to leave mine at).
2011-04-24 08:16:22 +00:00
nethack.rankin
2228943015 SYSCF for VMS (trunk only)
Enable SYSCF_FILE for VMS, and simplify option initialization
in the process.  I still need to put a template into the playground
directory during initial install, and the one in sys/unix/ probably
isn't appropriate.
2011-04-23 01:51:01 +00:00
nethack.rankin
2f1813cdd8 altmeta Alt key hack, mainly for unix (trunk only)
Some time ago we received a patch submission which attempted to
handle the Alt key for terminals or emulators which transmit two char
sequence "ESC c" when Alt+c is pressed, but I can't find it.  I don't
remember the details but recall that it had at least once significant
problem (perhaps just that it was unconditional, although it may have
been implemented in a way which interferred with using ESC to cancel).

     This patch reimplements the desired fix, making the new behavior be
conditional on a boolean option:  altmeta.  That option already exists
for the Amiga port, where it deals with low-level keyboard handling but
essentially affects the same thing:  whether Alt+key can be used as a
shortcut for various extended commands.  This one affects how the core
processes commands, and is only available if ALTMETA is defined at
compile time.  I've defined that for Unix and VMS; other ports don't
seem to need it.  (I'm not sure whether "options" created by makedefs
ought to mention it.  So far, it doesn't since this isn't something
users are expected to tweak.  The setting of the non-Amiga altmeta
option doesn't get saved and restored, so won't affect saved data if
someone does toggle ALTMETA and then rebuild.)

     When [non-Amiga] altmeta is set, nethack's core will give special
handling to ESC, but only during top level command processing.  If ESC
is seen while reading a command, it will be consumed and then the next
character seen will have its meta bit set.  This introduces a potential
problem:  typing ESC as a command will result in waiting for another
character instead of reporting that that isn't a valid command.  Since it
isn't a valid command, this shouldn't be a big deal, but starting a count
intended to prefix your next command and then typing ESC after deciding
to abort that count runs into the same situation:  nethack will wait for
another character to complete the two character sequence expected for
"ESC c".  There's not much that can be done with this, other than have
the Guidebook mention that an extra ESC is needed to cancel the pending
count, because digits followed by ESC could actually be a numeric prefix
for Alt+something rather than an attempt to abort the count.
2011-04-19 02:02:11 +00:00
keni
df20791e59 Add RCS version lines 2009-05-06 10:45:32 +00:00
nethack.rankin
a675cc6ed7 vms file access
Fix the problem From a bug report.  His system has a logical name "DATA" pointing at some disk, and
when the dlb utility tried to open "data" for inclusion in the library
being built at install time, it attempted to access the wrong thing and
failed.  He then attempted to fix it in a manner which let dlb finish, by
modifying dlb_main.c to append "." to file names that lack a dot, but
then nethack couldn't access "dungeon" in the library because string
comparison didn't match the altered dlb directory entry of "dungeon.".

     NetHack was working around this unintended interaction with the
environment issue in fopen_datafile(), and dlb was doing so for fopen()
but not open().  This moves nethack's fixup out of src/files.c and into
sys/vms/vmsfiles.c, adds another routine there so that both open() and
fopen() are covered, and updates the vms Makefiles so that the various
utility programs all link with vmsfiles.  (The build script vmsbuild.com
puts object files into a library and gets that last bit for free.)
2007-10-28 09:37:56 +00:00
nethack.rankin
a654734476 saved-games menu for vms (1 of 2) (trunk only)
First cut at implementing SELECTSAVED for VMS.  Unfortunately, it only
works by default if the player is using a [probably] shared account called
"games" or "nethack", and displaying a menu of games available to restore
will likely have the side-effect of encouraging other players sharing that
account to steal each others saved games.  To use it with a normal account,
the player has to include "-ugames" or "-unethack" on the command line
(or OPTIONS=name:games in config file) to force the program to reach the
"Who are you?" stage.

     I've added a flag argument to set_savefile_name() so regularization
can be suppressed, allowing it to be used to construct a wildcarded file
specification.  I'm using that for VMS and have attempted to put in place
for WIN32CON, but the latter is not tested.

     The current WIN32CON and UNIX+QT_GRAPHICS methods of collecting save
file names is bug-prone if used on a shared playground directory.  Counting
matching file names first, then allocating memory and retraversing the
directory to copy those names into the allocated memory has a window of
vulnerability where the number of matching files could increase between the
counting and the copying.
2006-12-10 04:46:57 +00:00
nethack.allison
084dce82d0 symbol preprocessing (trunk only)
Clean up the preprocessing associated with the
loadable symbol stuff.

Base it on new LOADSYMSETS, rather than on the
previously existing ASCIIGRAPH preprocessor define.
2006-10-02 13:15:50 +00:00
nethack.rankin
b8ecf9e23e vms update (trunk only) 2006-09-23 04:45:56 +00:00
nethack.allison
c146fe012d housekeeping: mark trunk sources 3.5 (include) 2005-01-02 16:50:12 +00:00
nethack.rankin
f98e7d1fe6 vms version bit (trunk only)
Similar to the branch change; partial version number update for
the vms default build configuration.
2003-12-07 19:10:31 +00:00
nethack.rankin
29f3c6486e vms update
Bring a couple of vms-specific instances of nethack's version number
up to date.
2003-05-20 06:24:46 +00:00
nethack.allison
06528d1002 3.3.2 to 3.4.0 2002-02-04 16:06:00 +00:00
jwalz
b16c845adc *** empty log message *** 2002-01-05 21:05:48 +00:00