summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2010-11-29 02:26:45 +0000
committerschwarze <schwarze@openbsd.org>2010-11-29 02:26:45 +0000
commit67a859d656ca5c1c8f2f3c8fa392a33d9c008a86 (patch)
tree14880bf9307ac8a51d080add3fd42c3471434db9
parentDowngrade the easier of the two cases of MANDOCERR_SYNTLINESCOPE (diff)
downloadwireguard-openbsd-67a859d656ca5c1c8f2f3c8fa392a33d9c008a86.tar.xz
wireguard-openbsd-67a859d656ca5c1c8f2f3c8fa392a33d9c008a86.zip
Now that we have proper .de support in the roff(7) library,
it is time to remove the .Sp, .Vb, and .Ve kludge that was added to the man(7) library to build Perl manuals.
-rw-r--r--usr.bin/mandoc/man.323
-rw-r--r--usr.bin/mandoc/man.c4
-rw-r--r--usr.bin/mandoc/man.h5
-rw-r--r--usr.bin/mandoc/man_action.c5
-rw-r--r--usr.bin/mandoc/man_html.c26
-rw-r--r--usr.bin/mandoc/man_macro.c5
-rw-r--r--usr.bin/mandoc/man_term.c16
-rw-r--r--usr.bin/mandoc/man_validate.c5
8 files changed, 18 insertions, 71 deletions
diff --git a/usr.bin/mandoc/man.3 b/usr.bin/mandoc/man.3
index a9d34681d57..39732684dd7 100644
--- a/usr.bin/mandoc/man.3
+++ b/usr.bin/mandoc/man.3
@@ -1,4 +1,4 @@
-.\" $Id: man.3,v 1.16 2010/10/23 17:11:31 schwarze Exp $
+.\" $Id: man.3,v 1.17 2010/11/29 02:26:45 schwarze Exp $
.\"
.\" Copyright (c) 2009-2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -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: October 23 2010 $
+.Dd $Mdocdate: November 29 2010 $
.Dt MAN 3
.Os
.Sh NAME
@@ -81,28 +81,11 @@ Beyond the full set of macros defined in
.Xr man 7 ,
the
.Nm
-library also accepts the following macros:
+library also accepts the following macro:
.Pp
.Bl -tag -width Ds -compact
.It PD
Has no effect. Handled as a current-scope line macro.
-.It Sp
-A synonym for
-.Sq sp 0.5v
-.Pq part of the standard preamble for Perl documentation .
-Handled as a line macro.
-.It Vb
-A synonym for
-.Sq nf
-.Pq part of the standard preamble for Perl documentation .
-Handled as a current-scope line macro.
-.It Ve
-A synonym for
-.Sq fi ,
-closing
-.Sq Vb
-.Pq part of the standard preamble for Perl documentation .
-Handled as a current-scope line macro.
.El
.Ss Types
.Bl -ohang
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c
index 7702d3adbae..421ed139c15 100644
--- a/usr.bin/mandoc/man.c
+++ b/usr.bin/mandoc/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.46 2010/11/29 01:44:41 schwarze Exp $ */
+/* $Id: man.c,v 1.47 2010/11/29 02:26:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -39,7 +39,7 @@ const char *const __man_macronames[MAN_MAX] = {
"RI", "na", "i", "sp",
"nf", "fi", "r", "RE",
"RS", "DT", "UC", "PD",
- "Sp", "Vb", "Ve", "AT",
+ "AT",
"in", "TS", "TE", "ft",
};
diff --git a/usr.bin/mandoc/man.h b/usr.bin/mandoc/man.h
index 2f4bd8eb941..e976af6db90 100644
--- a/usr.bin/mandoc/man.h
+++ b/usr.bin/mandoc/man.h
@@ -1,4 +1,4 @@
-/* $Id: man.h,v 1.29 2010/11/29 00:12:02 schwarze Exp $ */
+/* $Id: man.h,v 1.30 2010/11/29 02:26:45 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -53,9 +53,6 @@ enum mant {
MAN_DT,
MAN_UC,
MAN_PD,
- MAN_Sp,
- MAN_Vb,
- MAN_Ve,
MAN_AT,
MAN_in,
MAN_TS,
diff --git a/usr.bin/mandoc/man_action.c b/usr.bin/mandoc/man_action.c
index c8a23b79ceb..12f586b7345 100644
--- a/usr.bin/mandoc/man_action.c
+++ b/usr.bin/mandoc/man_action.c
@@ -1,4 +1,4 @@
-/* $Id: man_action.c,v 1.27 2010/11/29 00:12:02 schwarze Exp $ */
+/* $Id: man_action.c,v 1.28 2010/11/29 02:26:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -71,9 +71,6 @@ const struct actions man_actions[MAN_MAX] = {
{ NULL }, /* DT */
{ post_UC }, /* UC */
{ NULL }, /* PD */
- { NULL }, /* Sp */
- { post_nf }, /* Vb */
- { post_fi }, /* Ve */
{ post_AT }, /* AT */
{ NULL }, /* in */
{ post_TS }, /* TS */
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index 22d544b6231..6301ddc3906 100644
--- a/usr.bin/mandoc/man_html.c
+++ b/usr.bin/mandoc/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.20 2010/11/29 00:12:02 schwarze Exp $ */
+/* $Id: man_html.c,v 1.21 2010/11/29 02:26:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -110,9 +110,6 @@ static const struct htmlman mans[MAN_MAX] = {
{ man_ign_pre, NULL }, /* DT */
{ man_ign_pre, NULL }, /* UC */
{ man_ign_pre, NULL }, /* PD */
- { man_br_pre, NULL }, /* Sp */
- { man_literal_pre, NULL }, /* Vb */
- { man_literal_pre, NULL }, /* Ve */
{ man_ign_pre, NULL }, /* AT */
{ man_in_pre, NULL }, /* in */
{ NULL, NULL }, /* TS */
@@ -366,18 +363,11 @@ man_br_pre(MAN_ARGS)
SCALE_VS_INIT(&su, 1);
- switch (n->tok) {
- case (MAN_Sp):
- SCALE_VS_INIT(&su, 0.5);
- break;
- case (MAN_sp):
+ if (MAN_sp == n->tok) {
if (n->child)
a2roffsu(n->child->string, &su, SCALE_VS);
- break;
- default:
+ } else
su.scale = 0;
- break;
- }
bufcat_su(h, "height", &su);
PAIR_STYLE_INIT(&tag, h);
@@ -779,17 +769,11 @@ static int
man_literal_pre(MAN_ARGS)
{
- switch (n->tok) {
- case (MAN_nf):
- /* FALLTHROUGH */
- case (MAN_Vb):
+ if (MAN_nf == n->tok) {
print_otag(h, TAG_BR, 0, NULL);
mh->fl |= MANH_LITERAL;
- return(MAN_Vb != n->tok);
- default:
+ } else
mh->fl &= ~MANH_LITERAL;
- break;
- }
return(1);
}
diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c
index e1a1c752ee2..f226db507b3 100644
--- a/usr.bin/mandoc/man_macro.c
+++ b/usr.bin/mandoc/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.22 2010/11/29 00:12:02 schwarze Exp $ */
+/* $Id: man_macro.c,v 1.23 2010/11/29 02:26:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -75,9 +75,6 @@ const struct man_macro __man_macros[MAN_MAX] = {
{ in_line_eoln, 0 }, /* DT */
{ in_line_eoln, 0 }, /* UC */
{ in_line_eoln, 0 }, /* PD */
- { in_line_eoln, MAN_NSCOPED }, /* Sp */
- { in_line_eoln, 0 }, /* Vb */
- { in_line_eoln, 0 }, /* Ve */
{ in_line_eoln, 0 }, /* AT */
{ in_line_eoln, 0 }, /* in */
{ blk_exp, MAN_EXPLICIT }, /* TS */
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index 4490c78a042..0b8a8d5cdc2 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.52 2010/11/29 00:12:02 schwarze Exp $ */
+/* $Id: man_term.c,v 1.53 2010/11/29 02:26:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -135,9 +135,6 @@ static const struct termact termacts[MAN_MAX] = {
{ pre_ign, NULL, 0 }, /* DT */
{ pre_ign, NULL, 0 }, /* UC */
{ pre_ign, NULL, 0 }, /* PD */
- { pre_sp, NULL, MAN_NOTEXT }, /* Sp */
- { pre_literal, NULL, 0 }, /* Vb */
- { pre_literal, NULL, 0 }, /* Ve */
{ pre_ign, NULL, 0 }, /* AT */
{ pre_in, NULL, MAN_NOTEXT }, /* in */
{ pre_TS, NULL, 0 }, /* TS */
@@ -254,16 +251,11 @@ pre_literal(DECL_ARGS)
{
term_newln(p);
- switch (n->tok) {
- case (MAN_Vb):
- /* FALLTHROUGH */
- case (MAN_nf):
+
+ if (MAN_nf == n->tok)
mt->fl |= MANT_LITERAL;
- return(MAN_Vb != n->tok);
- default:
+ else
mt->fl &= ~MANT_LITERAL;
- break;
- }
return(1);
}
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c
index f3967085186..e44d420749a 100644
--- a/usr.bin/mandoc/man_validate.c
+++ b/usr.bin/mandoc/man_validate.c
@@ -1,4 +1,4 @@
-/* $Id: man_validate.c,v 1.32 2010/11/29 00:12:02 schwarze Exp $ */
+/* $Id: man_validate.c,v 1.33 2010/11/29 02:26:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -93,9 +93,6 @@ static const struct man_valid man_valids[MAN_MAX] = {
{ NULL, NULL }, /* DT */
{ NULL, NULL }, /* UC */
{ NULL, NULL }, /* PD */
- { NULL, posts_le1 }, /* Sp */ /* FIXME: should warn only. */
- { pres_bline, posts_le1 }, /* Vb */ /* FIXME: should warn only. */
- { pres_bline, posts_eq0 }, /* Ve */
{ NULL, NULL }, /* AT */
{ NULL, NULL }, /* in */
{ NULL, NULL }, /* TS */