aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--man_html.c17
-rw-r--r--man_term.c15
-rw-r--r--tree.c9
3 files changed, 27 insertions, 14 deletions
diff --git a/man_html.c b/man_html.c
index 2c4e220a..4deb1cb3 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,7 +1,7 @@
-/* $Id: man_html.c,v 1.90 2013/10/17 20:54:58 schwarze Exp $ */
+/* $Id: man_html.c,v 1.91 2014/03/08 15:50:41 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -553,10 +553,15 @@ man_IP_pre(MAN_ARGS)
/* For TP, only print next-line header elements. */
- if (MAN_TP == n->tok)
- for (nn = n->child; nn; nn = nn->next)
- if (nn->line > n->line)
- print_man_node(man, nn, mh, h);
+ if (MAN_TP == n->tok) {
+ nn = n->child;
+ while (NULL != nn && 0 == (MAN_LINE & nn->flags))
+ nn = nn->next;
+ while (NULL != nn) {
+ print_man_node(man, nn, mh, h);
+ nn = nn->next;
+ }
+ }
return(0);
}
diff --git a/man_term.c b/man_term.c
index 10378d3a..3c059283 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.140 2014/02/16 12:33:39 schwarze Exp $ */
+/* $Id: man_term.c,v 1.141 2014/03/08 15:50:41 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -720,7 +720,7 @@ pre_TP(DECL_ARGS)
/* Calculate offset. */
if (NULL != (nn = n->parent->head->child))
- if (nn->string && nn->parent->line == nn->line)
+ if (nn->string && 0 == (MAN_LINE & nn->flags))
if ((ival = a2width(p, nn->string)) >= 0)
len = (size_t)ival;
@@ -737,9 +737,14 @@ pre_TP(DECL_ARGS)
mt->fl &= ~MANT_LITERAL;
/* Don't print same-line elements. */
- for (nn = n->child; nn; nn = nn->next)
- if (nn->line > n->line)
- print_man_node(p, mt, nn, meta);
+ nn = n->child;
+ while (NULL != nn && 0 == (MAN_LINE & nn->flags))
+ nn = nn->next;
+
+ while (NULL != nn) {
+ print_man_node(p, mt, nn, meta);
+ nn = nn->next;
+ }
if (savelit)
mt->fl |= MANT_LITERAL;
diff --git a/tree.c b/tree.c
index fdb70e1b..4e417052 100644
--- a/tree.c
+++ b/tree.c
@@ -1,7 +1,7 @@
-/* $Id: tree.c,v 1.50 2013/12/24 19:11:46 schwarze Exp $ */
+/* $Id: tree.c,v 1.51 2014/03/08 15:50:41 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -252,7 +252,10 @@ print_man(const struct man_node *n, int indent)
} else {
for (i = 0; i < indent; i++)
putchar('\t');
- printf("%s (%s) %d:%d\n", p, t, n->line, n->pos);
+ printf("%s (%s) ", p, t);
+ if (MAN_LINE & n->flags)
+ putchar('*');
+ printf("%d:%d\n", n->line, n->pos);
}
if (n->child)