X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/f813f185be40796eacad83ea709b1ba0374a67c1..c75a70fe96c444404797d0ca3abc9edf5076a713:/mdoc_action.c?ds=inline diff --git a/mdoc_action.c b/mdoc_action.c index 0618f3ea..5bdc2fcd 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,6 +1,6 @@ -/* $Id: mdoc_action.c,v 1.74 2010/07/01 22:56:17 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.78 2010/07/30 17:14:09 joerg Exp $ */ /* - * Copyright (c) 2008, 2009 Kristaps Dzonsons + * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -660,6 +660,13 @@ post_bl_tagwidth(POST_ARGS) assert(MDOC_BLOCK == nn->type); nn = nn->head->child; + if (nn == NULL) { + /* No -width for .Bl and first .It is emtpy */ + if ( ! mdoc_nmsg(m, n, MANDOCERR_NOWIDTHARG)) + return(0); + break; + } + if (MDOC_TEXT == nn->type) { sz = strlen(nn->string) + 1; break; @@ -782,6 +789,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; @@ -901,6 +911,11 @@ post_dd(POST_ARGS) { char buf[DATESIZ]; + if (NULL == n->child) { + m->meta.date = time(NULL); + return(post_prol(m, n)); + } + if ( ! concat(m, buf, n->child, DATESIZ)) return(0);