]> git.cameronkatri.com Git - mandoc.git/blobdiff - mdoc_html.c
Clarified EXIT STATUS sections. Discussed among schwarze@, Thomas, and
[mandoc.git] / mdoc_html.c
index f109bd69d6774d999bdd20016a8b34997698856a..1ee5c07667e1ca1baf1c77b4e59edb546c81f4a5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_html.c,v 1.99 2010/07/23 00:08:57 kristaps Exp $ */
+/*     $Id: mdoc_html.c,v 1.102 2010/08/20 01:02:07 schwarze Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -1183,7 +1183,7 @@ mdoc_bl_pre(MDOC_ARGS)
        ord = malloc(sizeof(struct ord));
        if (NULL == ord) {
                perror(NULL);
-               exit(EXIT_FAILURE);
+               exit(MANDOCLEVEL_SYSERR);
        }
        ord->cookie = n;
        ord->pos = 1;
@@ -1457,14 +1457,11 @@ mdoc_bd_pre(MDOC_ARGS)
        print_otag(h, TAG_DIV, 2, tag);
 
        for (nn = n->child; nn; nn = nn->next) {
-               h->flags |= HTML_NOSPACE;
                print_mdoc_node(m, nn, h);
-               if (NULL == nn->next)
+               if (nn->next && nn->next->line == nn->line)
                        continue;
-               if (nn->prev && nn->prev->line < nn->line)
-                       print_text(h, "\n");
-               else if (NULL == nn->prev)
-                       print_text(h, "\n");
+               print_text(h, "\n");
+               h->flags |= HTML_NOSPACE;
        }
 
        return(0);