aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_term.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 /man_term.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 'man_term.c')
-rw-r--r--man_term.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/man_term.c b/man_term.c
index 4e894e79..a548c154 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.142 2014/03/08 16:22:04 schwarze Exp $ */
+/* $Id: man_term.c,v 1.143 2014/03/30 19:47:48 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -84,6 +84,7 @@ static int pre_ft(DECL_ARGS);
static int pre_ign(DECL_ARGS);
static int pre_in(DECL_ARGS);
static int pre_literal(DECL_ARGS);
+static int pre_ll(DECL_ARGS);
static int pre_sp(DECL_ARGS);
static void post_IP(DECL_ARGS);
@@ -133,6 +134,7 @@ static const struct termact termacts[MAN_MAX] = {
{ pre_literal, NULL, 0 }, /* EE */
{ pre_UR, post_UR, 0 }, /* UR */
{ NULL, NULL, 0 }, /* UE */
+ { pre_ll, NULL, MAN_NOTEXT }, /* ll */
};
@@ -237,6 +239,16 @@ pre_ign(DECL_ARGS)
/* ARGSUSED */
static int
+pre_ll(DECL_ARGS)
+{
+
+ (*p->setwidth)(p, n->nchild ? a2width(p, n->child->string) : 0);
+ return(0);
+}
+
+
+/* ARGSUSED */
+static int
pre_I(DECL_ARGS)
{