summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/man_term.c4
-rw-r--r--usr.bin/mandoc/mandoc.h5
-rw-r--r--usr.bin/mandoc/tbl.c6
-rw-r--r--usr.bin/mandoc/tbl_data.c3
-rw-r--r--usr.bin/mandoc/tbl_html.c6
-rw-r--r--usr.bin/mandoc/tbl_term.c6
6 files changed, 11 insertions, 19 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index b350643f8c1..a66ab89c2dc 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_term.c,v 1.119 2015/01/24 02:41:32 schwarze Exp $ */
+/* $OpenBSD: man_term.c,v 1.120 2015/01/30 17:31:20 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -947,7 +947,7 @@ print_man_node(DECL_ARGS)
* Tables are preceded by a newline. Then process a
* table line, which will cause line termination,
*/
- if (TBL_SPAN_FIRST & n->span->flags)
+ if (n->span->prev == NULL)
term_newln(p);
term_tbl(p, n->span);
return;
diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h
index a47a8e08df1..71f3f940e87 100644
--- a/usr.bin/mandoc/mandoc.h
+++ b/usr.bin/mandoc/mandoc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandoc.h,v 1.135 2015/01/30 04:08:37 schwarze Exp $ */
+/* $OpenBSD: mandoc.h,v 1.136 2015/01/30 17:31:20 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -285,9 +285,6 @@ struct tbl_span {
struct tbl_span *prev;
struct tbl_span *next;
int line; /* parse line */
- int flags;
-#define TBL_SPAN_FIRST (1 << 0)
-#define TBL_SPAN_LAST (1 << 1)
enum tbl_spant pos;
};
diff --git a/usr.bin/mandoc/tbl.c b/usr.bin/mandoc/tbl.c
index 9af8a34a6a1..af145363190 100644
--- a/usr.bin/mandoc/tbl.c
+++ b/usr.bin/mandoc/tbl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tbl.c,v 1.19 2015/01/30 04:08:37 schwarze Exp $ */
+/* $OpenBSD: tbl.c,v 1.20 2015/01/30 17:31:20 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -177,9 +177,5 @@ tbl_end(struct tbl_node **tblp)
tbl->line, tbl->pos, NULL);
return(0);
}
-
- if (tbl->last_span != NULL)
- tbl->last_span->flags |= TBL_SPAN_LAST;
-
return(1);
}
diff --git a/usr.bin/mandoc/tbl_data.c b/usr.bin/mandoc/tbl_data.c
index 75ea87db76b..972868ff189 100644
--- a/usr.bin/mandoc/tbl_data.c
+++ b/usr.bin/mandoc/tbl_data.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tbl_data.c,v 1.25 2015/01/30 04:08:37 schwarze Exp $ */
+/* $OpenBSD: tbl_data.c,v 1.26 2015/01/30 17:31:20 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -171,7 +171,6 @@ newspan(struct tbl_node *tbl, int line, struct tbl_row *rp)
if (dp->prev == NULL) {
tbl->first_span = dp;
tbl->current_span = NULL;
- dp->flags |= TBL_SPAN_FIRST;
} else
dp->prev->next = dp;
tbl->last_span = dp;
diff --git a/usr.bin/mandoc/tbl_html.c b/usr.bin/mandoc/tbl_html.c
index 830a663492e..f5c844d7588 100644
--- a/usr.bin/mandoc/tbl_html.c
+++ b/usr.bin/mandoc/tbl_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tbl_html.c,v 1.10 2015/01/30 04:08:37 schwarze Exp $ */
+/* $OpenBSD: tbl_html.c,v 1.11 2015/01/30 17:31:20 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -52,7 +52,7 @@ html_tblopen(struct html *h, const struct tbl_span *sp)
struct roffcol *col;
int ic;
- if (sp->flags & TBL_SPAN_FIRST) {
+ if (h->tbl.cols == NULL) {
h->tbl.len = html_tbl_len;
h->tbl.slen = html_tbl_strlen;
tblcalc(&h->tbl, sp, 0);
@@ -130,7 +130,7 @@ print_tbl(struct html *h, const struct tbl_span *sp)
h->flags &= ~HTML_NONOSPACE;
- if (sp->flags & TBL_SPAN_LAST) {
+ if (sp->next == NULL) {
assert(h->tbl.cols);
free(h->tbl.cols);
h->tbl.cols = NULL;
diff --git a/usr.bin/mandoc/tbl_term.c b/usr.bin/mandoc/tbl_term.c
index 91cda335046..40b24a63439 100644
--- a/usr.bin/mandoc/tbl_term.c
+++ b/usr.bin/mandoc/tbl_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tbl_term.c,v 1.24 2015/01/30 04:08:37 schwarze Exp $ */
+/* $OpenBSD: tbl_term.c,v 1.25 2015/01/30 17:31:20 schwarze Exp $ */
/*
* Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -79,7 +79,7 @@ term_tbl(struct termp *tp, const struct tbl_span *sp)
* calculate the table widths and decimal positions.
*/
- if (sp->flags & TBL_SPAN_FIRST) {
+ if (tp->tbl.cols == NULL) {
term_flushln(tp);
tp->tbl.len = term_tbl_len;
@@ -187,7 +187,7 @@ term_tbl(struct termp *tp, const struct tbl_span *sp)
* existing table configuration and set it to NULL.
*/
- if (sp->flags & TBL_SPAN_LAST) {
+ if (sp->next == NULL) {
if (sp->opts->opts & (TBL_OPT_DBOX | TBL_OPT_BOX)) {
tbl_hrule(tp, sp, 1);
tp->skipvsp = 1;