summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2012-07-09 22:36:05 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2012-07-09 22:36:05 +0000
commiteab3fae2c20e4df0ab568b2c83b6e9d014bb51b6 (patch)
treeb57e762730945ee2d64c9d0d0a3586afba6e8b17 /usr.bin/mandoc
parentd942d005d267c423064b9ab6e3e16b7fdf7e5bb8 (diff)
implement -Tman .Eo and .Ec
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mdoc_man.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index 91f67d81626..e5646d02dc5 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.25 2012/07/09 18:55:40 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.26 2012/07/09 22:36:04 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -44,6 +44,7 @@ static void post_bf(DECL_ARGS);
static void post_bk(DECL_ARGS);
static void post_dl(DECL_ARGS);
static void post_enc(DECL_ARGS);
+static void post_eo(DECL_ARGS);
static void post_fa(DECL_ARGS);
static void post_fl(DECL_ARGS);
static void post_fn(DECL_ARGS);
@@ -165,10 +166,10 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ NULL, NULL, NULL, NULL, NULL }, /* Dc */
{ cond_body, pre_enc, post_enc, "``", "''" }, /* Do */
{ cond_body, pre_enc, post_enc, "``", "''" }, /* Dq */
- { NULL, NULL, NULL, NULL, NULL }, /* _Ec */
- { NULL, NULL, NULL, NULL, NULL }, /* _Ef */
+ { NULL, NULL, NULL, NULL, NULL }, /* Ec */
+ { NULL, NULL, NULL, NULL, NULL }, /* Ef */
{ NULL, pre_em, post_font, NULL, NULL }, /* Em */
- { NULL, NULL, NULL, NULL, NULL }, /* _Eo */
+ { NULL, NULL, post_eo, NULL, NULL }, /* Eo */
{ NULL, pre_ux, NULL, "FreeBSD", NULL }, /* Fx */
{ NULL, pre_sy, post_font, NULL, NULL }, /* Ms */
{ NULL, pre_no, NULL, NULL, NULL }, /* No */
@@ -752,6 +753,14 @@ pre_em(DECL_ARGS)
return(1);
}
+static void
+post_eo(DECL_ARGS)
+{
+
+ if (MDOC_HEAD == n->type || MDOC_BODY == n->type)
+ outflags &= ~MMAN_spc;
+}
+
static int
pre_fa(DECL_ARGS)
{