From eab3fae2c20e4df0ab568b2c83b6e9d014bb51b6 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 9 Jul 2012 22:36:05 +0000 Subject: implement -Tman .Eo and .Ec --- usr.bin/mandoc/mdoc_man.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'usr.bin/mandoc') 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 * @@ -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) { -- cgit v1.2.3