-/* $Id: mdoc_term.c,v 1.257 2013/12/25 15:12:45 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.261 2014/03/30 21:28:01 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2013 Franco Fichtner <franco@lastsummer.de>
*
* Permission to use, copy, modify, and distribute this software for any
static int termp_in_pre(DECL_ARGS);
static int termp_it_pre(DECL_ARGS);
static int termp_li_pre(DECL_ARGS);
+static int termp_ll_pre(DECL_ARGS);
static int termp_lk_pre(DECL_ARGS);
static int termp_nd_pre(DECL_ARGS);
static int termp_nm_pre(DECL_ARGS);
{ termp_sp_pre, NULL }, /* sp */
{ NULL, termp____post }, /* %U */
{ NULL, NULL }, /* Ta */
+ { termp_ll_pre, NULL }, /* ll */
};
if (MDOC_EOS & n->flags)
p->flags |= TERMP_SENTENCE;
- p->offset = offset;
- p->rmargin = rmargin;
+ if (MDOC_ll != n->tok) {
+ p->offset = offset;
+ p->rmargin = rmargin;
+ }
}
}
+/* ARGSUSED */
+static int
+termp_ll_pre(DECL_ARGS)
+{
+
+ term_setwidth(p, n->nchild ? n->child->string : NULL);
+ return(0);
+}
+
+
/* ARGSUSED */
static int
termp_it_pre(DECL_ARGS)
assert(width);
if (MDOC_HEAD == n->type)
p->rmargin = p->offset + width;
- else
+ else {
p->offset += width;
+ if (p->rmargin < p->offset)
+ p->rmargin = p->offset;
+ }
break;
case (LIST_column):
assert(width);
for (nn = n->child; nn; nn = nn->next) {
term_fontpush(p, TERMFONT_UNDER);
- if (MDOC_SYNPRETTY & n->flags)
- p->flags |= TERMP_NBRWORD;
+ p->flags |= TERMP_NBRWORD;
term_word(p, nn->string);
term_fontpop(p);