CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2013/10/03 13:32:25
Modified files:
usr.bin/mandoc : libmandoc.h mdoc.c mdoc_validate.c roff.c
Log message:
Support setting arbitrary roff(7) number registers,
preserving read support for the ".nr nS" SYNOPSIS state register;
read support for arbitrary registers is still not available.
Inspired by NetBSD roff.c rev. 1.18 (Christos Zoulas, March 21, 2013),
but implemented differently. I don't want to have yet another different
implementation of a hash table in mandoc - it would be the second one
in roff.c alone and the fifth one in mandoc grand total.
Instead, i designed and implemented roff_setreg() and roff_getreg()
to be similar to roff_setstrn() and roff_getstrn().
Once we feel the need to optimize, we can introduce one common
hash table implementation for everything in mandoc.