diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-19 17:51:32 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-19 17:51:32 +0000 |
commit | 2e32d8081f19a0adc0f1c4091cc0e6720b1a24fe (patch) | |
tree | 308da3c4fc54485ffb916bd71b5a04b848513d70 /mdoc.c | |
parent | d427476d5c4b9bd0804fa51647671e6b18e07afa (diff) | |
download | mandoc-2e32d8081f19a0adc0f1c4091cc0e6720b1a24fe.tar.gz |
More correct validation.
Elision of prologue macros from main tree.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -85,9 +85,9 @@ const char *const __mdoc_argnames[MDOC_ARG_MAX] = { const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { NULL, 0 }, /* \" */ - { macro_constant, MDOC_PROLOGUE }, /* Dd */ - { macro_constant, MDOC_PROLOGUE }, /* Dt */ - { macro_constant, MDOC_PROLOGUE }, /* Os */ + { macro_constant, MDOC_PROLOGUE | MDOC_NOKEEP }, /* Dd */ + { macro_constant, MDOC_PROLOGUE | MDOC_NOKEEP }, /* Dt */ + { macro_constant, MDOC_PROLOGUE | MDOC_NOKEEP }, /* Os */ { macro_scoped, 0 }, /* Sh */ { macro_scoped, 0 }, /* Ss */ { macro_text, 0 }, /* Pp */ @@ -205,7 +205,6 @@ static void argfree(size_t, struct mdoc_arg *); static void argcpy(struct mdoc_arg *, const struct mdoc_arg *); -static void mdoc_node_freelist(struct mdoc_node *); static int mdoc_node_append(struct mdoc *, struct mdoc_node *); static void mdoc_elem_free(struct mdoc_elem *); @@ -213,13 +212,21 @@ static void mdoc_text_free(struct mdoc_text *); const struct mdoc_node * -mdoc_result(struct mdoc *mdoc) +mdoc_node(struct mdoc *mdoc) { return(mdoc->first); } +const struct mdoc_meta * +mdoc_meta(struct mdoc *mdoc) +{ + + return(&mdoc->meta); +} + + void mdoc_meta_free(struct mdoc *mdoc) { @@ -671,7 +678,7 @@ mdoc_node_free(struct mdoc_node *p) } -static void +void mdoc_node_freelist(struct mdoc_node *p) { |