From 148d5c4d2674e507ae720da1aa37065cf06a01db Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 3 Apr 2010 17:06:20 +0000 Subject: no need to die from .Xr without arguments, we can just ignore it ok deraadt@ --- usr.bin/mandoc/mdoc_html.c | 5 ++++- usr.bin/mandoc/mdoc_term.c | 7 +++++-- usr.bin/mandoc/mdoc_validate.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index ab1250ee032..fad95b2d99c 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.8 2010/03/02 00:38:59 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.9 2010/04/03 17:06:19 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -753,6 +753,9 @@ mdoc_xr_pre(MDOC_ARGS) struct htmlpair tag[2]; const struct mdoc_node *nn; + if (NULL == n->child) + return(0); + PAIR_CLASS_INIT(&tag[0], "link-man"); if (h->base_man) { diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index 438853ecae4..d4d3de5a407 100644 --- a/usr.bin/mandoc/mdoc_term.c +++ b/usr.bin/mandoc/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.71 2010/03/26 01:22:05 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.72 2010/04/03 17:06:19 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -1275,7 +1275,10 @@ termp_xr_pre(DECL_ARGS) { const struct mdoc_node *nn; - assert(n->child && MDOC_TEXT == n->child->type); + if (NULL == n->child) + return(0); + + assert(MDOC_TEXT == n->child->type); nn = n->child; term_word(p, nn->string); diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 45792ce5968..7bb7b0b2fe8 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.46 2010/04/03 16:30:42 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.47 2010/04/03 17:06:19 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -129,7 +129,7 @@ static v_post posts_text1[] = { eerr_eq1, NULL }; static v_post posts_vt[] = { post_vt, NULL }; static v_post posts_wline[] = { bwarn_ge1, herr_eq0, NULL }; static v_post posts_wtext[] = { ewarn_ge1, NULL }; -static v_post posts_xr[] = { eerr_ge1, NULL }; +static v_post posts_xr[] = { ewarn_ge1, NULL }; static v_pre pres_an[] = { pre_an, NULL }; static v_pre pres_bd[] = { pre_display, pre_bd, NULL }; static v_pre pres_bl[] = { pre_bl, NULL }; -- cgit v1.2.3