Commit Graph

2508 Commits

Author SHA1 Message Date
nhmall
8b821d0e00 follow-up for Lua mirror target
Use a variable
2023-12-09 12:11:27 -05:00
nhmall
70c21cda51 alternative make target using Lua's mirror
In the rare event that

        make fetch-lua

is not working because the primary Lua site is not available,
provide another target

        make fetch-lua-mirror

that uses the official lua mirror site documented at:
     https://www.lua.org/mirrors.html
2023-12-09 12:07:00 -05:00
nhmall
7259ae21f5 initializer fix for !VIRTUAL_TERMINAL_SEQUENCES
For windows sys/windows/consoletty.c.

Resolves #1169
2023-12-08 13:01:52 -05:00
nhmall
fc4f0a603d Merge branch 'vesa-fixes' of https://github.com/chasonr/NetHack into NetHack-3.7 2023-12-07 10:07:24 -05:00
nhmall
e639c4bdaa A recent patch 634f4928 introduced new tty behavior,
where calling term_start_color(NO_COLOR) would have the same
effect as calling term_end_color().

That change only included a change for termcap, but not any of
the NO_TERMS configurations. (NO_TERMS is defined for an
implementation where termcap is not used).

This attempts to make sys/msdos/video.c and sys/windows/consoletty.c
honor the change.

The msdos change has not yet been tested.

