diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-17 22:11:42 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-17 22:11:42 +0000 |
commit | 95356d6189f5e5d41011a7cb60176f147e1fff7d (patch) | |
tree | c923ce026d6b8f420d203f151868c8b858e4501d /mdoc_html.c | |
parent | 114426748445942cb51394e59f2c62ad79bd974c (diff) | |
download | mandoc-95356d6189f5e5d41011a7cb60176f147e1fff7d.tar.gz mandoc-95356d6189f5e5d41011a7cb60176f147e1fff7d.tar.zst mandoc-95356d6189f5e5d41011a7cb60176f147e1fff7d.zip |
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.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 643492f9..89fdc5de 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.64 2010/05/17 02:38:13 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.65 2010/05/17 22:11:42 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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"); |