summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-17 22:11:42 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-17 22:11:42 +0000
commitb11413460f4cfc6adeaaec03d30246715922f54d (patch)
tree4836abc5d313954c48af7a9145a26a861f309230 /mdoc_html.c
parent4123a170dcf7bb0ee57516df099aa6efc10ef5e1 (diff)
downloadmandoc-b11413460f4cfc6adeaaec03d30246715922f54d.tar.gz
Enable the unified error/warning enumeration in mandoc.h that's
stringified in main.c. Allow `An' to handle an argument and child (with a warning). Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a warning). Allow inconsistent column syntax to only raise a warning.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 9da1779e..3ccb2cf7 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <unistd.h>
+#include "mandoc.h"
#include "out.h"
#include "html.h"
#include "mdoc.h"
@@ -729,6 +730,9 @@ mdoc_nm_pre(MDOC_ARGS)
{
struct htmlpair tag;
+ if (NULL == n->child && NULL == m->name)
+ return(1);
+
if (SEC_SYNOPSIS == n->sec &&
n->prev && MDOC_LINE & n->flags) {
bufcat_style(h, "clear", "both");
@@ -1181,7 +1185,7 @@ mdoc_ex_pre(MDOC_ARGS)
h->flags &= ~HTML_NOSPACE;
}
- if (n->child->next)
+ if (n->child && n->child->next)
print_text(h, "utilities exit");
else
print_text(h, "utility exits");
@@ -1951,7 +1955,7 @@ mdoc_rv_pre(MDOC_ARGS)
print_text(h, "()");
}
- if (n->child->next)
+ if (n->child && n->child->next)
print_text(h, "functions return");
else
print_text(h, "function returns");