Commit Graph

931 Commits

Author SHA1 Message Date
PatR
2e9a2002c4 NH_HEAPLOG vs tile utilities
I just tried to build with MONITOR_HEAP defined in unixconf.h plus
WANT_WIN_X11=1 for make.  tile2x11 wouldn't link.  It doesn't use
alloc() and free(), but it does link with drawing.o, and drawing.o
has calls to free(), so MONITOR_HEAP makes it need nhfree() from
alloc.o.

All the miscellaneous tile utilities seem to link with drawing.o, so
they all need alloc.o too, and that drags in util/panic.o as well.
I've only changed it for Unix where I can actually test the change
but other platforms probably should do this too.  Or we need to redo
drawing.c so that the small subset of stuff utilities want is
separate from the code the core uses for that same stuff.
2016-02-01 17:30:09 -08:00
nhmall
5774804524 typo bit nttty.c 2016-01-31 18:16:13 -05:00
nhmall
37b79d68cd some updates to nttty.c
Changes to be committed:
	modified:   sys/winnt/nttty.c

better attribute support
more functional inverse support
2016-01-31 18:08:03 -05:00
PatR
9d1a3be7d7 revert fix for #H4041 - decl for has_color()
Since the attempted fix for the warning about has_color() being
implicitly declared introduced a worse problem of conflicting
declaration in cases where it's already declared, back that change
out.
2016-01-26 17:39:41 -08:00
PatR
7482be39e8 lev_comp update for older Unix system
Increase the lex paramaters in lev_comp.l and replace use of snprintf
with sprintf in lev_comp.y and lev_main.c.

Also some reformatting for lev_comp.y, but I gave up pretty quickly:
some early tab replacement and adjusting of the spacing for casts.
2016-01-19 16:27:39 -08:00
nhmall
7e52c605a9 Merge branch 'NetHack-3.6.0' into win32-guitty 2016-01-11 18:35:50 -05:00
Pasi Kallinen
fe01018d90 Enable TIMED_DELAY for linux hints files
runmode is completely useless in TTY without this
2016-01-10 15:09:03 +02:00
Alex Kompel
c4bf762ec1 win32_gui: mimic tty interface when "Nethack mode" is selected (remove window features) 2016-01-03 19:52:05 -08:00
nhmall
14ce76a159 windows visual studio 2013 build updates 2016-01-01 22:01:25 -05:00
nhmall
61148f05bb SYSCF_FILE corrections for windows
Changes to be committed:
	modified:   src/files.c
	modified:   sys/share/pcmain.c

Related to #H4170, bz274

The current startup code seeks out the SYSCONFPREFIX using:
	envp = nh_getenv("COMMONPROGRAMFILES");
which is fine and usually translates to something like
"C:\\Program Files (x86)\\Common Files\\
NetHack then tacks on the NetHack subfolder to the path
"C:\\Program Files (x86)\\Common Files\\NetHack\\"

That should always be the definitive location.

However, in the event that there is no SYSCF_FILE actually
located at that system-wide spot (and ONLY in that event),
fall back to a secondary location of HACKDIR for locating
the SYSCF_FILE.

Also, there's some explicit tweaking added for the Microsoft
visual studio compiler debug execution to all a debug
session to correctly locate things. By default, on a
visual studio build, the executables are linked down in
subfolders of the build directory (Release, or Debug,
depending on visual studio build configuration options).
2016-01-01 20:33:14 -05:00
nhmall
4566b2903f windows: PDB files in Debug and Release 2015-12-31 20:16:48 -05:00
Haoyang Wang
efe2ca1f92 create 'games' group from the postinstall script of Mac binary package 2015-12-24 16:14:50 -08:00
PatR
ad838c7e79 fix #H4041 - implicit declaration of has_colors()
_M_UNIX (SCO UNIX) and __linux__ (all flavors of linux?) both call
has_colors() for TTY_GRAPHICS+TEXTCOLOR configuration, but neither
declared it.  The new declaration is just a guess based on usage.
2015-12-23 16:25:06 -08:00
Haoyang Wang
69e1113aa9 fix #H4082: create games group from package postinstall script 2015-12-23 04:53:28 -08:00
PatR
c5e2604cca still more while-helpless 2015-12-18 07:42:23 -08:00
Haoyang Wang
69cfa4b134 set permissions of symbols file in package postinstall script 2015-12-17 06:53:14 -08:00
Haoyang Wang
ad138be8fb use 'macosx.sh editsysconf' to install sysconf 2015-12-17 06:06:20 -08:00
Haoyang Wang
894c751043 added editsysconf command in macosx.sh 2015-12-17 06:06:20 -08:00
Haoyang Wang
bf7a259646 turn off use_darkgray in sysconf 2015-12-17 06:06:20 -08:00
nhmall
fa092f5fe9 housekeeping for 3.6.1
Changes to be committed:
	modified:   Files
	modified:   README
	modified:   dat/history
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   include/global.h
	modified:   include/obj.h
	modified:   include/patchlevel.h
	modified:   src/invent.c
	modified:   src/objnam.c
	modified:   src/shknam.c
	modified:   src/sounds.c
	modified:   src/spell.c
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/nethack.def
	modified:   win/macosx/NetHackGuidebook.applescript
	modified:   win/macosx/NetHackTerm.applescript
	modified:   win/win32/mswproc.c
