aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
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
commit51dbcefc64890d499c9774c7fc75ddfc3fa3cda0 (patch)
treedd71467196fa8b9fadf981c2c2d24f55cdbf09f4 /term.c
parent769591af89ed40c463f2c2fe74f6fc33b79f0281 (diff)
downloadmandoc-51dbcefc64890d499c9774c7fc75ddfc3fa3cda0.tar.gz
mandoc-51dbcefc64890d499c9774c7fc75ddfc3fa3cda0.tar.zst
mandoc-51dbcefc64890d499c9774c7fc75ddfc3fa3cda0.zip
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 'term.c')
0 files changed, 0 insertions, 0 deletions