]> git.cameronkatri.com Git - mandoc.git/commitdiff
Merged patch by Ingo Schwarze allowing `Xr' to pass through with no arguments (emits...
authorKristaps Dzonsons <kristaps@bsd.lv>
Sat, 3 Apr 2010 14:25:12 +0000 (14:25 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Sat, 3 Apr 2010 14:25:12 +0000 (14:25 +0000)
mdoc_html.c
mdoc_term.c
mdoc_validate.c

index b6d6e8a5ecb928b0ae8e990c132536b386f5de82..7c99cad857c251c911fac36214c2489170f32aa0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_html.c,v 1.55 2010/03/29 19:28:04 kristaps Exp $ */
+/*     $Id: mdoc_html.c,v 1.56 2010/04/03 14:25:12 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -756,6 +756,9 @@ mdoc_xr_pre(MDOC_ARGS)
        struct htmlpair          tag[2];
        const struct mdoc_node  *nn;
 
        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) {
        PAIR_CLASS_INIT(&tag[0], "link-man");
 
        if (h->base_man) {
index 07cc5ea34ee993807859a3f9ff8abca3b1984afb..6197f10d4bf56c45b01a404fe357f2f3a5d53865 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_term.c,v 1.112 2010/03/29 19:28:04 kristaps Exp $ */
+/*     $Id: mdoc_term.c,v 1.113 2010/04/03 14:25:12 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -1277,7 +1277,10 @@ termp_xr_pre(DECL_ARGS)
 {
        const struct mdoc_node *nn;
 
 {
        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);
        nn = n->child;
 
        term_word(p, nn->string);
index d9f71ddf444ee0a00dafbd53b5db0158259419d6..a08ca405319457b8cd45fe6b50adc6c075e1673e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_validate.c,v 1.62 2010/04/03 14:12:48 kristaps Exp $ */
+/*     $Id: mdoc_validate.c,v 1.63 2010/04/03 14:25:12 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -133,7 +133,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_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 };
 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 };