Implement appending to standard man(7) and mdoc(7) macros with .am.
authorschwarze <schwarze@openbsd.org>
Sun, 18 Jun 2017 17:35:40 +0000 (17:35 +0000)
committerschwarze <schwarze@openbsd.org>
Sun, 18 Jun 2017 17:35:40 +0000 (17:35 +0000)
commit07530f0a2438937199ce590a848576aa8885048b
tree7ffb8570870ee57d6a970f5dacc4087e455e9ebc
parented58d33a498447ce0aebc89af7e3311567e31f8b
Implement appending to standard man(7) and mdoc(7) macros with .am.

With roff_getstrn(), provide finer control which definitions
can be used for what:
* All definitions can be used for .if d tests and .am appending.
* User-defined for \* expansion, .dei expansion, and macro calling.
* Predefined for \* expansion.
* Standard macros, original or renamed, for macro calling.

Several related improvements while here:
* Do not return string table entries that have explicitly been removed.
* Do not create a rentab entry when trying to rename a non-existent macro.
* Clear an existing rentab entry when the external interface
roff_setstr() is called with its name.
* Avoid trailing blanks in macro lines generated from renamed
and from aliased macros.
* Delete the duplicate __m*_reserved[] tables, just use roff_name[].
13 files changed:
regress/usr.bin/mandoc/roff/Makefile
regress/usr.bin/mandoc/roff/cond/string.in
regress/usr.bin/mandoc/roff/cond/string.out_ascii
regress/usr.bin/mandoc/roff/de/append.in
regress/usr.bin/mandoc/roff/de/append.out_ascii
regress/usr.bin/mandoc/roff/rn/Makefile [new file with mode: 0644]
regress/usr.bin/mandoc/roff/rn/append.in [new file with mode: 0644]
regress/usr.bin/mandoc/roff/rn/append.out_ascii [new file with mode: 0644]
regress/usr.bin/mandoc/roff/string/Makefile
regress/usr.bin/mandoc/roff/string/std.in [new file with mode: 0644]
regress/usr.bin/mandoc/roff/string/std.out_ascii [new file with mode: 0644]
regress/usr.bin/mandoc/roff/string/std.out_lint [new file with mode: 0644]
usr.bin/mandoc/roff.c