=================================================================== RCS file: /cvs/mandoc/Attic/mdoc_action.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -p -r1.16 -r1.17 --- mandoc/Attic/mdoc_action.c 2009/06/17 14:14:51 1.16 +++ mandoc/Attic/mdoc_action.c 2009/06/18 20:46:19 1.17 @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.16 2009/06/17 14:14:51 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.17 2009/06/18 20:46:19 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -663,12 +663,10 @@ post_bl_head(POST_ARGS) * column field. Then, delete the head children. */ - for (i = 0, nn = m->last->child; nn; nn = nn->next, i++) - /* Count children. */; + n->args->argv[c].sz = (size_t)m->last->nchild; + n->args->argv[c].value = malloc + ((size_t)m->last->nchild * sizeof(char *)); - n->args->argv[c].sz = (size_t)i; - n->args->argv[c].value = malloc((size_t)i * sizeof(char *)); - for (i = 0, nn = m->last->child; nn; i++) { n->args->argv[c].value[i] = nn->string; nn->string = NULL; @@ -677,7 +675,9 @@ post_bl_head(POST_ARGS) mdoc_node_free(nnp); } + m->last->nchild = 0; m->last->child = NULL; + return(1); }