2015-12-16 17:52:34 -05:00
nhmall
215060219d fix windows bugs H4030 and H4045 (123 and 138)
Changes to be committed:
	modified:   sys/share/pcmain.c
	modified:   sys/winnt/nttty.c
	modified:   sys/winnt/stubs.c

Bug 123 Report 4030:
Minor thing I've noticed - if I quit the game, at the "Hit <Enter> to end."
prompt, if I close the window rather than pressing Enter, I get the following:

Bug 138  - #H4045:
 "nethack -s" leads to "-s is not supported for the Graphical Interface".
 That's wrong.
 (The Graphical Interface comes with "nethackw".)
2015-12-11 23:08:01 -05:00
PatR
ebdfafb42d sys/vms/*.c - mostly reformatting
I'm not sure whether basic formatting cleanup belongs in 3.6.1, but
there are also a couple of strings that got split and require the
implicit concatenation of adjacent string literals introduced with
C89/C90.  The code itself compiles with pre-ANSI compilers, or at
least used to--most of it was developed with one....

Much of it is tabs in comments.  But there was one substantive item:
an obsolete reference to "use 'Q' to Quit" after however many years....
2015-12-10 18:42:27 -08:00
Pasi Kallinen
f4a6ccf3f0 Update sysconf MAXPLAYERS docs a bit 2015-12-10 10:14:24 +02:00
Pasi Kallinen
43550bee53 Allow unlimited number of players
This is important for public servers.  Setting the MAXPLAYERS
sysconf value to 0 (or commenting it out) constructs the lock
files with the player UID and player name, so each player may
have one game at a time.
2015-12-09 22:27:26 +02:00
PatR
bb72860ce2 fix #H4011 - sys/unix/Makefile.top
Some commented make variables for X11 misspelled 'pilemark.xbm' with
bad '.xbm' suffix.

'symbols' was handled strangely, but it still should have been working
during playground installation.  This removes the strangeness but I have
no idea whether it solves #H4015 ('unable to access "symbols" file' for
the Mac OSX binary).
2015-12-08 16:39:39 -08:00
PatR
48f1c6711e update sys/share/{dgn,lev}_lex.c
The HP C compiler for VMS issued a pair of diagnostics for both *_lex.c
files, about an expression of the form (unsigned_var <= 0) maybe not
being what was really intended, and it was right.  Changing that to
'< 1' would have suppressed the diagnostic but left the bug, which was
in code that performed a subtraction and then checked for a negative
result.  It worked in older flex versions when the variables were
signed, but got broken when they were changed to unsigned (no doubt in
respose to gcc complaining about comparing signed and unsigned in some
other spot where one of them was used).

The bug is in flex's original skeleton, so was inherited by our new
custom skeleton.  I've fixed it in the custom skeleton, which means
that sys/share/*_lex.c became out of date even though util/*_comp.l
remain unchanged.
2015-12-08 14:52:01 -08:00
PatR
544315eaac add missing sys/vms/sysconf
SYSCF is enabled by default, but nethack won't run without the required
sysconf file.  sys/vms/install.com expects to find a template one in
sys/vms/sysconf so create that.

Since the tarball will need repackaging, fix a comment typo (dyslexic
spelling of "nymph") in sys/unix/sysconf.  Also, move DEBUGFILES to the
bottom so that more useful entries move up.  And expand the comment for
the PANICTRACE options.
2015-12-06 16:47:20 -08:00
PatR
996c0a3741 unix/Makefile.utl: tweak lex/yacc postprocessing 2015-12-05 23:26:41 -08:00
PatR
c964ae023b sys/share/???_lex.c
Generated with flex 2.6.0 and a new custom skeleton for that version
(which almost certainly won't work with any older or newer version of
flex, but that limitation has no effect on the usefulness of the
generated scanner code).

Function definitions are oldstyle:
  int foo(bar)
    char *bar;
  {...}
rather than ANSI, like nethack's core code.  Advance declarations use
FDECL for prototypes, so should also fit nethack, although the usage
'FDECL(, (arglist))' makes me feel a bit uneasy.  gcc doesn't mind the
omitted first argument but other compilers might not like it.

The system headers (stdlib.h and a few others) that flex has been
insisting on including are gone (with this skeleton).  It starts out
including "config.h" and that header has the responsibility for any
definitions and declarations necessary.  That shouldn't be a big deal
since config.h -> XXXconf.h -> system.h is what we're already relying
on for everything else, but it does need testing for any configuration
that uses sys/share/{dgn,lev}_{lex,yacc}.c.

I'll be checking the skeleton into the NHinternals repository after
adding some documentation, but I'm wondering whether it should really
become part of the source distribution.
2015-12-05 23:02:35 -08:00
nhmall
6cfa4bbbe5 lev_yacc and lev_lex from master 2015-12-04 07:57:35 -05:00
nhmall
eed4549f53 'pull' prebuilts from master into release branch 2015-12-04 07:46:21 -05:00
nhmall
786ac8abe6 'Merge' prebuilts from master 2015-12-03 04:23:53 -05:00
nhmall
8bd70be165 windows build without DEBUG defined in global.h
Changes to be committed:
	modified:   include/global.h
	modified:   sys/share/pcmain.c
	modified:   win/win32/mswproc.c
2015-12-02 23:19:04 -05:00
Pasi Kallinen
c20638938e Update precompiled lev_comp lex and yacc files 2015-12-02 18:33:44 +02:00
PatR
abf997994c From KevinS: update sys/vms/install.com
Include a template sysconf file when setting up the playground directory.
TODO: provide a sys/vms/sysconf template sysconf file....
2015-12-01 17:50:40 -08:00
PatR
918ed61d9f From KevinS: sys/vms/Install.vms
This could use a bit of reformatting.  I stripped off trailing spaces
from a handful of lines but otherwise have kept it as is since the
formatting issue is minor.
2015-12-01 01:49:36 -08:00
PatR
fc92770cf7 lexing updates (sys/unix/Makefile.utl)
Change the 'make' rules for *_lex.c, *_yacc.c, and *_comp.h to put
the end files names into whatever #line directives that refer to
the generated names (lex.yy.c, y.tab.c, y.tab.h).  This should not
produce any change in behavior during compilation except to provide
more accurate specifications of where any warnings or errors occur.

Add a 'make dist' target that copies generated scanner and parser
files to sys/share.  (As mentioned in the previous patch, I haven't
committed any of those since I have different versions of flex and
also of bison.)
2015-11-28 03:46:33 -08:00
nhmall
d46a80b1c5 nmake Makefile updates 2015-11-19 23:12:20 -05:00
nhmall
93cd299b69 nmake output status messages
Changes to be committed:
	modified:   sys/winnt/Makefile.msc

I've noticed odd output from some of the echo statements
used in the Microsoft nmake Makefile before, but never
bothered to investigate why.

Pat observed that it was due to conversion of \t
in the path that resulted from expansion of the target
macro $@

This change uses the macro character substitution
feature to convert the back slashes to forward slashes
in the message, making the quirky conversion go away.
2015-11-19 22:35:49 -05:00
nhmall
7d23420314 another typo 2015-11-19 19:36:14 -05:00
nhmall
b6ce68865a typo fix and some elaboration
Changes to be committed:
	modified:   sys/winnt/Install.nt
2015-11-19 19:28:39 -05:00
nhmall
43628124a4 Windows build updates 2015-11-19 18:57:17 -05:00
nhmall
889f600aa8 Windows x64 Makefile build work 2015-11-19 07:58:58 -05:00
nhmall
014856397b undo unintended default build architecture change
Changes to be committed:
	modified:   sys/winnt/Makefile.msc

Previous patch altered more than intended.
2015-11-18 23:12:39 -05:00
nhmall
d41e4d5ab4 Ensure VS2013 64-bit compiler drops to warning level -W3
This doesn't fix the cppregex.cpp issue. This just eliminates
about 10,000 warnings.
2015-11-18 22:41:30 -05:00
PatR
493027cbc8 sysconf update
Add missing 'sysconf' to sys/unix/ and sys/winnt/ sections of Files.

Update sys/unix/sysconf; I started out just to remove the duplicate
DEBUGFILES entry but ended up expanding several of the comments too.

Also, fix a typo in the vms build/install instructions.
2015-11-18 18:07:35 -08:00
Haoyang Wang
70aa7fe818 Merge branch 'master' into mac-build-tty-pkg 2015-11-18 13:23:35 -08:00
PatR
5e5a78fdb2 X11 pilemark.xbm
Update the unix Makefiles and the older OSX hints files to handle the
pile marker tile overlay.  I didn't touch hints/macosx10.10 and .11
since I think there's still a merge for them pending.

A couple of formatting tweaks for bemain.c are included, for no
compelling reason.  What are the odds that anyone will every build
that again?
2015-11-18 03:04:35 -08:00
PatR
1fb9de1375 unix/Makefile.utl typo
Confusing build failure, explained by a typo in sys/unix/Makefile.utl.
dgn_lex.o didn't get rebuilt after modifying unixconf.h to take out
the #define MONITOR_HEAP I had in place, resulting in link failure for
dgn_comp because the old object file was referencing 'nhalloc' rather
than 'alloc'.  dgn_lex.o accidentally didn't care about modifications
to config.h and the other headers that pulls in, such as unixconf.h.

This typo was already present when the last cvs repository was
initialized nearly 14 years ago.
2015-11-17 03:09:20 -08:00
Pasi Kallinen
b2ab8f2504 Update precompiled lev_comp lex and yacc files 2015-11-15 09:09:45 +02:00