From 4e3e49e7768b3c4f42921865c4d39b90be193bbd Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 18 Jun 2017 17:36:03 +0000 Subject: 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[]. --- regress/roff/cond/string.in | 4 ++++ regress/roff/cond/string.out_ascii | 2 ++ 2 files changed, 6 insertions(+) (limited to 'regress/roff/cond') diff --git a/regress/roff/cond/string.in b/regress/roff/cond/string.in index 6d19f4ce..4f27a492 100644 --- a/regress/roff/cond/string.in +++ b/regress/roff/cond/string.in @@ -27,3 +27,7 @@ mymacval .ie d myren now defined .el OOPS .if !d myren OOPS +.PP +standard macro is +.ie d PP defined +.el not defined \(em OOPS diff --git a/regress/roff/cond/string.out_ascii b/regress/roff/cond/string.out_ascii index 8df491ac..b5075d21 100644 --- a/regress/roff/cond/string.out_ascii +++ b/regress/roff/cond/string.out_ascii @@ -15,6 +15,8 @@ DDEESSCCRRIIPPTTIIOONN myren not yet defined now defined + standard macro is defined + OpenBSD June 14, 2017 STRING(1) -- cgit v1.2.3-56-ge451