CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2017/06/06 18:50:30
Modified files: share/man/man7 : roff.7 usr.bin/mandoc : roff.c roff.h Log message: 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.