[BACK]Return to README.addmacro CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / Attic / README.addmacro (download)

Revision 1.1, Mon Feb 23 13:05:06 2009 UTC (15 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_3_9, VERSION_1_3_8, VERSION_1_3_6, VERSION_1_3_5, VERSION_1_3_15, VERSION_1_3_13, VERSION_1_3_11, VERSION_1_3_10

Added mdoclint.
`make regress' uses mdoclint

$Id: README.addmacro,v 1.1 2009/02/23 13:05:06 kristaps Exp $

This documents how to go about adding a macro to mdoc.3.

(1) Add the macro to the #define list in mdoc.h.
(2) Add the macro to __mdoc_macronames in mdoc.c.
(3) Add the macro to __mdoc_macros in mdoc.c.
(4) Add the macro to mdoc_valids in validate.c.
(5) Add the macro to mdoc_actions in action.c.
(6) Add the macro to mdoc_argflags in argv.c.
(7) Modify the hash routine in hash.c (may not be required).

If the macro has arguments:

(1) Add arguments to the #define list in mdoc.h.
(2) Add the arguments to __mdoc_argnames in mdoc.c.
(3) Modify parts of argv.c (lookup() and mdoc_args()).

You'll certainly want to change the front-ends:

(1) Add the macro to __termacts in term.c.