diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-24 02:41:49 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-24 02:41:49 +0000 |
commit | 46720e11f3c6e90c1850aaeb920a5a9b9b6eb659 (patch) | |
tree | 766adc3a89b9e019a0358906bfd706a7fbe2163c | |
parent | 9c71b16d77c19d5b2623befffcb1f7a489960bcc (diff) | |
download | mandoc-46720e11f3c6e90c1850aaeb920a5a9b9b6eb659.tar.gz |
Strangely, ignoring the roff(7) .na request was implemented in the man(7)
parser. Simplify the code by moving it into the roff(7) parser, also
making it work for mdoc(7).
-rw-r--r-- | man.7 | 8 | ||||
-rw-r--r-- | man.c | 2 | ||||
-rw-r--r-- | man.h | 1 | ||||
-rw-r--r-- | man_html.c | 1 | ||||
-rw-r--r-- | man_macro.c | 1 | ||||
-rw-r--r-- | man_term.c | 1 | ||||
-rw-r--r-- | man_validate.c | 1 | ||||
-rw-r--r-- | roff.c | 3 |
8 files changed, 5 insertions, 13 deletions
@@ -727,8 +727,6 @@ If is signed, the new offset is relative. Otherwise, it is absolute. This value is reset upon the next paragraph, section, or sub-section. -.Ss \&na -Don't align to the right margin. .Ss \&nf Begin literal mode: all subsequent free-form lines have their end of line boundaries preserved. @@ -780,10 +778,9 @@ is equivalent to If next-line macros are invoked consecutively, only the last is used. If a next-line macro is followed by a non-next-line macro, an error is raised, except for -.Sx \&br , -.Sx \&sp , +.Sx \&br and -.Sx \&na . +.Sx \&sp . .Pp The syntax is as follows: .Bd -literal -offset indent @@ -814,7 +811,6 @@ The syntax is as follows: .It Sx \&br Ta 0 Ta current Ta compat .It Sx \&fi Ta 0 Ta current Ta compat .It Sx \&in Ta 1 Ta current Ta compat -.It Sx \&na Ta 0 Ta current Ta compat .It Sx \&nf Ta 0 Ta current Ta compat .It Sx \&sp Ta 1 Ta current Ta compat .El @@ -39,7 +39,7 @@ const char *const __man_macronames[MAN_MAX] = { "IP", "HP", "SM", "SB", "BI", "IB", "BR", "RB", "R", "B", "I", "IR", - "RI", "na", "sp", "nf", + "RI", "sp", "nf", "fi", "RE", "RS", "DT", "UC", "PD", "AT", "in", "ft", "OP", "EX", "EE", @@ -38,7 +38,6 @@ enum mant { MAN_I, MAN_IR, MAN_RI, - MAN_na, MAN_sp, MAN_nf, MAN_fi, @@ -100,7 +100,6 @@ static const struct htmlman mans[MAN_MAX] = { { man_I_pre, NULL }, /* I */ { man_alt_pre, NULL }, /* IR */ { man_alt_pre, NULL }, /* RI */ - { man_ign_pre, NULL }, /* na */ { man_br_pre, NULL }, /* sp */ { man_literal_pre, NULL }, /* nf */ { man_literal_pre, NULL }, /* fi */ diff --git a/man_macro.c b/man_macro.c index 51d93692..596ea5b9 100644 --- a/man_macro.c +++ b/man_macro.c @@ -72,7 +72,6 @@ const struct man_macro __man_macros[MAN_MAX] = { { in_line_eoln, MAN_SCOPED | MAN_JOIN }, /* I */ { in_line_eoln, 0 }, /* IR */ { in_line_eoln, 0 }, /* RI */ - { in_line_eoln, MAN_NSCOPED }, /* na */ { in_line_eoln, MAN_NSCOPED }, /* sp */ { in_line_eoln, MAN_BSCOPE }, /* nf */ { in_line_eoln, MAN_BSCOPE }, /* fi */ @@ -114,7 +114,6 @@ static const struct termact termacts[MAN_MAX] = { { pre_I, NULL, 0 }, /* I */ { pre_alternate, NULL, 0 }, /* IR */ { pre_alternate, NULL, 0 }, /* RI */ - { pre_ign, NULL, MAN_NOTEXT }, /* na */ { pre_sp, NULL, MAN_NOTEXT }, /* sp */ { pre_literal, NULL, 0 }, /* nf */ { pre_literal, NULL, 0 }, /* fi */ diff --git a/man_validate.c b/man_validate.c index 48f2ed5b..3a774965 100644 --- a/man_validate.c +++ b/man_validate.c @@ -79,7 +79,6 @@ static v_check man_valids[MAN_MAX] = { NULL, /* I */ NULL, /* IR */ NULL, /* RI */ - check_eq0, /* na */ post_vs, /* sp */ post_nf, /* nf */ post_fi, /* fi */ @@ -179,7 +179,7 @@ enum rofft { ROFF_minss, ROFF_mk, ROFF_mso, - /* MAN_na; ignored in mdoc(7) */ + ROFF_na, ROFF_ne, /* MAN_nf; ignored in mdoc(7) */ ROFF_nh, @@ -580,6 +580,7 @@ static struct roffmac roffs[ROFF_MAX] = { { "minss", roff_line_ignore, NULL, NULL, 0, NULL }, { "mk", roff_line_ignore, NULL, NULL, 0, NULL }, { "mso", roff_insec, NULL, NULL, 0, NULL }, + { "na", roff_line_ignore, NULL, NULL, 0, NULL }, { "ne", roff_line_ignore, NULL, NULL, 0, NULL }, { "nh", roff_line_ignore, NULL, NULL, 0, NULL }, { "nhychar", roff_line_ignore, NULL, NULL, 0, NULL }, |