aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index b0e3a68f..51144380 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.124 2010/05/15 16:24:38 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.125 2010/05/17 22:11:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
+#include "mandoc.h"
#include "out.h"
#include "term.h"
#include "mdoc.h"
@@ -1085,6 +1086,8 @@ static int
termp_nm_pre(DECL_ARGS)
{
+ if (NULL == n->child && NULL == m->name)
+
if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)
term_newln(p);
@@ -1092,6 +1095,7 @@ termp_nm_pre(DECL_ARGS)
if (NULL == n->child)
term_word(p, m->name);
+
return(1);
}
@@ -1216,7 +1220,7 @@ termp_rv_pre(DECL_ARGS)
term_word(p, "()");
}
- if (n->child->next)
+ if (n->child && n->child->next)
term_word(p, "functions return");
else
term_word(p, "function returns");
@@ -1255,7 +1259,7 @@ termp_ex_pre(DECL_ARGS)
p->flags &= ~TERMP_NOSPACE;
}
- if (n->child->next)
+ if (n->child && n->child->next)
term_word(p, "utilities exit");
else
term_word(p, "utility exits");