summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-24 02:41:33 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-24 02:41:33 +0000
commit6d7684840200d2f7b174148541400c0ceb47b92a (patch)
tree543eee741f288c54fa93578fc533fc5476951941
parent531f80401b20ecab8b2f9129681af43473f87e76 (diff)
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--share/man/man7/man.710
-rw-r--r--usr.bin/mandoc/man.c4
-rw-r--r--usr.bin/mandoc/man.h3
-rw-r--r--usr.bin/mandoc/man_html.c3
-rw-r--r--usr.bin/mandoc/man_macro.c3
-rw-r--r--usr.bin/mandoc/man_term.c3
-rw-r--r--usr.bin/mandoc/man_validate.c3
-rw-r--r--usr.bin/mandoc/roff.c5
8 files changed, 13 insertions, 21 deletions
diff --git a/share/man/man7/man.7 b/share/man/man7/man.7
index 80bfc1643aa..6075cfa0257 100644
--- a/share/man/man7/man.7
+++ b/share/man/man7/man.7
@@ -1,4 +1,4 @@
-.\" $OpenBSD: man.7,v 1.42 2015/01/24 02:14:33 schwarze Exp $
+.\" $OpenBSD: man.7,v 1.43 2015/01/24 02:41:32 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c
index 29e57e56fd9..7e38742a237 100644
--- a/usr.bin/mandoc/man.c
+++ b/usr.bin/mandoc/man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man.c,v 1.95 2015/01/15 04:26:06 schwarze Exp $ */
+/* $OpenBSD: man.c,v 1.96 2015/01/24 02:41:32 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -37,7 +37,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",
diff --git a/usr.bin/mandoc/man.h b/usr.bin/mandoc/man.h
index e3d120f5143..cd9b5998101 100644
--- a/usr.bin/mandoc/man.h
+++ b/usr.bin/mandoc/man.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: man.h,v 1.48 2014/12/24 18:03:34 schwarze Exp $ */
+/* $OpenBSD: man.h,v 1.49 2015/01/24 02:41:32 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -38,7 +38,6 @@ enum mant {
MAN_I,
MAN_IR,
MAN_RI,
- MAN_na,
MAN_sp,
MAN_nf,
MAN_fi,
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index 21383c8fec6..df647c50da1 100644
--- a/usr.bin/mandoc/man_html.c
+++ b/usr.bin/mandoc/man_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_html.c,v 1.61 2014/12/23 09:31:17 schwarze Exp $ */
+/* $OpenBSD: man_html.c,v 1.62 2015/01/24 02:41:32 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -98,7 +98,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/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c
index ebf620a162d..96f8017cc50 100644
--- a/usr.bin/mandoc/man_macro.c
+++ b/usr.bin/mandoc/man_macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_macro.c,v 1.55 2015/01/24 01:59:40 schwarze Exp $ */
+/* $OpenBSD: man_macro.c,v 1.56 2015/01/24 02:41:32 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -70,7 +70,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 */
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index 25224f821ee..b350643f8c1 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_term.c,v 1.118 2014/12/24 18:03:34 schwarze Exp $ */
+/* $OpenBSD: man_term.c,v 1.119 2015/01/24 02:41:32 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -112,7 +112,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/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c
index 07f04930ec8..2a21fb4669b 100644
--- a/usr.bin/mandoc/man_validate.c
+++ b/usr.bin/mandoc/man_validate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_validate.c,v 1.79 2014/12/28 14:39:08 schwarze Exp $ */
+/* $OpenBSD: man_validate.c,v 1.80 2015/01/24 02:41:32 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -77,7 +77,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 */
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
index 75545378fc8..b3993732c4e 100644
--- a/usr.bin/mandoc/roff.c
+++ b/usr.bin/mandoc/roff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: roff.c,v 1.127 2015/01/23 20:17:25 schwarze Exp $ */
+/* $OpenBSD: roff.c,v 1.128 2015/01/24 02:41:32 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -177,7 +177,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,
@@ -578,6 +578,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 },