version 1.117, 2017/06/04 22:44:15 |
version 1.119, 2017/06/08 12:54:58 |
Line 126 static void print_node(DECL_ARGS); |
|
Line 126 static void print_node(DECL_ARGS); |
|
|
|
static const void_fp roff_manacts[ROFF_MAX] = { |
static const void_fp roff_manacts[ROFF_MAX] = { |
pre_br, |
pre_br, |
|
pre_onearg, |
pre_ft, |
pre_ft, |
pre_onearg, |
pre_onearg, |
pre_onearg, |
pre_onearg, |
Line 475 print_offs(const char *v, int keywords) |
|
Line 476 print_offs(const char *v, int keywords) |
|
{ |
{ |
char buf[24]; |
char buf[24]; |
struct roffsu su; |
struct roffsu su; |
|
const char *end; |
int sz; |
int sz; |
|
|
print_line(".RS", MMAN_Bk_susp); |
print_line(".RS", MMAN_Bk_susp); |
Line 486 print_offs(const char *v, int keywords) |
|
Line 488 print_offs(const char *v, int keywords) |
|
sz = 6; |
sz = 6; |
else if (keywords && !strcmp(v, "indent-two")) |
else if (keywords && !strcmp(v, "indent-two")) |
sz = 12; |
sz = 12; |
else if (a2roffsu(v, &su, SCALE_EN) > 1) { |
else { |
if (SCALE_EN == su.unit) |
end = a2roffsu(v, &su, SCALE_EN); |
|
if (end == NULL || *end != '\0') |
|
sz = man_strlen(v); |
|
else if (SCALE_EN == su.unit) |
sz = su.scale; |
sz = su.scale; |
else { |
else { |
/* |
/* |
Line 501 print_offs(const char *v, int keywords) |
|
Line 506 print_offs(const char *v, int keywords) |
|
outflags |= MMAN_nl; |
outflags |= MMAN_nl; |
return; |
return; |
} |
} |
} else |
} |
sz = man_strlen(v); |
|
|
|
/* |
/* |
* We are inside an enclosing list. |
* We are inside an enclosing list. |
Line 524 print_width(const struct mdoc_bl *bl, const struct rof |
|
Line 528 print_width(const struct mdoc_bl *bl, const struct rof |
|
{ |
{ |
char buf[24]; |
char buf[24]; |
struct roffsu su; |
struct roffsu su; |
|
const char *end; |
int numeric, remain, sz, chsz; |
int numeric, remain, sz, chsz; |
|
|
numeric = 1; |
numeric = 1; |
Line 532 print_width(const struct mdoc_bl *bl, const struct rof |
|
Line 537 print_width(const struct mdoc_bl *bl, const struct rof |
|
/* Convert the width into a number (of characters). */ |
/* Convert the width into a number (of characters). */ |
if (bl->width == NULL) |
if (bl->width == NULL) |
sz = (bl->type == LIST_hang) ? 6 : 0; |
sz = (bl->type == LIST_hang) ? 6 : 0; |
else if (a2roffsu(bl->width, &su, SCALE_MAX) > 1) { |
else { |
if (SCALE_EN == su.unit) |
end = a2roffsu(bl->width, &su, SCALE_MAX); |
|
if (end == NULL || *end != '\0') |
|
sz = man_strlen(bl->width); |
|
else if (SCALE_EN == su.unit) |
sz = su.scale; |
sz = su.scale; |
else { |
else { |
sz = 0; |
sz = 0; |
numeric = 0; |
numeric = 0; |
} |
} |
} else |
} |
sz = man_strlen(bl->width); |
|
|
|
/* XXX Rough estimation, might have multiple parts. */ |
/* XXX Rough estimation, might have multiple parts. */ |
if (bl->type == LIST_enum) |
if (bl->type == LIST_enum) |
Line 1582 pre_onearg(DECL_ARGS) |
|
Line 1589 pre_onearg(DECL_ARGS) |
|
if (n->child != NULL) |
if (n->child != NULL) |
print_word(n->child->string); |
print_word(n->child->string); |
outflags |= MMAN_nl; |
outflags |= MMAN_nl; |
|
if (n->tok == ROFF_ce) |
|
for (n = n->child->next; n != NULL; n = n->next) |
|
print_node(meta, n); |
} |
} |
|
|
static int |
static int |