diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-17 16:15:27 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-17 16:15:27 +0000 |
commit | c6e35c35ae3f9fc589c153d500eb8d77813f2780 (patch) | |
tree | a2b2dda54e095730873ac80a13f367899739038b /mdoc.c | |
parent | 56f0b4a0fb2fb74f3bf1c6f8ed87ce2b716bcf52 (diff) | |
download | mandoc-c6e35c35ae3f9fc589c153d500eb8d77813f2780.tar.gz |
Documentation, more validations, cleaned up actions, added Nm action.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -140,7 +140,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { macro_scoped_close, MDOC_EXPLICIT | MDOC_CALLABLE | MDOC_PARSED }, /* Ac */ { macro_constant_scoped, MDOC_CALLABLE | MDOC_PARSED | MDOC_EXPLICIT }, /* Ao */ { macro_scoped_line, MDOC_CALLABLE | MDOC_PARSED }, /* Aq */ - { macro_constant, 0 }, /* At */ + { macro_constant_delimited, 0 }, /* At */ { macro_scoped_close, MDOC_EXPLICIT | MDOC_CALLABLE | MDOC_PARSED }, /* Bc */ { macro_scoped, MDOC_EXPLICIT }, /* Bf */ { macro_constant_scoped, MDOC_CALLABLE | MDOC_PARSED | MDOC_EXPLICIT }, /* Bo */ @@ -221,6 +221,19 @@ mdoc_result(struct mdoc *mdoc) void +mdoc_meta_free(struct mdoc *mdoc) +{ + + if (mdoc->meta.title) + free(mdoc->meta.title); + if (mdoc->meta.os) + free(mdoc->meta.os); + if (mdoc->meta.name) + free(mdoc->meta.name); +} + + +void mdoc_free(struct mdoc *mdoc) { @@ -440,8 +453,6 @@ mdoc_node_append(struct mdoc *mdoc, struct mdoc_node *p) if ( ! mdoc_valid_pre(mdoc, p)) return(0); - if ( ! mdoc_action_pre(mdoc, p)) - return(0); switch (p->type) { case (MDOC_HEAD): |