]> git.cameronkatri.com Git - mandoc.git/blobdiff - mdoc_action.c
Correctly print `Lk' arguments in -Tascii. Issue raised by Aldis Berzoja.
[mandoc.git] / mdoc_action.c
index a4eb532c9bc45f2490946bafbf64fc5d363ab6f8..5bdc2fcd4f316779f526686d0f1e4f2dae146259 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_action.c,v 1.76 2010/07/13 23:53:20 schwarze Exp $ */
+/*     $Id: mdoc_action.c,v 1.78 2010/07/30 17:14:09 joerg Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  *
 /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -660,6 +660,13 @@ post_bl_tagwidth(POST_ARGS)
                assert(MDOC_BLOCK == nn->type);
                nn = nn->head->child;
 
                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;
                if (MDOC_TEXT == nn->type) {
                        sz = strlen(nn->string) + 1;
                        break;
@@ -904,6 +911,11 @@ post_dd(POST_ARGS)
 {
        char            buf[DATESIZ];
 
 {
        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);
 
        if ( ! concat(m, buf, n->child, DATESIZ))
                return(0);