From c7edeacf2a329a580fb993cc428ebc007c409cf3 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 20 Aug 2009 11:51:07 +0000 Subject: Added `DT' macro (pointed out by joerg@netbsd.org). --- man.7 | 14 ++++++++++---- man.c | 2 +- man.h | 3 ++- man_action.c | 1 + man_macro.c | 1 + man_term.c | 3 ++- man_validate.c | 3 ++- mandoc.1 | 1 + 8 files changed, 20 insertions(+), 8 deletions(-) diff --git a/man.7 b/man.7 index ab02f9f9..c12264ba 100644 --- a/man.7 +++ b/man.7 @@ -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 2ed39903..f3f28c6b 100644 --- a/man.c +++ b/man.c @@ -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 c64dce0e..d691d610 100644 --- a/man.h +++ b/man.h @@ -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 bd700079..747708c6 100644 --- a/man_action.c +++ b/man_action.c @@ -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 51566e0a..5839f560 100644 --- a/man_macro.c +++ b/man_macro.c @@ -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 cc636e03..358211cc 100644 --- a/man_term.c +++ b/man_term.c @@ -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 2801a402..668d5c87 100644 --- a/man_validate.c +++ b/man_validate.c @@ -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 e6b2f154..aecfa8ae 100644 --- a/mandoc.1 +++ b/mandoc.1 @@ -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 -- cgit