move the custom color data into its own field in the glyphmap
and disassociate it from the unicode/utf8 stuff.
move the glyphcache stuff during options processing and parsing
into new file glyphs.c and out of utf8map.c, and make it
general, and not part of ENHANCED_SYMBOLS.
Do the groundwork for allowing glyph color customizations to
work when any symset is loaded and not restrict it only to
the enhanced1 H_UTF8 symsets.
The customizations in effect are still affiliated with a particular
symset.
Also closes#1224, but the PR itself references a data structure
made obsolete by this commit. The curses comment from the PR was
added into the code.
The PR also made several suggestions, but only the first
one has been included in this commit (and no longer based on
the handler), that being:
"allow defining colors if other symbol handling modes are used
(possibly limited to the standard 16 colors)."
FredrIQ also wrote the following suggestions in PR#1224:
Something I was also contemplating, unrelated to implementation of this
support in curses, would be the ability for the following:
allow defining colors if other symbol handling modes are used (possibly limited to the standard 16 colors)
allow defining attributes (for example: glyph:G_pet_female_kitten:U+0066/red/underline)
allow specifying glyphs as wildcards for defining global color/attribute changes
Something I also want to see are keywords for "don't change the current defined data". If this
were to be added, you could for example do this:
OPTIONS=glyph:G_*_fox:U+0064/blue
OPTIONS=glyph:G_statue_*:basechar/gray/underline
for "make all foxes use a blue color, make all statues gray with underline" without needing
to specify the relevant character for every statue. This ("basechar", "basefg", etc)
should perhaps also be added for MENUCOLORS and statushilites, so that you can, for
example, underline all items being worn without needing to specify a bunch of
near-duplicate rules for combining BUC colors + underline worn items
as per #1064
new .h files: hacklib.h selvar.h stairs.h
new .c files: calendar.c, getpos.c, report.c, selvar.c, stairs.c,
strutil.c, wizcmds.c
cleanup of hacklib.c and mdlib.c
hacklib contains functions that do not have to link with the core
relocate wiz commands from cmd.c to wizcmds.c
relocate CRASHREPORT stuff to report.c
relocate getpos stuff from do_name.c to getpos.c
remove temporary struct definition from extern.h
cross-compile PRE-section split into cross-pre1.370 and cross-pre2.370
Windows sys/windows/Makefile.nmake and sys/windows/Makefile.mingw32 and
visual studio project file updates
Unix sys/unix/Makefile.src, sys/unix/Makefile.utl
populate selvar.c and selvar.h
build on MS-DOS (not cross-compile) Makefile updates
for sys/msdos/Makefile.GCC (untested)
vms updates for above (untested)
Get rid of vis_tab.{c,h}, also the commented out remnants of
{dgn_comp,lev_comp}.*, and put back sfstruct.* that erroneously
got removed along with some other stuff way back when.
Untested, and the lua stuff needs to be modularized.
Preparation for moving enlightenment and conduct into new source
file insight.c. Right now it's a stub that shouldn't break anything
whether included or omitted. Once makefiles and project files have
been updated to compile and link it, the actual code will be moved.
unix/Makefile.src has been updated;
vms/Makefile.src and vmsbuild.com have been updated but not tested.
A copyright header inserted last spring uses the wrong format for a
DCL comment and triggers a couple of warnings about invalid commands.
Some linker hackery added a long time ago draws complaints from the
linker on IA64. This was noticed during the release cycle for 3.6.0
but then went unaddressed.
Apparently I exited emacs without saving and the revised vmsbuild.com
ended up as a backup file that 'git nhadd' wouldn't see. This was
supposed to be included in the patch committed several hours ago....
First reported two years ago, then again this week by someone else
who didn't go through the web contact page (so no new #H number or
bugzilla entry). Using vmsbuild.com to build on VAX complains about
not being able to resolve a bunch of functions--it's basically
trying to build the full program using only the code supplied by
sys/vms/vmsmain.c. The original report mentioned a workaround and
was also dealing with a second issue (already fixed post-3.6.0) that
I incorrectly guessed was responsible for the linking problem. This
report had the correct linker magic to fix the linking issue.
I'm still not sure whether the order of /Library and /Include after
the name of an object library file on a LINK command line matters.
In a linker options file, which vmsbuild.com constructs and uses,
/Include needs to come first so that the contents of the library are
searched after the explicitly included object modules are processed.
Building with the Makefiles (using DEC's MMS or some versions of
freeware MMK) doesn't collect the object files into a library so was
never affected by this. And the linker options ordering issue is
apparently specific to the VAX/VMS linker; vmsbuild.com run on Alpha
and on IA64 linked 3.6.0 successfully without this fix.
Update vms/install.com (rather than Makefile.top) to install the new
data file for the 'whatdoes' command.
Also, the 3.6.0 distribution puts version number 3.5.0 into vms
binaries (all the programs, not just nethack itself). It's something
observable with native tools without running the program, nothing to
do with nethack's 'v' command which gets its version number from
patchlevel.h via makedefs.
Update the command procedure that can be used to compile and link
everything. The sys/vms Makefiles still need updating.
I added 'tribute' to the command procedure used to create and populate
the plaground directory but am not able to test it.
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.
I hadn't tried the build script vmsbuild.com in a long time....
vmsbuild.com wasn't compiling src/sys.c;
vmsbuild.com and Makefile.src+Makefile.utl had some linking discrepancies;
Makefile.top, Makefile.dat, Makefile.doc - replace old SCCS id/date/rev
comment with current cvs one (done for .src & .utl a month or so back);
config1.h - running DEC C in VAX C compatability mode to test linking
yielded a diagnostic about signed in the schar typedef for every file.
The fix for #H1409 a couple of days ago included updates for
sys/vms/Makefile.* but not vmsbuild.com. I thought the latter didn't
need any, but was mistaken; vmsfiles.c needs to be compiled early in
order for vmsfiles.obj to be present in the object library when makedefs
gets linked.