aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-03-30 19:47:48 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-03-30 19:47:48 +0000
commitb1938d01834105572311aa9b06d667939309bee7 (patch)
tree9517f74166bc2092376ceb274bb4e8fdd03eb66c /mdoc_man.c
parent08b72b8f1a54d84a06924f40ca973826190c215b (diff)
downloadmandoc-b1938d01834105572311aa9b06d667939309bee7.tar.gz
mandoc-b1938d01834105572311aa9b06d667939309bee7.tar.zst
mandoc-b1938d01834105572311aa9b06d667939309bee7.zip
Implement the roff(7) .ll (line length) request.
Found by naddy@ in the textproc/enchant(1) port. Of course, do not use this in new manuals.
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index e4db5aed..a953e755 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.59 2014/03/23 11:25:26 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.60 2014/03/30 19:47:48 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -90,6 +90,7 @@ static int pre_in(DECL_ARGS);
static int pre_it(DECL_ARGS);
static int pre_lk(DECL_ARGS);
static int pre_li(DECL_ARGS);
+static int pre_ll(DECL_ARGS);
static int pre_nm(DECL_ARGS);
static int pre_no(DECL_ARGS);
static int pre_ns(DECL_ARGS);
@@ -241,6 +242,7 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ NULL, pre_sp, post_sp, NULL, NULL }, /* sp */
{ NULL, NULL, post_percent, NULL, NULL }, /* %U */
{ NULL, NULL, NULL, NULL, NULL }, /* Ta */
+ { NULL, pre_ll, post_sp, NULL, NULL }, /* ll */
{ NULL, NULL, NULL, NULL, NULL }, /* ROOT */
};
@@ -1406,6 +1408,14 @@ pre_lk(DECL_ARGS)
}
static int
+pre_ll(DECL_ARGS)
+{
+
+ print_line(".ll", 0);
+ return(1);
+}
+
+static int
pre_li(DECL_ARGS)
{