gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 9415cb9c5b7fd2aba5226dc2aa079a9f2844c618 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Fri Jun 30 18:51:28 2023 -0500
[mm]: Add more error checking to `IND` macro. * contrib/mm/m.tmac (IND): Throw error if vertical drawing position is negative. (What page number can be recorded when that is the case?) Thanks to Damian McGuckin for raising this scenario. --- contrib/mm/ChangeLog | 6 ++++++ contrib/mm/m.tmac | 1 + 2 files changed, 7 insertions(+) diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog index d4e544b16..a2febe13d 100644 --- a/contrib/mm/ChangeLog +++ b/contrib/mm/ChangeLog @@ -1,3 +1,9 @@ +2023-06-30 G. Branden Robinson <g.branden.robin...@gmail.com> + + * m.tmac (IND): Throw error if vertical drawing position is + negative. (What page number can be recorded when that is the + case?) Thanks to Damian McGuckin for raising this scenario. + 2023-06-30 G. Branden Robinson <g.branden.robin...@gmail.com> Trivially refactor. diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac index 232dad8c1..8b77f2a96 100644 --- a/contrib/mm/m.tmac +++ b/contrib/mm/m.tmac @@ -3368,6 +3368,7 @@ exceeds depth of nested lists (\\n[li*lvl]) .if !d ind*file .@error \\$0: no active index; call INITI first .if \\n[.$]<1 .@error \\$0: expected at least 1 argument, got \\n[.$] .if '\\$1'' .@error \\$0: cannot record empty index entry +.if \\n[nl]<0 .@error \\$0: cannot record index entry when not on a page .ds ind*line \\$1 .while \\n[.$]>0 \{\ . shift _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit