version 1.258, 2013/12/25 21:24:12 |
version 1.262, 2014/04/08 04:40:47 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* 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> |
* Copyright (c) 2013 Franco Fichtner <franco@lastsummer.de> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
Line 104 static int termp_ft_pre(DECL_ARGS); |
|
Line 104 static int termp_ft_pre(DECL_ARGS); |
|
static int termp_in_pre(DECL_ARGS); |
static int termp_in_pre(DECL_ARGS); |
static int termp_it_pre(DECL_ARGS); |
static int termp_it_pre(DECL_ARGS); |
static int termp_li_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_lk_pre(DECL_ARGS); |
static int termp_nd_pre(DECL_ARGS); |
static int termp_nd_pre(DECL_ARGS); |
static int termp_nm_pre(DECL_ARGS); |
static int termp_nm_pre(DECL_ARGS); |
Line 244 static const struct termact termacts[MDOC_MAX] = { |
|
Line 245 static const struct termact termacts[MDOC_MAX] = { |
|
{ termp_sp_pre, NULL }, /* sp */ |
{ termp_sp_pre, NULL }, /* sp */ |
{ NULL, termp____post }, /* %U */ |
{ NULL, termp____post }, /* %U */ |
{ NULL, NULL }, /* Ta */ |
{ NULL, NULL }, /* Ta */ |
|
{ termp_ll_pre, NULL }, /* ll */ |
}; |
}; |
|
|
|
|
Line 384 print_mdoc_node(DECL_ARGS) |
|
Line 386 print_mdoc_node(DECL_ARGS) |
|
if (MDOC_EOS & n->flags) |
if (MDOC_EOS & n->flags) |
p->flags |= TERMP_SENTENCE; |
p->flags |= TERMP_SENTENCE; |
|
|
p->offset = offset; |
if (MDOC_ll != n->tok) { |
p->rmargin = rmargin; |
p->offset = offset; |
|
p->rmargin = rmargin; |
|
} |
} |
} |
|
|
|
|
Line 615 print_bvspace(struct termp *p, |
|
Line 619 print_bvspace(struct termp *p, |
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static int |
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) |
termp_it_pre(DECL_ARGS) |
{ |
{ |
const struct mdoc_node *bl, *nn; |
const struct mdoc_node *bl, *nn; |
Line 873 termp_it_pre(DECL_ARGS) |
|
Line 887 termp_it_pre(DECL_ARGS) |
|
assert(width); |
assert(width); |
if (MDOC_HEAD == n->type) |
if (MDOC_HEAD == n->type) |
p->rmargin = p->offset + width; |
p->rmargin = p->offset + width; |
else |
else { |
p->offset += width; |
p->offset += width; |
|
if (p->rmargin < p->offset) |
|
p->rmargin = p->offset; |
|
} |
break; |
break; |
case (LIST_column): |
case (LIST_column): |
assert(width); |
assert(width); |
Line 1012 termp_nm_pre(DECL_ARGS) |
|
Line 1029 termp_nm_pre(DECL_ARGS) |
|
MDOC_TEXT == n->prev->child->type ? |
MDOC_TEXT == n->prev->child->type ? |
term_strlen(p, n->prev->child->string) : |
term_strlen(p, n->prev->child->string) : |
term_len(p, 5)); |
term_len(p, 5)); |
|
if (p->rmargin < p->offset) |
|
p->rmargin = p->offset; |
return(1); |
return(1); |
} |
} |
|
|