Commit Graph
1346 Commits
Author SHA1 Message Date
nhmall f53d02f0bb Windows build bit 2019-01-28 09:44:35 -05:00
Patric Mueller bd730dbcaa workaround for C89 not supporting inline 2019-01-28 15:00:04 +01:00
nhmall c1327142b5 detect DEV_RANDOM fopen failure and fall back, noting it in paniclog 2019-01-28 10:32:57 +01:00
nhmall 0aa4d62a2c detect rng seed strength at runtime based on algorithm not compile time based on platform features 2019-01-28 10:32:57 +01:00
nhmall 0a430cab11 every platform provides sys_random_seed() and SYS_RANDOM_SEED goes away 2019-01-28 10:32:57 +01:00
nhmall 6c114640f5 some system-specific adjustments for RNG routines
move some system-specific seed-related stuff from hacklib.c to
a system-specific source file and #define SYS_RANDOM_SEED to
utilize it during build.

Windows changes for random seed generation using
crypto next gen (CNG) api routines.

Corresponding vms changes due to disentangling of VMS and
unix when the unix seed bits got moved (untested).
2019-01-28 10:02:08 +01:00
Patric Mueller f9433b2a87 integrate isaac64 into nethack
Also removed the float code from isaac64 as they are not used in
NetHack.
2019-01-28 10:02:08 +01:00
PatR d63c9d866c band-aid for #H4041 - build warning: has_colors()
Since no one has come up with a better fix for has_colors() being
implicitly declared, add a hack for suppressing a compiler complaint
about has_colors() on linux and/or sco unix that use sufficiently old
<curses.h>.

Report was right after release of 3.6.0 but my fix at the time broke
compile when using more recent <curses.h>.
2019-01-24 15:25:50 -08:00
Pasi Kallinen 749fb2e222 Fix make tileutils failure
OALLOC was used twice
2019-01-23 18:17:52 +02:00
nhmall a6c290399b Windows warning fix 2019-01-19 11:04:26 -05:00
nhw_cron 94aecd5ca0 This is cron-daily v1-Dec-30-2019. levcomp updated: sys/share/lev_comp.h sys/share/lev_yacc.c 2019-01-01 17:19:21 -05:00
nhw_cron a2649ae879 This is cron-daily v1-Dec-30-2019. dgncomp updated: sys/share/dgn_comp.h sys/share/dgn_yacc.c 2019-01-01 17:19:11 -05:00
nhmall c2777860e9 incorrect header 2018-12-30 22:02:42 -05:00
PatR 3cc4db7950 Unix Makefile
Separate the compiler flags used for compiling X11 code from the rest
of CFLAGS.  Affects hints/macosx10.8 and later.

Add an explicit output argument to the generated compile rules.
2018-12-30 17:39:56 -08:00
nhmall 83e8033f72 remove curses date.h dependency in Windows Makefiles 2018-12-30 07:58:39 -05:00
PatR d418008b31 curses splash/copyright screen, role prompt
Back out '#include "date.h"' so that cursinit.c won't be recompiled
every time any other file(s) need to be compiled.  It doesn't need
patchlevel.h either.  There is already a straightforward way to fetch
the copyright banner lines from version.c.

The splash screen (ascii art spelling "NetHack" preceding the normal
copyright lines) was invisible when showing white text on white-ish
background.  Make it honor !guicolor.

"Shall I pick a character's role, race, gender and alignment for you?
 [ynaq] (y) " was too wide to accept the answer on the same line on
an 80-column display so "(y) " was placed on the second line.  That's
constructed in the core; change the construction to omit " a" when
using "character" rather than a role name.  (tty shortens it by omitting
the default " (y)"; with " a" gone, it could revert to normal prompt.)

Also a bit of lint cleanup and some reformatting of cursinit.c....
2018-12-29 18:38:30 -08:00
nhmall eed7c4bdd1 nttty topten output processing
switch back to using the safe routines
after tty port exits on Windows console
tty port.

Fixes H7758
1613
2018-12-29 12:26:33 -05:00
PatR 5882832ef0 X11 on OSX
The change to Makefile.src for X11+XPM on linux broke linking X11 on
OSX.  This updates the hints files (except for the -qt one) so that
 make WANT_WIN_X11=1
and
 make WANT_WIN_X11=1 USE_XPM=1
work correctly.

The comment in macosx10.14 about what version(s) it's intended for
and been tested on is just cloned from 10.10 and should be updated.
2018-12-29 03:28:07 -08:00
Pasi Kallinen 6ac681b5fa X11: default to XPM-format tile file and rip screen
People have been wondering how to change the tiles on the X11
version, and the old default of NetHack-specific binary tile data
isn't directly editable with image editing tools.

