-/* $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>
*
#include <string.h>
#include <unistd.h>
+#include "mandoc.h"
#include "out.h"
#include "html.h"
#include "mdoc.h"
{
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");
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");
print_text(h, "()");
}
- if (n->child->next)
+ if (n->child && n->child->next)
print_text(h, "functions return");
else
print_text(h, "function returns");