Here's the patch. It fixes a spurious error message when building the NetHack Guidebook.
diff --git a/ChangeLog b/ChangeLog
index da0df963e..fe7fee072 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -851,21 +851,6 @@
* src/roff/troff/div.cpp: Include local "input.h" header file to
get at the symbol's relocated declaration.
-2025-12-29 G. Branden Robinson <[email protected]>
-
- * src/roff/troff/env.cpp: Refactor. Further separate input
- processing logic from engine logic.
- (environment::do_break): Rename argument from `want_adjustment`
- to `want_forced_adjustment` for clarity.
- (break_output_line): Stop checking value of `want_break` global
- here, as that's determined by the input control character used
- to invoke the request, a front-end rather than an engine concern
- {albeit brearing an engine-oriented name}. However, removing
- that conditional leaves this function as a one-liner with two
- call sites differing only by a Boolean literal argument, so drop
- the function altogether, instead open-coding it...
- (break_without_adjustment, break_without_adjustment): ...here.
-
2025-12-29 G. Branden Robinson <[email protected]>
[groff]: Unit-test `br` and `brp` requests.
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index b49471f2a..90880c3fe 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2645,18 +2645,23 @@ bool environment::is_empty()
&& pending_lines == 0 /* nullptr */;
}
-static void break_without_forced_adjustment_request()
+void do_break_request(bool want_adjustment)
{
+ while (!tok.is_newline() && !tok.is_eof())
+ tok.next();
if (was_invoked_with_regular_control_character)
- curenv->do_break(false /* want forced adjustment */);
- skip_line();
+ curenv->do_break(want_adjustment);
+ tok.next();
+}
+
+static void break_without_forced_adjustment_request()
+{
+ do_break_request(false);
}
static void break_with_forced_adjustment_request()
{
- if (was_invoked_with_regular_control_character)
- curenv->do_break(true /* want forced adjustment */);
- skip_line();
+ do_break_request(true);
}
void title()
Rationale, background: https://savannah.gnu.org/bugs/?68026
Regards,
Branden
signature.asc
Description: PGP signature
