summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-19 17:51:32 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-19 17:51:32 +0000
commit14b264ac5a6226fdf3065c90d26a2595186fa976 (patch)
tree5e94556f1f4f5dbdd726597b5e6c08f1167012b6 /mdoc.c
parent4d0e00fc396f69ea4575cca04855817cbf289670 (diff)
downloadmandoc-14b264ac5a6226fdf3065c90d26a2595186fa976.tar.gz
mandoc-14b264ac5a6226fdf3065c90d26a2595186fa976.tar.zst
mandoc-14b264ac5a6226fdf3065c90d26a2595186fa976.zip
More correct validation.
Elision of prologue macros from main tree.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/mdoc.c b/mdoc.c
index 5aa88c25..6818d356 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.36 2009/01/19 17:02:58 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.37 2009/01/19 17:51:33 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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)
{