summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2012-07-07 14:04:40 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2012-07-07 14:04:40 +0000
commit4b963a5ad6a0528046d6cefaf6fd82cb0100a905 (patch)
treeda840c8568680c5f2f1b2f535baba48ecb7bcf51 /usr.bin/mandoc
parentf9144fe0618c894e80f9cd4aa470ff7c66c56652 (diff)
after .Lb in library section, break the line in the final output
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mdoc_man.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index af6c8518cec..3414de161ca 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.10 2012/07/07 13:56:19 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.11 2012/07/07 14:04:39 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -49,6 +49,7 @@ static void post_bd(DECL_ARGS);
static void post_bk(DECL_ARGS);
static void post_dl(DECL_ARGS);
static void post_enc(DECL_ARGS);
+static void post_lb(DECL_ARGS);
static void post_nm(DECL_ARGS);
static void post_percent(DECL_ARGS);
static void post_pf(DECL_ARGS);
@@ -187,7 +188,7 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ NULL, NULL, NULL, NULL, NULL }, /* Hf */
{ NULL, NULL, NULL, NULL, NULL }, /* Fr */
{ NULL, pre_ux, NULL, "currently under development.", NULL }, /* Ud */
- { NULL, NULL, NULL, NULL, NULL }, /* _Lb */
+ { NULL, NULL, post_lb, NULL, NULL }, /* Lb */
{ NULL, pre_pp, NULL, NULL, NULL }, /* Lp */
{ NULL, NULL, NULL, NULL, NULL }, /* _Lk */
{ NULL, NULL, NULL, NULL, NULL }, /* _Mt */
@@ -605,6 +606,17 @@ pre_it(DECL_ARGS)
return(1);
}
+static void
+post_lb(DECL_ARGS)
+{
+
+ if (SEC_LIBRARY == n->sec) {
+ mm->need_nl = 1;
+ print_word(mm, ".br");
+ mm->need_nl = 1;
+ }
+}
+
static int
pre_nm(DECL_ARGS)
{