Annotation of mandoc/README.addmacro, Revision 1.1
1.1 ! kristaps 1: $Id: READE.addmacro,v 1.1 2009/02/23 12:45:19 kristaps Exp $
! 2:
! 3: This documents how to go about adding a macro to mdoc.3.
! 4:
! 5: (1) Add the macro to the #define list in mdoc.h.
! 6: (2) Add the macro to __mdoc_macronames in mdoc.c.
! 7: (3) Add the macro to __mdoc_macros in mdoc.c.
! 8: (4) Add the macro to mdoc_valids in validate.c.
! 9: (5) Add the macro to mdoc_actions in action.c.
! 10: (6) Add the macro to mdoc_argflags in argv.c.
! 11: (7) Modify the hash routine in hash.c (may not be required).
! 12:
! 13: If the macro has arguments:
! 14:
! 15: (1) Add arguments to the #define list in mdoc.h.
! 16: (2) Add the arguments to __mdoc_argnames in mdoc.c.
! 17: (3) Modify parts of argv.c (lookup() and mdoc_args()).
! 18:
! 19: You'll certainly want to change the front-ends:
! 20:
! 21: (1) Add the macro to __termacts in term.c.
CVSweb