X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/438e0fe53465ef80060077f745e8cb68d8bd4fe0..d3f002ad84f44a7717764962a751ed671da56950:/mdoc_validate.c diff --git a/mdoc_validate.c b/mdoc_validate.c index 89265d5c..f2eca5c6 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.141 2010/12/16 00:25:35 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.144 2010/12/16 17:14:48 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -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);