Commit Graph

17488 Commits

Author SHA1 Message Date
G. Branden Robinson
a6a32170ee doc/dlb.6: Revise description
Content:
* Document that the command has a default file list.
* Demote "COMMANDS" section to "Operations" subsection.  The former term
  is (1) too easily confused with Unix commands and (2) not a widely
  used section heading in man pages.

Style:
* Italicize command names.
* Italicize file names.
* Use idiomatic man page cross references.
* Present operation and option letters in alphabetical order.
* Render option descriptions as full sentences.
* Set bug list as a bulleted list.

Markup:
* Break input lines at sentence boundaries.
* Favor use of man(7) font selection and alternation macros over roff(7)
  font selection escape sequences.
* Drop numerous extraneous paragraphing macro calls.  See subsection
  "Horizontal and vertical spacing" of groff_man(7).
* Replace use of *roff requests to break lines and vertically space with
  calls of paragraphing macros, which is what they're for.  Two things
  the page author didn't know: `.sp 1` already implies a break, so the
  preceding `.br` was redundant.  `.sp 1` without an argument already
  means to vertically space by 1 vee; that is, the "1" argument was
  superfluous.  It was a bad idea anyway because the default
  inter-paragraph spacing in man(7) is not one vee, but 0.4v--this
  matters when typesetting.  It has also been the case since 1979.
* Use `RS` and `RE` macros instead of a literal tab to achieve a
  relative inset.  Use of the macros is more idiomatic.
* Use `EX` and `EE` to attempt to set the examples in a monospaced font
  family.  These are extensions and are silently ignored by formatters
  that don't support them.

  groff_man(7):
     .EX
     .EE    Begin and end example.  After .EX, filling is disabled and a
            constant‐width (monospaced) font is selected.  Calling .EE
            enables filling and restores the previous font.

            .EX and .EE are extensions introduced in Ninth Edition Unix.
            Documenter’s Workbench, Heirloom Doctools, and Plan 9
            troffs, and mandoc (since 1.12.2) also support them.
            Solaris troff does not.  See subsection “Use of extensions”
            in groff_man_style(7).
* Kill off useless trailing space on input line.
2024-12-31 06:52:27 -06:00
G. Branden Robinson
0dc5d8c2f1 doc/dlb.6: Revise synopsis
Follow Unix idioms and the guidelines presented in groff_man_style(7).[1]

* Present multiple synopses since the command has multiple operation
  modes accessed via mutually inexpressible command letters.  See the
  POSIX standard for copious precedent.
* Stop implying that file name arguments are accepted alongside the `I`
  option; see line 236 of util/dlb_main.c.
* Stop spacing around synopsis punctuation where unnecessary.
* Set metasyntactic variables (parameters) in italics, not roman or
  bold.
* Spell ellipsis idiomatically for pleasant typesetting.
* Use `\c` escape sequence to force adjacency of tar-like option letters
  to the mandatory operation letter.
* Use singular, not plural, for repeatable argument.  The ellipsis does
  the grammatical work of pluralization for us.

[1] Full disclosure: I wrote much of (the current form of) that man page.
2024-12-31 06:52:27 -06:00
G. Branden Robinson
dc14fb131f doc/{dlb,recover}.6: Disable dead dynamic code
Portions of these man pages seem at one time to have been dynamically
selected, but the mechanism for doing so appears to be commented out in
the source tree: see "NHGREP" in sys/{unix,vms}/Makefile.doc.

Wrap them in *roff "ignore blocks" to keep their noise from cluttering
the man page actually seen by the users.
2024-12-31 06:52:27 -06:00
G. Branden Robinson
01b2ea12f7 doc/dlb.6: Use correct scaling unit for ems
In *roff numeric expressions, ems are spelled "m", not "em".

https://www.gnu.org/software/groff/manual/groff.html.node/Measurements.html
2024-12-31 06:52:27 -06:00
nhmall
e20908fa4f remove an unused part of msdos cross-compile 2024-12-30 12:59:00 -05:00
nhmall
eacfa202d9 soundlib selection in config file wasn't working
When there was more than one option #define'd
selection was not working correctly.
2024-12-30 12:54:12 -05:00
nhmall
ac50b7fecc update the msdos cross-compile
date.c wasn't always being recompiled.
A couple of other bits.
2024-12-30 12:52:35 -05:00
nhmall
a65c012f45 shorten up a Makefile.src line 2024-12-30 12:48:52 -05:00
PatR
ecbb7cff4d fix issue #1339 - shop purchase warnings
Issue reported by ars3niy:  with the relatively new container
handling, buying multiple items when some were inside a container
sometimes triggered impossible "unpaid_cost: object wasn't on any
bill" warnings and not buy all intended items.  Once that occurred,
subsequent inventory display would repeat the warning.

A couple weeks back, I managed to produce a save file which would
reproduce the problem when 'p' was issued, but failed to figure
out why that was happening.  I accidentally deleted that save file
and it took quite a lot of further attempts to get another one.

