From c4cc3f2226e67300ea3cb40c67e4d619a5a9d45a Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sun, 4 Jul 2010 21:59:30 +0000 Subject: Cache column sizes and char pointer into mdoc_bl. Finally get rid of the loops here and there to track down the MDOC_Column arguments. --- mdoc_action.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mdoc_action.c') diff --git a/mdoc_action.c b/mdoc_action.c index 0618f3ea..534743d1 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.74 2010/07/01 22:56:17 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.75 2010/07/04 21:59:30 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -782,6 +782,9 @@ post_bl_head(POST_ARGS) np->args->argv[c].value = mandoc_malloc ((size_t)n->nchild * sizeof(char *)); + n->data.Bl->ncols = np->args->argv[c].sz; + n->data.Bl->cols = (const char **)np->args->argv[c].value; + for (i = 0, nn = n->child; nn; i++) { np->args->argv[c].value[i] = nn->string; nn->string = NULL; -- cgit v1.2.3