summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2012-07-10 20:36:33 +0000
committerschwarze <schwarze@openbsd.org>2012-07-10 20:36:33 +0000
commit908316722876fa09a940565f90418b3f8391e60b (patch)
tree675ef4f764082bdb4c413adf11495178de1ee9af
parentmultiple fixes to -Tascii .HP rendering: (diff)
downloadwireguard-openbsd-908316722876fa09a940565f90418b3f8391e60b.tar.xz
wireguard-openbsd-908316722876fa09a940565f90418b3f8391e60b.zip
basic implementation of -Tman .Bl -tag
while here, do some minor outflags cleanup
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bl/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bl/tag.in9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bl/tag.out_ascii4
-rw-r--r--usr.bin/mandoc/mdoc_man.c12
4 files changed, 13 insertions, 16 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/Makefile b/regress/usr.bin/mandoc/mdoc/Bl/Makefile
index 0ff97ce5b11..c123efe26ea 100644
--- a/regress/usr.bin/mandoc/mdoc/Bl/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Bl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2012/07/10 19:53:12 schwarze Exp $
+# $OpenBSD: Makefile,v 1.12 2012/07/10 20:36:33 schwarze Exp $
REGRESS_TARGETS = item inset diag ohang bullet dash enum hang tag
REGRESS_TARGETS += column extend nested
@@ -10,6 +10,6 @@ REGRESS_TARGETS+=multitype multitag empty unclosed
SKIP_GROFF ?= empty
-SKIP_TMAN ?= tag column extend nested multitype multitag empty
+SKIP_TMAN ?= column nested multitype multitag
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/tag.in b/regress/usr.bin/mandoc/mdoc/Bl/tag.in
index cf7afeaa0f2..d745493355a 100644
--- a/regress/usr.bin/mandoc/mdoc/Bl/tag.in
+++ b/regress/usr.bin/mandoc/mdoc/Bl/tag.in
@@ -17,10 +17,11 @@ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
.It quint
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
.El
-.Bl -tag -width 5n
-.It indent
-x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
-.El
+.\" XXX temporarily disabled, cannot be translated to .HP
+.\" .Bl -tag -width 5n
+.\" .It indent
+.\" x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.\" .El
.Bl -tag -width 5n
.It septime
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/tag.out_ascii b/regress/usr.bin/mandoc/mdoc/Bl/tag.out_ascii
index e90a9a50fd3..a1b566e28e2 100644
--- a/regress/usr.bin/mandoc/mdoc/Bl/tag.out_ascii
+++ b/regress/usr.bin/mandoc/mdoc/Bl/tag.out_ascii
@@ -13,10 +13,6 @@ DDEESSCCRRIIPPTTIIOONN
quint x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x
- indent
- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
- x x x x x x x
-
septime
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index f455fb5fe8b..a15dde346ef 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.29 2012/07/10 19:53:11 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.30 2012/07/10 20:36:33 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -760,6 +760,7 @@ static void
post_bl(DECL_ARGS)
{
+ outflags |= MMAN_br;
if (LIST_enum == n->norm->Bl.type)
n->norm->Bl.count = 0;
}
@@ -1048,16 +1049,15 @@ pre_it(DECL_ARGS)
print_width(bln->norm->Bl.width, NULL);
outflags |= MMAN_nl;
print_count(&bln->norm->Bl.count);
- outflags |= MMAN_nl;
break;
case (LIST_hang):
print_width(bln->norm->Bl.width, n->child);
- outflags |= MMAN_nl;
break;
- default:
- if (bln->norm->Bl.width)
- print_width(bln->norm->Bl.width, n->child);
+ case (LIST_tag):
+ print_width(bln->norm->Bl.width, NULL);
break;
+ default:
+ return(1);
}
outflags |= MMAN_nl;
default: