summaryrefslogtreecommitdiffstatshomepage
path: root/READE.addmacro
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-23 12:45:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-23 12:45:19 +0000
commit87afbc0e736c0c51230aed2a74f1f10684872d7e (patch)
tree6a17424d1de64387a59166cd7ba593b96bb279b0 /READE.addmacro
parent7f0efa8fae853b8421869bf16da3d57b9b4d0da0 (diff)
downloadmandoc-87afbc0e736c0c51230aed2a74f1f10684872d7e.tar.gz
mandoc-87afbc0e736c0c51230aed2a74f1f10684872d7e.tar.zst
mandoc-87afbc0e736c0c51230aed2a74f1f10684872d7e.zip
More in-file documentation and Linux-isation.
Moved mdoc_macros table definition into macro.c, where it belongs.
Diffstat (limited to 'READE.addmacro')
-rw-r--r--READE.addmacro21
1 files changed, 21 insertions, 0 deletions
diff --git a/READE.addmacro b/READE.addmacro
new file mode 100644
index 00000000..b79f90e2
--- /dev/null
+++ b/READE.addmacro
@@ -0,0 +1,21 @@
+$Id: READE.addmacro,v 1.1 2009/02/23 12:45:19 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.