version 1.158, 2014/12/04 01:33:42 |
version 1.162, 2014/12/23 09:31:46 |
|
|
}; |
}; |
|
|
static int a2width(const struct termp *, const char *); |
static int a2width(const struct termp *, const char *); |
static size_t a2height(const struct termp *, const char *); |
|
|
|
static void print_man_nodelist(DECL_ARGS); |
static void print_man_nodelist(DECL_ARGS); |
static void print_man_node(DECL_ARGS); |
static void print_man_node(DECL_ARGS); |
Line 184 terminal_man(void *arg, const struct man *man) |
|
Line 183 terminal_man(void *arg, const struct man *man) |
|
} |
} |
} |
} |
|
|
|
|
static size_t |
|
a2height(const struct termp *p, const char *cp) |
|
{ |
|
struct roffsu su; |
|
|
|
if ( ! a2roffsu(cp, &su, SCALE_VS)) |
|
SCALE_VS_INIT(&su, atoi(cp)); |
|
|
|
return(term_vspan(p, &su)); |
|
} |
|
|
|
static int |
static int |
a2width(const struct termp *p, const char *cp) |
a2width(const struct termp *p, const char *cp) |
{ |
{ |
struct roffsu su; |
struct roffsu su; |
|
|
if ( ! a2roffsu(cp, &su, SCALE_BU)) |
if ( ! a2roffsu(cp, &su, SCALE_EN)) |
return(-1); |
return(-1); |
|
|
return((int)term_hspan(p, &su)); |
return((int)term_hspan(p, &su)); |
Line 288 pre_literal(DECL_ARGS) |
|
Line 275 pre_literal(DECL_ARGS) |
|
static int |
static int |
pre_PD(DECL_ARGS) |
pre_PD(DECL_ARGS) |
{ |
{ |
|
struct roffsu su; |
|
|
n = n->child; |
n = n->child; |
if (0 == n) { |
if (n == NULL) { |
mt->pardist = 1; |
mt->pardist = 1; |
return(0); |
return(0); |
} |
} |
assert(MAN_TEXT == n->type); |
assert(MAN_TEXT == n->type); |
mt->pardist = atoi(n->string); |
if (a2roffsu(n->string, &su, SCALE_VS)) |
|
mt->pardist = term_vspan(p, &su); |
return(0); |
return(0); |
} |
} |
|
|
Line 462 pre_in(DECL_ARGS) |
|
Line 451 pre_in(DECL_ARGS) |
|
static int |
static int |
pre_sp(DECL_ARGS) |
pre_sp(DECL_ARGS) |
{ |
{ |
|
struct roffsu su; |
char *s; |
char *s; |
size_t i, len; |
size_t i, len; |
int neg; |
int neg; |
Line 499 pre_sp(DECL_ARGS) |
|
Line 489 pre_sp(DECL_ARGS) |
|
neg = 1; |
neg = 1; |
s++; |
s++; |
} |
} |
len = a2height(p, s); |
if ( ! a2roffsu(s, &su, SCALE_VS)) |
|
su.scale = 1.0; |
|
len = term_vspan(p, &su); |
break; |
break; |
} |
} |
|
|
Line 631 pre_IP(DECL_ARGS) |
|
Line 623 pre_IP(DECL_ARGS) |
|
|
|
p->offset = mt->offset; |
p->offset = mt->offset; |
p->rmargin = mt->offset + len; |
p->rmargin = mt->offset + len; |
if (ival < 0) |
|
break; |
|
|
|
/* Set the saved left-margin. */ |
/* Set the saved left-margin. */ |
mt->lmargin[mt->lmargincur] = (size_t)ival; |
if (ival >= 0) |
|
mt->lmargin[mt->lmargincur] = (size_t)ival; |
|
|
savelit = MANT_LITERAL & mt->fl; |
savelit = MANT_LITERAL & mt->fl; |
mt->fl &= ~MANT_LITERAL; |
mt->fl &= ~MANT_LITERAL; |