diff options
author | 2011-12-04 00:44:18 +0000 | |
---|---|---|
committer | 2011-12-04 00:44:18 +0000 | |
commit | 649d1604eb19f96ad8290edfef6128c080df365a (patch) | |
tree | 964b6e3f36632019ad134d1a1ba4270554f5b818 /usr.bin/mandoc/man_html.c | |
parent | more nits (diff) | |
download | wireguard-openbsd-649d1604eb19f96ad8290edfef6128c080df365a.tar.xz wireguard-openbsd-649d1604eb19f96ad8290edfef6128c080df365a.zip |
When a man document contains nothing at all except one or more invalid
macros, do not die on an assertion, but show correct error messages.
Assertions of meta data validity suggested by joerg@.
ok joerg@
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r-- | usr.bin/mandoc/man_html.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c index 4f096d9a9a5..bef778b3cbf 100644 --- a/usr.bin/mandoc/man_html.c +++ b/usr.bin/mandoc/man_html.c @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.44 2011/10/09 22:10:51 schwarze Exp $ */ +/* $Id: man_html.c,v 1.45 2011/12/04 00:44:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -174,6 +174,8 @@ print_man_head(MAN_ARGS) { print_gen_head(h); + assert(m->title); + assert(m->msec); bufcat_fmt(h, "%s(%s)", m->title, m->msec); print_otag(h, TAG_TITLE, 0, NULL); print_text(h, h->buf); @@ -301,6 +303,8 @@ man_root_pre(MAN_ARGS) if (m->vol) (void)strlcat(b, m->vol, BUFSIZ); + assert(m->title); + assert(m->msec); snprintf(title, BUFSIZ - 1, "%s(%s)", m->title, m->msec); PAIR_SUMMARY_INIT(&tag[0], "Document Header"); @@ -355,6 +359,7 @@ man_root_post(MAN_ARGS) PAIR_CLASS_INIT(&tag[0], "foot-date"); print_otag(h, TAG_TD, 1, tag); + assert(m->date); print_text(h, m->date); print_stagq(h, tt); |