summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-17 16:15:27 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-17 16:15:27 +0000
commitc6e35c35ae3f9fc589c153d500eb8d77813f2780 (patch)
treea2b2dda54e095730873ac80a13f367899739038b /mdoc.c
parent56f0b4a0fb2fb74f3bf1c6f8ed87ce2b716bcf52 (diff)
downloadmandoc-c6e35c35ae3f9fc589c153d500eb8d77813f2780.tar.gz
Documentation, more validations, cleaned up actions, added Nm action.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/mdoc.c b/mdoc.c
index 783ea1a2..b4e6114f 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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):