No attempt was made to alter the term_start_color() implementations
within the outdated tree.
2023-12-07 09:34:05 -05:00
Ray Chason
1f52205ee2 Fix crashes and weirdness in VESA text mode 2023-12-06 09:05:23 -05:00
nhmall
370b8b2afb update tested versions of Visual Studio 2023-12-03 2023-12-03 02:22:14 -05:00
nhmall
5dd12fdc83 mandoc follow-up 2023-11-29 00:40:48 -05:00
nhmall
05c720bf9d more macOS make manpages follow-up 2023-11-29 00:11:04 -05:00
nhmall
dc7685f33c update MANDIR for macOS 2023-11-28 23:58:51 -05:00
nhmall
cbeb8a51a3 some macOS doc updates
Allow 'make USE_MANDOC=1 distrib' to be used for generating
the doc/*.txt files for systems that have mandoc and may not have groff.
(macOS Ventura doesn't include groff in the OS).
USE_MANDOC=1 is not restricted only to macOS.

Have hints/macOS.370 specify the /usr/share/man/man6 directory for the macOS
man pages, so that 'make manpages' will target the correct directory on
that platform.
2023-11-28 23:44:23 -05:00
nhmall
571de1528d some doc updates
add a 'distrib' target to the top level Makefile so that the
distribution doc/*.txt files can be created via 'make distrib'
from the top directory.  It utilizes the existing 'distrib'
target in the doc/Makefile.

Have hints/linux.370 specify the correct directory for Linux
man pages of /usr/share/man/man6, so that 'sudo make manpages'
works on that platform,
2023-11-28 22:49:31 -05:00
nhmall
521af751f3 more issue #1153
Some changes to achieve the following MAN2TXT commands...

If groff version is 1.23 or greater:
nroff -man -Tascii -P -cbou

If groff version is less than 1.23:
nroff -man -Tascii -c | col -b

If non-groff nroff:
nroff -man | col -b

Closes #1153 again.
2023-11-28 17:00:28 -05:00
nhmall
c8f4ad907f more MAN2TXT follow-up
Following a commit for Issue #1153, g-branden-robinson commented:
> Mac OS X stayed on _groff_ 1.19.2 for over a decade (presumably due to
> _groff_ 1.20 adopting to GNU GPLv3), until finally dropping _groff_
> altogether for macOS Ventura (2022).
>
> There _has_ been an interface change in that time.  The [`-P` option I
> advised about is new to _groff_ 1.23.0 (July 2023)]
> (https://git.savannah.gnu.org/cgit/groff.git/tree/NEWS?h=1.23.0#n86).
> [...]
>
> There is a significant number of _groff_ users via Homebrew (enough that
> we hear from them occasionally via bug reports).  Some of these have
> upgraded to 1.23.0 via that mechanism.
> [...]
>
> `nroff -` is not necessary with any _nroff_ known to me; like many other
> Bell Labs Unix programs, it reads from the standard input stream by default
> if not given any operands.

Action taken:

1. Remove the unnecessary ' -' from the nroff command in Makefile.doc.
2. In the misc.370 file containing make snippets to include, test whether
   groff >= 1.23, and only insert the -P option for 1.23 or greater.
2023-11-28 08:00:14 -05:00
nhmall
8a4a964ff1 minor typo fix in a comment 2023-11-27 17:54:16 -05:00
nhmall
2873706c84 hints name change and doc/Makefile
rename hints/include/multiw-3.370 to hints/include/misc.370

keep the portable nroff options in sys/unix/Makefile.doc,
and relocate the non-portable bits to a variable defined
in sys/unix/hints/include/misc.370

This assumes that the groff options are compatible between
Linux and macOS implementations of groff.

If that turns out not to be the case, this bit:

    ifneq "$(NROFFISGROFF)" ""   # It's groff
    # add the groff-specific plain text flags
    MORE_MAN2TXT_FLAGS += -Tascii -P -cbou
    endif

should relocate from sys/unix/hints/include/misc.370
to sys/unix/hints/linux.370 and sys/unix/hints/macOS.370,
immediately following the inclusion of misc.370, and the
appropriate platform-specific groff options can be
adjused in whichever of those appropriately needs it.

Closes #1153
2023-11-27 17:44:02 -05:00
nhmall
e0dd6a916a CROSS_TO_WASM bits 2023-11-26 22:52:46 -05:00
PatR
5bf8b3de6b doc/{dlb,makedefs,nethack,recover}.txt update
Rebuild doc/*.txt (other than Guidebook) with 'nroff -man -c -Tascii'
rather than just 'nroff -man' to prevent it generating non-ASCII
characters for hyphen, aprostrophe, single and double quotes, long
dash, possibly others.  Also preprocess with '--grep-define ALLDOCS'
so that a few parts of the text don't end up being specific to the
local configuration.

The next time they're rebuilt they'll probably be subject to the
ping-pong effect of inserting padding spaces for justification
(alternating right-to-left vs left-to-right as intended but starting
with different parity so lots of gratuitous changes) since my quite
old version of groff triggers that for Guidebook.txt.
2023-11-23 17:24:33 -08:00
nhmall
04082a2033 Remove TEXTCOLOR build option 2023-11-22 16:01:58 -05:00
nhmall
28a4afb3bb remove redundant assignment in macOS.370 and linux.370 2023-11-21 10:26:17 -05:00
nhmall
0915626964 remove a (now) unnecessary line from Makefile.check 2023-11-21 10:23:57 -05:00
nhmall
74340e0de5 follow-up to Makefile out-of-date checking
linux.370 and macOS.370 pass the name of the hints file
and the list of included files, that they use, to Makefile.check.

The name of the hints file is in variable HINTSFILE, the
definition of which is now inserted by setup.sh

The list of hints include files is in variable HINTSINCLFILES.
2023-11-21 10:18:24 -05:00
nhmall
7e3398c85d macOS follow-up 2023-11-20 22:18:35 -05:00
nhmall
4a08f20090 do the Makefile checking using make itself 2023-11-20 22:14:22 -05:00
nhmall
4c9d5a752a more follow-up 2023-11-20 16:19:54 -05:00
nhmall
2f167a4672 allow clean build without using -Wno-missing-field-initializers 2023-11-20 14:25:09 -05:00
nhmall
983000618c another general-pre.370 follow-up 2023-11-20 11:53:58 -05:00
nhmall
90c08ab6d3 follow-up to general-pre.370 change 2023-11-20 11:07:32 -05:00
nhmall
3fc24d937b inform the builder if their Makefiles need updating 2023-11-20 10:48:31 -05:00
nhmall
5c8b36e95a Revert "don't build in support for obsolete makedefs options"
This reverts commit 13f49bdd92.
2023-11-19 17:36:25 -05:00
nhmall
13f49bdd92 don't build in support for obsolete makedefs options
unless OLD_MAKEDEFS_OPTIONS is defined during the compile of makedefs.c
2023-11-19 10:05:01 -05:00
nhmall
11ad859c4c nothing actually depends on options anymore 2023-11-18 19:21:54 -05:00
nhmall
657d0f6105 fix an incorrect ESC sequence (cut and paste err) 2023-11-15 21:19:02 -05:00
nhmall
a08b2e254a get rid of a warning during our pdcursesmod build
../lib/pdcursesmod/dos/../common/dosutil.c:36:15: warning: comparison of integer expressions of different signedness: 'long int' and 'long unsigned int' [-Wsign-compare]
   36 |     while( ms > MAX_NAP_SPAN)
      |               ^

It isn't something that we can actually resolve within NetHack,
so just suppress the submodule build warning.

This commit will trigger the CI to carry out a test of the build.
There could be some follow-up after the results.
2023-11-15 13:28:50 -05:00
nhmall
c85900320c fetch dos extender from a different location
CI was having difficulty connecting
2023-11-15 12:33:07 -05:00
Pasi Kallinen
f74f7988ff MSDOS: implement valid location highlighting
... for VGA and VESA tiled map.
2023-11-13 12:40:10 +02:00
nhmall
47bca92e6c follow-up Install.dos: consistent sample dir path 2023-11-11 12:27:03 -05:00
nhmall
7b2bf56f40 update Install.dos 2023-11-11 12:01:28 -05:00
Michael Meyer
b993edca74 Follow-ups on EXPLORERS authorization
I realized that failed explore-mode authorization on a special-mode
saved game cannot downgrade the game mode further down to a normal game,
because this would dump the player back into a state where she has
completed some part of the game in explore mode but is eligible for the
topten list.  This is even more true when the game was formerly a
wizard-mode game.  Unforunately, that was the state my previous commits
left the game in.

Instead, if restoring an explore-mode or wizard-mode savegame, and the
player is authorized via sysconf for neither of those modes, fail
restoration entirely and start a new game instead.  That's sort of
clunky and there could probably be more explanation provided, but it
should be an exceedingly rare occurance and I'm not sure what
alternative exists that would still honor the EXPLORERS and WIZARDS
restrictions.  This shouldn't affect the way they default 'down a mode'
in other circumstances, i.e. the overwhelming majority of situations in
which EXPLORERS authorization is needed/checked.

For the same reason, I realized that the player can't be prompted
whether or not to enter explore mode, if being downgraded from a
no-longer-authorized wizmode save while explore mode is authorized.  The
change from wizard mode to explore mode must be mandatory.  I have also
switched that up so that it will force the change -- unfortunately, this
has the side effect of allowing the preservation of the save, but it's
more important to make sure a wizard mode game doesn't get reverted to
normal mode.  They won't be able to load the save into wizard mode
anyway.
2023-11-07 15:38:10 -08:00
Michael Meyer
1e237e4b8f Fix: shunt to explore mode after wizmode auth fail
If an unauthorized player requests the game launch in wizard mode, it
will try to put her in explore mode instead.  If this happened during
restoration of a previous (normal) saved game, the setting of discover
in wd_message() would bypass iflags.deferred_X, allowing the player to
select to keep the non-explore-mode save file.  [Actually, when I tested
it I always got an error when answering yes to the "keep the save file?"
prompt, but that's a problem too...]  Because deferred_X was still 1
after this, the pline "You are already in explore mode" would also be
printed following the prompt (when moveloop_preamble() attempted to set
explore mode).

Fix this so that loading a normal game with -D, then failing the
authorization, boots into explore mode via iflags.deferred_X and the
"really enter explore mode?" prompt, as it would have if -X were
specified on the command line to begin with.
2023-11-07 15:38:10 -08:00
Michael Meyer
85b727c92c Apply sysconf EXPLORERS restriction on startup
The sysconf EXPLORERS list restricting access to explore mode was being
evaluated and used when a player used the #exploremode command in-game,
or when specifying -X or OPTIONS=playmode:explore on the command line
when resuming a normal game, but not when starting an entirely new game.
When SYSCF is avilable, check for authorization early, similar to debug
mode authorization, to restrict access to explore mode to EXPLORERS
under (hopefully) all circumstances.
2023-11-07 15:38:08 -08:00
Michael Meyer
4f405b77ce Remove pw check in authorize_wizard_mode
Now that CHECK_PLNAME is a sysconf option, it can be possible to
authorize wizard mode even if get_unix_pw() fails to return the user's
login name, so I think the call to check_user_string() should go out
either way in case that's what's happening.
2023-11-07 15:38:08 -08:00
G. Branden Robinson
363f8db139 Use *roffier method of producing Guidebook.dat
doc/Gbk-1pg-sfx.mn is already using one half of a sound technique: set
the page length to a very large value, guaranteed to overshoot the
vertical space required by the document's text.  The other half is to,
at the end of the document, set the page length to the current vertical
position, so that it ends immediately.

https://www.gnu.org/software/groff/manual/groff.html.node/Manipulating-Spacing.html
2023-11-06 14:43:50 -06:00
G. Branden Robinson
9a96e0a198 Fix *roff string usage nit
String definitions were being used with a pointless leading double
quote.  This syntax is used only to define strings containing leading
space characters.  (You might also use it defensively if you're defining
one string whose contents start with the interpolation of another, and
the latter might interpolate leading space--but that is not the case
here.)

Remove unnecessary leading quotes from string definitions.

* doc/Guidebook.mn: Do it.  Also annotate empty strings with comment.
* sys/unix/hints/include/gbdates-post.370: Don't put them back.

https://www.gnu.org/software/groff/manual/groff.html.node/Strings.html
2023-11-06 14:43:34 -06:00
PatR
1b04533b35 fix #4027 - unix command line parsing bug
'nethack --show' is rejected, which is ok, but the feedback is
'prscore: bad arguments (2)' which is pretty confusing.

Reject any --s unless it's the start of --scores or --showpath[s].
'nethack --show' will be rejected as "Unknown option: --show."
'nethack -show' is still accepted and will report that it can't find
any scores for how as it always has (assuming that there aren't any
score entries for "how" :-).
2023-11-05 17:16:02 -08:00
nhmall
196fd41817 comment out font warning argument to groff 1.23
The font warnings are no longer being generated as of b73e4815,
so there is no need for the '-W font' argument to groff at this time.
2023-11-02 10:31:50 -04:00
nhmall
5c87596597 support builds incl Qt6 with clang-14,15,16,17 2023-10-31 13:08:32 -04:00
nhmall
ead8053f91 outdated dependency for alloc.o in Makefile.utl 2023-10-31 10:11:15 -04:00
nhmall
df4d945395 The same warnings resulted with groff 1.23 on macOS 2023-10-30 16:59:58 -04:00
nhmall
a70cae04a3 Linux: refine warning suppression
groff 1.23 is known to have the issue
2023-10-30 16:20:49 -04:00