Follow-up Comment #17, bug #55081 (project groff):
To complete the fix, the macro must reach the footer trap irrespective
of how many other traps there are before it.
Introduce a flag that confirms that the footer trap is reached.
Test that in the bc macro.
For example:
In macro "@f":
add a flag at the beginning of it; for testing purposes I used
.do nr reached_footer 1
Define 'bc' for example so:
.do de bc
.if \n@>2 .tm >> bc
.nr nr_traps (-1) 1
.if \n@>2 .tm -- bc nr_traps=\\n[nr_traps]
.
.nr reached_footer 0
.\" "reached_footer" is increased in macro "@f"
.while (\\n[reached_footer]==0) \{\
. sp \\n(.tu
. nr nr_traps \\n+[nr_traps]
.\}
.
.if \n@>2 .tm << bc number of traps before the footer trap: \\n[nr_traps]
..
"@" is a register for diagnostic messages.
The number '2' for register '@' might not be the right one for the
convention in "e.tmac"
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55081>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/