I still don't understand why this fix is needed, but with it in
place the save file no longer triggers any problems.  I'm marking
the issue fixed but that could be premature.

Fixes #1339
2024-12-30 03:12:06 -08:00
nhmall
50aff17f94 follow-up bit for sys/msdos/fetch-cross-compiler.sh 2024-12-29 13:54:06 -05:00
nhmall
42b9693829 Merge branch 'msdos2' into NetHack-3.7 2024-12-29 12:16:20 -05:00
nhmall
7b4445f040 make msdos lib/djgpp/target folder more hierarchical
Instead of flat, have bin, lib and include folders for
the native DOS pieces.

If you have been cross-compiling for MSDOS, you will
need to carry out the following to bring things up-to-date:

    sys/msdos/fetch-cross-compiler.sh
    make CROSS_TO_MSDOS=1 WANT_DEBUG=1 package
2024-12-29 12:11:03 -05:00
Pasi Kallinen
1282863f5c Fix breaking wand of digging not touching boulders
Applying a wand of digging skipped all the affected locations
with any boulders on them.
2024-12-29 18:17:57 +02:00
Pasi Kallinen
6c895ab6f6 Boulder-over-pit sanity when breaking wand of digging 2024-12-28 20:54:36 +02:00
Pasi Kallinen
5f95831526 Creating a pit in a wall message tweak
"A pit appears in the wall" sounds a bit silly, so change it to
"The wall crumbles into a pit"
2024-12-28 20:52:39 +02:00
Pasi Kallinen
767a20e21f Hacky fix for pline recursion outputting raw_print
When glyph updates are on, pline can be called recursively
when the vision is being fully recalculated.  This caused
the recursively called pline to output raw_pline text.

Not sure if this is the correct way to fix it, but can't really
turn off or block the glyph update notices either ...
2024-12-28 20:41:43 +02:00
Pasi Kallinen
454978fadd Avoid boulder-over-pit sanity when filling empty maze
This shouldn't happen unless doing special level commands in
strange order, but handle it anyway...
2024-12-28 20:33:18 +02:00
Pasi Kallinen
72fb06a40a Unhide monster moving over to teleport trap 2024-12-28 20:31:45 +02:00
Pasi Kallinen
d11747899e Fix boulder-over-pit sanity after landmine blows up 2024-12-28 20:30:11 +02:00
Pasi Kallinen
66d0307e95 Impossible timer after vault guard entered
Fuzzer encountered impossible "timer sanity: melt timer on non-ice",
when vault guard entered the vault, changing the vault wall unconditionally
into room floor; in this case the vault wall was ice with a melting timer
attached.

Delete any melting ice timers on that location when turning it into floor.
2024-12-28 19:43:14 +02:00
Pasi Kallinen
6530951fd5 Impossible timer after dipping a lit potion of oil
Dipping a lit potion of oil into another potion could
turn the potion of oil into another potion; this resulted
in "burn_object: unexpected obj" impossible after the lit timer
ran out.

