Discussion:
[bug #57638] Regression: -me's .nm macro broken as of commit 2cc968c7
(too old to reply)
Dave
2020-01-20 02:35:24 UTC
Permalink
URL:
<https://savannah.gnu.org/bugs/?57638>

Summary: Regression: -me's .nm macro broken as of commit
2cc968c7
Project: GNU troff
Submitted by: barx
Submitted on: Sun 19 Jan 2020 08:35:22 PM CST
Category: Macro - others
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None

_______________________________________________________

Details:

Commit 2cc968c7 (whose author I've added to this bug's cc list, since he may
not ordinarily monitor this bug tracker) introduced a regression in the -me
macro set.

It can be demonstrated with the command

printf ".nm 1 1\nHi.\n" | groff -a -me

Running this command against the version of tmac/e.tmac-u from before that
commit gives the expected output:


<beginning of page>
1 Hi.


Running it after the commit (including using the latest version of e.tmac-u)
gives:


[...]/tmac/e.tmac:99: backtrace: macro 'nm'
troff: <standard input>:1: warning: number register '_#p' not defined
[...]/tmac/e.tmac:100: backtrace: macro 'nm'
troff: <standard input>:1: warning: number register '_#f' not defined
[...]/tmac/e.tmac:100: backtrace: macro 'nm'
troff: <standard input>:1: warning: bad font number
<beginning of page>
1Hi.





_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Dave
2020-01-20 05:50:40 UTC
Permalink
Follow-up Comment #1, bug #57638 (project groff):

(Probably irrelevant, but the output is the same whether the version of groff
calling the -me package is the latest or an older (1.22.3) code base.
However, different warnings are emitted. The warnings in comment #0 are from
the latest code base. Under groff 1.22.3, the two number-register warnings
are not there, only the font-number warning.)

_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Dave
2020-02-07 00:48:52 UTC
Permalink
Follow-up Comment #2, bug #57638 (project groff):

G Helffrich posted a patch:
http://lists.gnu.org/archive/html/bug-groff/2020-01/msg00086.html

_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Bjarni Ingi Gislason
2020-02-07 01:27:43 UTC
Permalink
Follow-up Comment #3, bug #57638 (project groff):


[comment #2 comment #2:]
http://lists.gnu.org/archive/html/bug-groff/2020-01/msg00086.html

The provided patch uses 'd' instead of 'r' in the test.

Add a test for the numeric registers "_#p" and "_#f"
in the macro ".nm",
before they are used.

Changed lines:

-. ps \\n[_#p]
-. ft \\n[_#f]
+. if r _#p .ps \\n[_#p]
+. if r _#f .ft \\n[_#f]


_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
George Helffrich
2020-02-09 15:28:19 UTC
Permalink
Follow-up Comment #4, bug #57638 (project groff):

OK (but the markup interpretation of the underscore garbled the changed lines
in comment #2).

_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Dave
2020-02-10 06:31:07 UTC
Permalink
Follow-up Comment #5, bug #57638 (project groff):

[comment #4 comment #4:]
Post by George Helffrich
(but the markup interpretation of the underscore garbled the changed lines
in comment #2).

Here are the unmolested lines (as retrieved from the emailed copy of comment
#3):


-. ps \\n[_#p]
-. ft \\n[_#f]
+. if r _#p .ps \\n[_#p]
+. if r _#f .ft \\n[_#f]


_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
George Helffrich
2020-02-10 09:52:40 UTC
Permalink
Follow-up Comment #6, bug #57638 (project groff):

Again, OK

_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
G. Branden Robinson
2020-07-25 06:37:42 UTC
Permalink
Update of bug #57638 (project groff):

Category: Macro - others => Macro - me


_______________________________________________________

Reply to this item at:

<https://savannah.gnu.org/bugs/?57638>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Loading...