summaryrefslogtreecommitdiffstats
path: root/roff.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-07 00:50:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-07 00:50:34 +0000
commit29a53f97793b69d7bc6667efd7fdcdce180a5997 (patch)
treeceac2b5e0ea3963917778caaa5f343247c612e24 /roff.h
parente4e20fb8865c9f2f621fc06cfd9abcf953128959 (diff)
downloadmandoc-29a53f97793b69d7bc6667efd7fdcdce180a5997.tar.gz
Implement the roff(7) .rn (rename macro or string) request.
Renaming a user-defined macro is very simple: just copy the definition to the new name and delete the old name. Renaming high-level macros is a bit tricky: use a dedicated key-value-table, with non-standard names as keys and standard names as values. When a macro is found that is not user-defined, look it up in the "renamed" table and translate it back to the standard name before passing it on to the high-level parsers.
Diffstat (limited to 'roff.h')
-rw-r--r--roff.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/roff.h b/roff.h
index 02b610b8..9800dfc9 100644
--- a/roff.h
+++ b/roff.h
@@ -309,6 +309,7 @@ enum roff_tok {
ROFF_writem,
ROFF_xflag,
ROFF_cblock,
+ ROFF_RENAMED,
ROFF_USERDEF,
TOKEN_NONE,
MDOC_Dd,