CVSROOT:        /cvs
Module name:    src
Changes by:     schwa...@cvs.openbsd.org        2020/08/03 04:52:39

Modified files:
        usr.bin/mandoc : roff.c 
        regress/usr.bin/mandoc/roff/cond: Makefile close.in 
                                          close.out_ascii close.out_lint 
Added files:
        regress/usr.bin/mandoc/roff/cond: de.in de.out_ascii de.out_lint 

Log message:
Put the code handling \} into a new function roff_cond_checkend()
and call that function not only from both places where copies
existed - when processing text lines and when processing request/macro
lines in conditional block scope - but also when closing a macro
definition request, such that this construction works:

.if n \{.de macroname
macro content
.. \} ignored arguments
.macroname

This fixes a bug reported by John Gardner <gardnerjohng at gmail dot com>.

While here, avoid a confusing decrement of the line scope counter
in roffnode_cleanscope() for conditional blocks that do not have
line scope in the first place (no functional change for this part).
Also improve validation of an internal invariant in roff_cblock()
and polish some comments.

Reply via email to