Just make an explosion if trying to dip a lit potion of oil.
2024-12-28 19:39:02 +02:00
nhkeni
bb57c38e24 Option formatting cleanup. 2024-12-27 18:17:49 -05:00
nhmall
959cc47665 set but not used warning in reveal_paths() 2024-12-26 19:55:08 -05:00
nhmall
556f1c9839 Windows: remove troublesome template lines
Closes #1345
2024-12-26 17:38:03 -05:00
nhmall
e6e0913878 doc/* from cron job 2024-12-26 17:34:18 -05:00
keni
47ccaf3f26 more .gitattributes 2024-12-25 20:23:00 -05:00
keni
a331a667e5 3.7 setup for autodocs 2024-12-25 14:58:48 -05:00
nhkeni
09693f618f Fix header spelling error "DATE" -> "Date"; force update dates. 2024-12-24 19:24:15 -05:00
nhmall
4507323a42 more doc updates 2024-12-24 13:41:17 -05:00
nhkeni
c27cb28ec5 Use old-style --int flag to git to work with older gits. 2024-12-24 12:51:23 -05:00
nhkeni
bdff809099 Update hyphenation for *.mn and *.6 files. 2024-12-24 12:37:20 -05:00
nhmall
95cf46c102 update Guidebook and some generated files 2024-12-24 10:27:12 -05:00
nhmall
e32ac5a7c7 fixes3-7-0.txt update for showpaths option tweaks 2024-12-23 00:50:38 -05:00
nhmall
9ba20d0e22 more follow-up tweaking for missing sysconf --showpaths 2024-12-23 00:33:12 -05:00
nhmall
1a6847ca15 follow-up tweaking for missing sysconf --showpaths 2024-12-23 00:16:52 -05:00
nhmall
1746f57f37 avoid double free
If freedynamicdata() gets called twice, for whatever reason, a "double free" can occur.

warning: 44     ./nptl/pthread_kill.c: No such file or directory
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff7c8b26e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff7c6e8ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff7c6f7b6 in __libc_message_impl (fmt=fmt@entry=0x7ffff7e148d7 "%s\n")
    at ../sysdeps/posix/libc_fatal.c:132
#6  0x00007ffff7ceefe5 in malloc_printerr (str=str@entry=0x7ffff7e17bf0 "free(): double free detected in tcache 2")
    at ./malloc/malloc.c:5772
#7  0x00007ffff7cf154f in _int_free (av=0x7ffff7e49ac0 <main_arena>, p=<optimized out>, have_lock=0)
    at ./malloc/malloc.c:4541
#8  0x00007ffff7cf3d9e in __GI___libc_free (mem=0x555555ad82a0) at ./malloc/malloc.c:3398
#9  0x00005555557c12e9 in free_rect () at rect.c:48
#10 0x00005555557d77a2 in freedynamicdata () at save.c:1240
#11 0x0000555555682754 in nh_terminate (status=0) at end.c:1671
#12 0x000055555589af15 in opt_terminate () at ../sys/unix/unixmain.c:768
#13 0x000055555589af7a in after_opt_showpaths (dir=0x0) at ../sys/unix/unixmain.c:796
#14 0x0000555555693dd9 in do_deferred_showpaths (code=0) at files.c:4491
#15 0x0000555555778405 in initoptions () at options.c:6948
#16 0x0000555555899cd9 in main (argc=2, argv=0x7fffffffdad8) at ../sys/unix/unixmain.c:151
2024-12-22 23:20:04 -05:00
nhmall
a62c62fd96 follow-up for --showpaths
Ensure that memory allocations are freed up.

Windows:
  Fix a Windows compiler warning.
  Fix an undefined link symbol.
2024-12-22 20:45:55 -05:00
nhmall
57f86662fd try harder to have --showpaths succeed
This helps avoid a potential chicken-and-egg scenario
with the system configuration file (sysconf).

If sysconf wasn't accessible at the expected location, it
caused an immediate exit, without relaying any helpful
information. That happened even when using:
    'nethack --showpaths'

That's particularly unhelpful, because the --showpaths
output might have been useful towards understanding where
NetHack was looking for such things.

That left you without an easy recourse to identify where
the game is looking for the sysconf file. That might be
especially troublesome if you didn't build the game
yourself.
2024-12-22 19:58:52 -05:00
Pasi Kallinen
8b11bda6cb Open cavern -style Gehennom filler level 2024-12-22 18:14:12 +02:00
nhmall
f12d755ba2 Makefile.nmake updates
Be more consistent in the use of path separators.

Add a second version of Makefile variables that contain paths,
one with a trailing separator, and one without (prefixed with R_
for use in Makefile rules).

Also, in dat/luahelper,

Updates due to correspond to the Makefile.nmake changes.

Add Makefile variable AWK to use $(AWK) instead of hardcoded awk.
2024-12-22 09:43:00 -05:00
Pasi Kallinen
0079bf87bb fixes update 2024-12-21 18:19:42 +02:00
Pasi Kallinen
6b0e21dc1a Wish alias "tripe" for tripe ration 2024-12-21 14:11:00 +02:00
Pasi Kallinen
f7e86aa150 Add a new bigroom variant "two hexagons" 2024-12-21 12:19:26 +02:00
Pasi Kallinen
e7a714849e luahelper doc nit 2024-12-21 12:06:20 +02:00
nhmall
d42c4faea0 suppress "Entering directory" messages from the output 2024-12-21 01:19:34 -05:00
nhmall
f490e54d88 update target all in dat/luahelper 2024-12-21 01:15:54 -05:00
nhmall
7c54d9e651 add support for vs files.props to dat/luahelper 2024-12-21 01:13:45 -05:00
nhmall
20511564f7 utility to help maintain lua files on platform builds
Use by:

  make -f dat/luahelper [target]

  Target examples:

      Visual Studio nmake  : make -f dat/luahelper devhelp-nmake >file.txt

      msys2 GNUmakefile    : make -f dat/luahelper devhelp-msys >file.txt

      Xcode project.pbxproj: make -f dat/luahelper devhelp-xcode >file.txt

      all: generate txt files for all the above
2024-12-21 00:47:18 -05:00
nhmall
f6a5236beb follow-up to #1343 fix for telepathic hero
telepathic hero can discern which particular monster just
read a scroll, even though he cannot see the monster
2024-12-20 15:30:37 -05:00
nhmall
a35e5779f6 heard incantation: don't trump telepathy with 'I'
GitHub 1343 report by @ars3niy:
"When you are blind and see with telepathy a monster whom you then hear read
a scroll, said monster turns into an "I". While it reveals which one exactly
read the scroll, it is strange that you can no longer see it with telepathy
until it moves to another square."

Fixes #1343
2024-12-20 13:04:08 -05:00