summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-16 17:14:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-16 17:14:48 +0000
commit266c94623f8d47d4db151c4f7b291320e7613f02 (patch)
treee2b020f3868e8909bad880f7da818c2ec205b198 /mdoc_validate.c
parentfb50684f4490a50ea91755bfd78db1ce643e2006 (diff)
downloadmandoc-266c94623f8d47d4db151c4f7b291320e7613f02.tar.gz
Migrate `An' to use a pointer in its data, like everybody else. This is
the first step to having a simpler ref-counted system for "data" associated with a node.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 40d66564..1093ece3 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -904,6 +904,9 @@ pre_an(PRE_ARGS)
{
int i;
+ assert(NULL == n->data.An);
+ n->data.An = mandoc_calloc(1, sizeof(struct mdoc_an));
+
if (NULL == n->args)
return(1);
@@ -912,9 +915,9 @@ pre_an(PRE_ARGS)
n->args->argv[i].pos, MANDOCERR_IGNARGV);
if (MDOC_Split == n->args->argv[0].arg)
- n->data.An.auth = AUTH_split;
+ n->data.An->auth = AUTH_split;
else if (MDOC_Nosplit == n->args->argv[0].arg)
- n->data.An.auth = AUTH_nosplit;
+ n->data.An->auth = AUTH_nosplit;
else
abort();
@@ -1247,14 +1250,14 @@ post_an(POST_ARGS)
struct mdoc_node *np;
np = mdoc->last;
- if (AUTH__NONE != np->data.An.auth && np->child)
+ if (AUTH__NONE != np->data.An->auth && np->child)
return(eerr_eq0(mdoc));
/*
* FIXME: make this ewarn and make sure that the front-ends
* don't print the arguments.
*/
- if (AUTH__NONE != np->data.An.auth || np->child)
+ if (AUTH__NONE != np->data.An->auth || np->child)
return(1);
mdoc_nmsg(mdoc, np, MANDOCERR_NOARGS);