[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60913] suboptimal diagnostics and spurious output when (mis)using
From: |
G. Branden Robinson |
Subject: |
[bug #60913] suboptimal diagnostics and spurious output when (mis)using .evc |
Date: |
Thu, 15 Jul 2021 18:31:55 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Update of bug #60913 (project groff):
Status: In Progress => Fixed
Open/Closed: Open => Closed
Planned Release: None => 1.23.0
_______________________________________________________
Follow-up Comment #3:
commit ff394f136b602454c557d0ce96cd788db36d138b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Tue Jul 13 06:11:07 2021 +1000
[troff]: Refactor environment handling.
[troff]: Refactor environment initialization, switching, and copying.
* src/roff/troff/env.cpp: Rename struct `env_list` to `env_list_node`
since it describes a node of a singly-linked list. Remove constant
`NENVIRONMENTS` and array `env_table`. Add static symbol
`default_environment_name` to replace string literal.
(init_environments): Stop initializing `curenv` through `env_table`.
Use `default_environment_name` for that initialization and add the
default environment to `env_dictionary`.
(environment_switch): Simplify. Shorten "dummy environment"
diagnostic message. Stop creating an integer-named environment inside
the `env_table` array, only falling through to use the
`env_dictionary` if the named environment is not a valid integer or if
the array is full. Instead use `env_dictionary` always. Drop no
longer needed `pop` quasi-Boolean integer with extra state to suppress
environment stack underflow errors. Instead report the error if
underflow occurs, regardless of any other circumstance.
(environment_copy): Simplify. Stop searching the `env_table` array
for an environment to copy from, only falling through to use the
`env_dictionary` if the named environment is not a valid integer or if
the array is full. Instead search `env_dictionary` always. Emit "no
environment specified to copy from" diagnostic only if the `evc`
request is given no argument. If the source environment to copy from
is given but not found, emit a new diagnostic naming the nonexistent
environment. Fix bug: stop returning early if no copying could be
done; instead fall through to the end of the function, which calls
`skip_line()` and prevents anything on the remainder of the (invalid)
control line from being interpreted. Problem dates back to commit
da3b7137, 6 March 2000 (groff 1.16).
Fixes <https://savannah.gnu.org/bugs/?60913>.
commit 9d86a8e3f68644e891878bbda12497633f1b1bb5
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Tue Jul 13 06:29:31 2021 +1000
Regression-test Savannah #60913.
Warning: test fails at this commit.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60913>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/