Also show in the #version info if xpm and graphic rip are enabled.
2018-12-29 07:19:24 +02:00
nhmall fc504dfa89 yet more Windows Makefile
Now that the dependency lines are corrected for the
correct output files in the Makefile, it revealed a
dependency on a non-existent file.
2018-12-28 12:51:11 -05:00
nhmall be67656932 More Windows Makefile corrections 2018-12-28 12:34:41 -05:00
nhmall 1cdb9c561c Windows Makefile updates 2018-12-28 12:29:12 -05:00
Patric Mueller 19f0a2d3ba Fix missing compilation dependency for cursinit.c 2018-12-28 15:21:33 +01:00
nhmall a2296d043f eliminate sys/share/pcsys.c from Windows build
Windows build was actually only using a single function
in there, so just add a similar function to sys/winnt/winnt.c
and eliminate the need for including sys/share/pcsys.c in
the build.
2018-12-19 06:43:00 -05:00
nhmall ac1f5feb2c update .gitattributes for recent changes 2018-12-18 17:09:52 -05:00
nhmall 42d9af1b23 don't show stubs in window port valid list 2018-12-15 23:11:52 -05:00
nhmall 1b1ea19e57 comment out PDCurses bt default again 2018-12-15 22:04:55 -05:00
nhmall 1b0719a8cc Makefile.msc update
Tell people where to find the latest PDCurses git
repository
2018-12-15 21:52:00 -05:00
Patric Mueller 7d15535923 Fix always trapped castle chest 2018-12-15 22:40:30 +01:00
nhmall be9d974c4d Makefile.msc update 2018-12-15 02:17:15 -05:00
nhmall 16cda0882c fix up PDCurses cursor placement for prompts 2018-12-14 23:08:41 -05:00
nhmall b71df7b144 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-13 21:25:34 -05:00
nhmall bdae51503c stale dependency 2018-12-13 20:21:26 -05:00
nhmall 5e37d5b5d4 commented out by default 2018-12-13 20:11:03 -05:00
nhmall 36d27b11bd pdcurses expected objs
Match the required curses obj's in most recent updates from
git clone https://git.code.sf.net/p/pdcurses/code pdcurses
2018-12-13 20:07:22 -05:00
Bart House 0cd50847fb Changes to get fuzzer working in NetHackW. 2018-12-12 21:46:14 -08:00
nhmall 5f21dd1308 fix apparent copy and paste error 2018-12-10 18:01:43 -05:00
nhmall 56dc7e150c allow a deferred windowport init during options processing
When options processing encountered OPTIONS=windowtype:X,
the code would immediately attempt to switch over to that
windowtype right in the midst of options processing.

This stores the chosen option into
chosen_window[WINTYPELEN]
thus allowing the startup code to choose it after
options processing has been completed.
2018-12-10 00:44:18 -05:00
Bart House 04d3be930b Changes to font size and vary_msgcount options for Windows nethack ports. 2018-12-09 14:37:07 -08:00
nhmall 46d2724f58 some early startup adjustments 2018-12-09 13:09:30 -05:00
nhmall cb191e6a0e more windmain 2018-12-09 10:14:19 -05:00
nhmall f706ba094c clean up some tear-down
Windows continued to use function pointers belonging
to particular window ports that were still assigned
even after that port (tty) had gone through its
shutdown procedures when requested by the core.
Fix that and return to the minimal function pointers
that are not part of any of the actual WindowPorts.
2018-12-08 23:04:53 -05:00
nhmall 8d516d4358 clean up Windows exit routines 2018-12-08 22:34:50 -05:00
nhmall 01625455d9 more startup tweaking for Windows 2018-12-08 21:17:34 -05:00
nhmall 4d2abbe23f Makefile.msc bit 2018-12-08 20:11:25 -05:00
nhmall a9342107c8 relocate safeproc.c from sys/share to win/share 2018-12-08 20:09:58 -05:00
nhmall b853c6a75b Makefile.msc update 2018-12-08 18:45:48 -05:00
nhmall dc1e2da359 Windows startup modifications
Changes to be committed:
	modified:   include/winprocs.h
	modified:   src/options.c
	modified:   sys/share/pcmain.c
	new file:   sys/share/safeproc.c
	modified:   sys/winnt/Makefile.msc
	modified:   sys/winnt/stubs.c
	new file:   sys/winnt/windmain.c
	modified:   sys/winnt/winnt.c
	modified:   win/win32/vs2017/NetHack.vcxproj
	modified:   win/win32/vs2017/NetHackW.vcxproj
	modified:   win/win32/winhack.c

Because multiple window ports are supported on Windows
now, even in the same executable and selectable via
config file in some cases, some adjustments became
necessary. There will likely be some further refining
of this over the next day or two.

List of changes:

Move Windows startup from sys/share/pcmain.c and
into its own sys/winnt/windmain.c so that it can
be modified to fix some current breakage, and
allow altering the order of some things.

There is startup processing code that is common to
all of the Windows WindowPorts, but that startup
processing code needs to have no dependency on
any one of those WindowPorts.

Yet, during startup processing, some of the initialization
routines can end up calling NetHack functions that
expect an active Window port underneath, and if there
isn't one, routines like pline, impossible, panic can
end up invoking null function pointers.

Place a new file sys/share/safeproc.c, in which a complete
window port is available for early startup processing
purposes. It's WindowPort name field is set to
"safe-startup" just for reference.  The prototypes in
include/winprocs.h require that SAFEPROCS be

Usage:

 windowprocs = get_safe_procs(0);
initializes a set of winprocs function pointers that ensure
none of the function pointers are left null, but that's all it does.

 windowprocs = get_safe_procs(1);
initializes a set of winprocs functions pointers that ensure
none of the function pointers are left null, but also
provides some basic output and input functionality using nothing
other than C stdio routines (no platform or OS specific code).

The conditional code related to WIN32 has been removed from
sys/share/pcmain.c

The code common to all of the Windows WindowPorts calls
get_safe_procs() almost immediately to ensure that
there is a set of WindowPort winprocs available.
2018-12-08 17:56:20 -05:00
nhmall dc2539701a Revert "some fixes provided from Hardfought"
This reverts commit ab9e28d1aa.
2018-12-04 11:59:41 -05:00
nhmall ab9e28d1aa some fixes provided from Hardfought 2018-12-04 11:58:05 -05:00