summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-08-20 11:51:07 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-08-20 11:51:07 +0000
commit93b9517948ce8754648c4f1033dec11f6eeb7b93 (patch)
tree1d78933de1ee8ea09a58a2dae9334d4f5e60f71b
parentee5166e47bf9023c5bef7b18355da9392155a340 (diff)
downloadmandoc-93b9517948ce8754648c4f1033dec11f6eeb7b93.tar.gz
mandoc-93b9517948ce8754648c4f1033dec11f6eeb7b93.tar.zst
mandoc-93b9517948ce8754648c4f1033dec11f6eeb7b93.zip
Added `DT' macro (pointed out by joerg@netbsd.org).
-rw-r--r--man.716
-rw-r--r--man.c4
-rw-r--r--man.h5
-rw-r--r--man_action.c3
-rw-r--r--man_macro.c3
-rw-r--r--man_term.c5
-rw-r--r--man_validate.c5
-rw-r--r--mandoc.15
8 files changed, 29 insertions, 17 deletions
diff --git a/man.7 b/man.7
index 1cffbe8d..f86baf21 100644
--- a/man.7
+++ b/man.7
@@ -1,4 +1,4 @@
-.\" $Id: man.7,v 1.30 2009/08/20 11:44:47 kristaps Exp $
+.\" $Id: man.7,v 1.31 2009/08/20 11:51:07 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -203,6 +203,7 @@ file.
. It B Ta n Ta next-line
. It BI Ta n Ta current
. It BR Ta n Ta current
+. It DT Ta 0 Ta current
. It I Ta n Ta next-line
. It IB Ta n Ta current
. It IR Ta n Ta current
@@ -221,7 +222,9 @@ file.
. It sp Ta 1 Ta current
. El
. Pp
-The lower-case
+The
+. Sq RS ,
+. Sq RE ,
. Sq br ,
. Sq fi ,
. Sq i ,
@@ -282,13 +285,14 @@ end of file.
. Pp
If a block macro is next-line scoped, it may only be followed by in-line
macros (excluding
+. Sq DT ,
+. Sq TH ,
. Sq br ,
. Sq na ,
. Sq sp ,
. Sq nf ,
-. Sq fi ,
and
-. Sq TH ) .
+. Sq fi ) .
.
.
.Sh REFERENCE
@@ -335,6 +339,8 @@ render in italics. Whitespace between arguments is omitted in output.
. It BR
Text is rendered alternately in bold face and roman (the default font).
Whitespace between arguments is omitted in output.
+. It DT
+Re-set the tab spacing to 0.5 inches.
. It HP
Begin a paragraph whose initial output line is left-justified, but
subsequent output lines are indented, with the following syntax:
@@ -455,7 +461,7 @@ End literal mode begun by
Italicise arguments. If no arguments are specified, all subsequent text
is italicised.
. It na
-No alignment to the right margin.
+Don't alignment the right margin.
. It nf
Begin literal mode: all subsequent free-form lines have their end of
line boundaries preserved. May be ended by
diff --git a/man.c b/man.c
index 2f155808..6cac5884 100644
--- a/man.c
+++ b/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.32 2009/08/19 12:00:46 kristaps Exp $ */
+/* $Id: man.c,v 1.33 2009/08/20 11:51:07 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -52,7 +52,7 @@ const char *const __man_macronames[MAN_MAX] = {
"R", "B", "I", "IR",
"RI", "na", "i", "sp",
"nf", "fi", "r", "RE",
- "RS"
+ "RS", "DT"
};
const char * const *man_macronames = __man_macronames;
diff --git a/man.h b/man.h
index c4f0f583..ab66b8ed 100644
--- a/man.h
+++ b/man.h
@@ -1,4 +1,4 @@
-/* $Id: man.h,v 1.18 2009/08/19 09:14:50 kristaps Exp $ */
+/* $Id: man.h,v 1.19 2009/08/20 11:51:07 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -48,7 +48,8 @@
#define MAN_r 26
#define MAN_RE 27
#define MAN_RS 28
-#define MAN_MAX 29
+#define MAN_DT 29
+#define MAN_MAX 30
enum man_type {
MAN_TEXT,
diff --git a/man_action.c b/man_action.c
index 38ac684d..e90065ad 100644
--- a/man_action.c
+++ b/man_action.c
@@ -1,4 +1,4 @@
-/* $Id: man_action.c,v 1.16 2009/08/19 09:14:50 kristaps Exp $ */
+/* $Id: man_action.c,v 1.17 2009/08/20 11:51:07 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -65,6 +65,7 @@ const struct actions man_actions[MAN_MAX] = {
{ NULL }, /* r */
{ NULL }, /* RE */
{ NULL }, /* RS */
+ { NULL }, /* DT */
};
diff --git a/man_macro.c b/man_macro.c
index de2c5ea4..7a5518b0 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.22 2009/08/19 12:15:58 kristaps Exp $ */
+/* $Id: man_macro.c,v 1.23 2009/08/20 11:51:07 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -65,6 +65,7 @@ const struct man_macro __man_macros[MAN_MAX] = {
{ in_line_eoln, 0 }, /* r */
{ blk_close, 0 }, /* RE */
{ blk_imp, MAN_EXPLICIT }, /* RS */
+ { in_line_eoln, 0 }, /* DT */
};
const struct man_macro * const man_macros = __man_macros;
diff --git a/man_term.c b/man_term.c
index 8289dd49..73b44d58 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.26 2009/08/19 11:30:40 kristaps Exp $ */
+/* $Id: man_term.c,v 1.27 2009/08/20 11:51:07 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -110,7 +110,7 @@ static const struct termact termacts[MAN_MAX] = {
{ pre_I, post_I }, /* I */
{ pre_IR, NULL }, /* IR */
{ pre_RI, NULL }, /* RI */
- { NULL, NULL }, /* na */ /* TODO: document that has no effect */
+ { NULL, NULL }, /* na */
{ pre_I, post_i }, /* i */
{ pre_sp, NULL }, /* sp */
{ pre_nf, NULL }, /* nf */
@@ -118,6 +118,7 @@ static const struct termact termacts[MAN_MAX] = {
{ pre_r, NULL }, /* r */
{ NULL, NULL }, /* RE */
{ pre_RS, post_RS }, /* RS */
+ { NULL, NULL }, /* DT */
};
#ifdef __linux__
diff --git a/man_validate.c b/man_validate.c
index ba3d11bc..fa847cae 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -1,4 +1,4 @@
-/* $Id: man_validate.c,v 1.20 2009/08/19 12:15:58 kristaps Exp $ */
+/* $Id: man_validate.c,v 1.21 2009/08/20 11:51:07 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -84,7 +84,8 @@ static const struct man_valid man_valids[MAN_MAX] = {
{ pres_bline, posts_eq0 }, /* fi */
{ NULL, NULL }, /* r */
{ NULL, NULL }, /* RE */
- { NULL, NULL }, /* RS */
+ { NULL, NULL }, /* RS */ /* FIXME: warn if empty body. */
+ { NULL, NULL }, /* DT */
};
diff --git a/mandoc.1 b/mandoc.1
index ae42eb76..2f990654 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.30 2009/08/19 09:14:50 kristaps Exp $
+.\" $Id: mandoc.1,v 1.31 2009/08/20 11:51:07 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -14,7 +14,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: August 19 2009 $
+.Dd $Mdocdate: August 20 2009 $
.Dt MANDOC 1
.Os
.\" SECTION
@@ -257,6 +257,7 @@ To check over a large set of manuals:
.Dl % mandoc \-Tlint \-fign-errors `find /usr/src -name \e*\e.[1-9]`
.\" SECTION
.Sh COMPATIBILITY
+.\" FIXME: libman `na' and `DT' have no effect.
This section summarises
.Nm
compatibility with