aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-07 21:44:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-07 21:44:49 +0000
commit82c57a25774895a097ac93aa5b0fee892cb197e8 (patch)
treec20e6233c21ee16b56a5ec46aca359155615dc32
parent72ffb5f81a5259c8b01aa48d71c3542bc8eed8d7 (diff)
downloadmandoc-82c57a25774895a097ac93aa5b0fee892cb197e8.tar.gz
mandoc-82c57a25774895a097ac93aa5b0fee892cb197e8.tar.zst
mandoc-82c57a25774895a097ac93aa5b0fee892cb197e8.zip
implement .DT in terms of .ta; needed for print/ghostview, for example
-rw-r--r--man.712
-rw-r--r--man_term.c14
2 files changed, 20 insertions, 6 deletions
diff --git a/man.7 b/man.7
index 3ce8a4ed..1a79f298 100644
--- a/man.7
+++ b/man.7
@@ -1,4 +1,4 @@
-.\" $Id: man.7,v 1.134 2017/05/05 15:54:59 schwarze Exp $
+.\" $Id: man.7,v 1.135 2017/05/07 21:44:49 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 5 2017 $
+.Dd $Mdocdate: May 7 2017 $
.Dt MAN 7
.Os
.Sh NAME
@@ -348,8 +348,12 @@ See also
and
.Sx \&IR .
.Ss \&DT
-Has no effect.
-Included for compatibility.
+Restore the default tabulator positions.
+They are at intervals of 0.5 inches.
+This has no effect unless the tabulator positions were changed with the
+.Xr roff 7
+.Ic \&ta
+request.
.Ss \&EE
This is a non-standard GNU extension, included only for compatibility.
In
diff --git a/man_term.c b/man_term.c
index a96974f9..b902184a 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.198 2017/05/07 17:31:45 schwarze Exp $ */
+/* $Id: man_term.c,v 1.199 2017/05/07 21:44:49 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -68,6 +68,7 @@ static void print_bvspace(struct termp *,
const struct roff_node *, int);
static int pre_B(DECL_ARGS);
+static int pre_DT(DECL_ARGS);
static int pre_HP(DECL_ARGS);
static int pre_I(DECL_ARGS);
static int pre_IP(DECL_ARGS);
@@ -117,7 +118,7 @@ static const struct termact __termacts[MAN_MAX - MAN_TH] = {
{ pre_literal, NULL, 0 }, /* fi */
{ NULL, NULL, 0 }, /* RE */
{ pre_RS, post_RS, 0 }, /* RS */
- { pre_ign, NULL, 0 }, /* DT */
+ { pre_DT, NULL, 0 }, /* DT */
{ pre_ign, NULL, MAN_NOTEXT }, /* UC */
{ pre_PD, NULL, MAN_NOTEXT }, /* PD */
{ pre_ign, NULL, 0 }, /* AT */
@@ -392,6 +393,15 @@ pre_in(DECL_ARGS)
}
static int
+pre_DT(DECL_ARGS)
+{
+ term_tab_set(p, NULL);
+ term_tab_set(p, "T");
+ term_tab_set(p, ".5i");
+ return 0;
+}
+
+static int
pre_HP(DECL_ARGS)
{
struct roffsu su;