version 1.150, 2018/05/25 20:23:51 |
version 1.152, 2018/06/25 13:33:04 |
Line 53 static void print_man_head(const struct roff_meta * |
|
Line 53 static void print_man_head(const struct roff_meta * |
|
static void print_man_nodelist(MAN_ARGS); |
static void print_man_nodelist(MAN_ARGS); |
static void print_man_node(MAN_ARGS); |
static void print_man_node(MAN_ARGS); |
static int fillmode(struct html *, int); |
static int fillmode(struct html *, int); |
static int a2width(const struct roff_node *, |
|
struct roffsu *); |
|
static int man_B_pre(MAN_ARGS); |
static int man_B_pre(MAN_ARGS); |
static int man_HP_pre(MAN_ARGS); |
static int man_HP_pre(MAN_ARGS); |
static int man_IP_pre(MAN_ARGS); |
static int man_IP_pre(MAN_ARGS); |
Line 368 fillmode(struct html *h, int want) |
|
Line 366 fillmode(struct html *h, int want) |
|
return had; |
return had; |
} |
} |
|
|
static int |
|
a2width(const struct roff_node *n, struct roffsu *su) |
|
{ |
|
if (n->type != ROFFT_TEXT) |
|
return 0; |
|
return a2roffsu(n->string, su, SCALE_EN) != NULL; |
|
} |
|
|
|
static void |
static void |
man_root_pre(const struct roff_meta *man, struct html *h) |
man_root_pre(const struct roff_meta *man, struct html *h) |
{ |
{ |
Line 557 man_IP_pre(MAN_ARGS) |
|
Line 547 man_IP_pre(MAN_ARGS) |
|
static int |
static int |
man_HP_pre(MAN_ARGS) |
man_HP_pre(MAN_ARGS) |
{ |
{ |
struct roffsu sum, sui; |
|
const struct roff_node *np; |
|
|
|
if (n->type == ROFFT_HEAD) |
if (n->type == ROFFT_HEAD) |
return 0; |
return 0; |
else if (n->type != ROFFT_BLOCK) |
|
return 1; |
|
|
|
np = n->head->child; |
if (n->type == ROFFT_BLOCK) { |
|
print_bvspace(h, n); |
if (np == NULL || !a2width(np, &sum)) |
print_otag(h, TAG_DIV, "c", "HP"); |
SCALE_HS_INIT(&sum, INDENT); |
} |
|
|
sui.unit = sum.unit; |
|
sui.scale = -sum.scale; |
|
|
|
print_bvspace(h, n); |
|
print_otag(h, TAG_DIV, "csului", "Pp", &sum, &sui); |
|
return 1; |
return 1; |
} |
} |
|
|
Line 636 man_ign_pre(MAN_ARGS) |
|
Line 615 man_ign_pre(MAN_ARGS) |
|
static int |
static int |
man_RS_pre(MAN_ARGS) |
man_RS_pre(MAN_ARGS) |
{ |
{ |
struct roffsu su; |
|
|
|
if (n->type == ROFFT_HEAD) |
if (n->type == ROFFT_HEAD) |
return 0; |
return 0; |
else if (n->type == ROFFT_BODY) |
if (n->type == ROFFT_BLOCK) |
return 1; |
print_otag(h, TAG_DIV, "c", "Bd-indent"); |
|
|
SCALE_HS_INIT(&su, INDENT); |
|
if (n->head->child) |
|
a2width(n->head->child, &su); |
|
|
|
print_otag(h, TAG_DIV, "sul", &su); |
|
return 1; |
return 1; |
} |
} |
|
|