version 1.265, 2017/02/05 18:15:39 |
version 1.273, 2017/03/03 13:55:31 |
Line 110 static int mdoc_skip_pre(MDOC_ARGS); |
|
Line 110 static int mdoc_skip_pre(MDOC_ARGS); |
|
static int mdoc_sm_pre(MDOC_ARGS); |
static int mdoc_sm_pre(MDOC_ARGS); |
static int mdoc_sp_pre(MDOC_ARGS); |
static int mdoc_sp_pre(MDOC_ARGS); |
static int mdoc_ss_pre(MDOC_ARGS); |
static int mdoc_ss_pre(MDOC_ARGS); |
|
static int mdoc_st_pre(MDOC_ARGS); |
static int mdoc_sx_pre(MDOC_ARGS); |
static int mdoc_sx_pre(MDOC_ARGS); |
static int mdoc_sy_pre(MDOC_ARGS); |
static int mdoc_sy_pre(MDOC_ARGS); |
static int mdoc_va_pre(MDOC_ARGS); |
static int mdoc_va_pre(MDOC_ARGS); |
Line 155 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
Line 156 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
{mdoc_ft_pre, NULL}, /* Ot */ |
{mdoc_ft_pre, NULL}, /* Ot */ |
{mdoc_pa_pre, NULL}, /* Pa */ |
{mdoc_pa_pre, NULL}, /* Pa */ |
{mdoc_ex_pre, NULL}, /* Rv */ |
{mdoc_ex_pre, NULL}, /* Rv */ |
{NULL, NULL}, /* St */ |
{mdoc_st_pre, NULL}, /* St */ |
{mdoc_va_pre, NULL}, /* Va */ |
{mdoc_va_pre, NULL}, /* Va */ |
{mdoc_vt_pre, NULL}, /* Vt */ |
{mdoc_vt_pre, NULL}, /* Vt */ |
{mdoc_xr_pre, NULL}, /* Xr */ |
{mdoc_xr_pre, NULL}, /* Xr */ |
Line 173 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
Line 174 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
{NULL, NULL}, /* Ac */ |
{NULL, NULL}, /* Ac */ |
{mdoc_quote_pre, mdoc_quote_post}, /* Ao */ |
{mdoc_quote_pre, mdoc_quote_post}, /* Ao */ |
{mdoc_quote_pre, mdoc_quote_post}, /* Aq */ |
{mdoc_quote_pre, mdoc_quote_post}, /* Aq */ |
{NULL, NULL}, /* At */ |
{mdoc_xx_pre, NULL}, /* At */ |
{NULL, NULL}, /* Bc */ |
{NULL, NULL}, /* Bc */ |
{mdoc_bf_pre, NULL}, /* Bf */ |
{mdoc_bf_pre, NULL}, /* Bf */ |
{mdoc_quote_pre, mdoc_quote_post}, /* Bo */ |
{mdoc_quote_pre, mdoc_quote_post}, /* Bo */ |
Line 416 print_mdoc_node(MDOC_ARGS) |
|
Line 417 print_mdoc_node(MDOC_ARGS) |
|
(*mdocs[n->tok].post)(meta, n, h); |
(*mdocs[n->tok].post)(meta, n, h); |
if (n->end != ENDBODY_NOT) |
if (n->end != ENDBODY_NOT) |
n->body->flags |= NODE_ENDED; |
n->body->flags |= NODE_ENDED; |
if (n->end == ENDBODY_NOSPACE) |
|
h->flags |= HTML_NOSPACE; |
|
break; |
break; |
} |
} |
} |
} |
Line 581 mdoc_nm_pre(MDOC_ARGS) |
|
Line 580 mdoc_nm_pre(MDOC_ARGS) |
|
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case ROFFT_ELEM: |
case ROFFT_ELEM: |
print_otag(h, TAG_B, "c", "Nm"); |
print_otag(h, TAG_B, "c", "Nm"); |
if (n->child == NULL && meta->name != NULL) |
|
print_text(h, meta->name); |
|
return 1; |
return 1; |
case ROFFT_BODY: |
case ROFFT_BODY: |
print_otag(h, TAG_TD, ""); |
print_otag(h, TAG_TD, ""); |
Line 649 mdoc_ns_pre(MDOC_ARGS) |
|
Line 646 mdoc_ns_pre(MDOC_ARGS) |
|
static int |
static int |
mdoc_ar_pre(MDOC_ARGS) |
mdoc_ar_pre(MDOC_ARGS) |
{ |
{ |
print_otag(h, TAG_I, "c", "Ar"); |
print_otag(h, TAG_VAR, "c", "Ar"); |
return 1; |
return 1; |
} |
} |
|
|
Line 669 mdoc_it_pre(MDOC_ARGS) |
|
Line 666 mdoc_it_pre(MDOC_ARGS) |
|
enum mdoc_list type; |
enum mdoc_list type; |
|
|
bl = n->parent; |
bl = n->parent; |
while (bl != NULL && bl->tok != MDOC_Bl) |
while (bl->tok != MDOC_Bl) |
bl = bl->parent; |
bl = bl->parent; |
type = bl->norm->Bl.type; |
type = bl->norm->Bl.type; |
|
|
Line 754 mdoc_it_pre(MDOC_ARGS) |
|
Line 751 mdoc_it_pre(MDOC_ARGS) |
|
case ROFFT_HEAD: |
case ROFFT_HEAD: |
if (h->style != NULL && !bl->norm->Bl.comp && |
if (h->style != NULL && !bl->norm->Bl.comp && |
(n->parent->prev == NULL || |
(n->parent->prev == NULL || |
|
n->parent->prev->body == NULL || |
n->parent->prev->body->child != NULL)) { |
n->parent->prev->body->child != NULL)) { |
t = print_otag(h, TAG_DT, "csWl", |
t = print_otag(h, TAG_DT, "csWl", |
cattr, bl->norm->Bl.width); |
cattr, bl->norm->Bl.width); |
Line 895 mdoc_ex_pre(MDOC_ARGS) |
|
Line 893 mdoc_ex_pre(MDOC_ARGS) |
|
} |
} |
|
|
static int |
static int |
|
mdoc_st_pre(MDOC_ARGS) |
|
{ |
|
print_otag(h, TAG_SPAN, "c", "St"); |
|
return 1; |
|
} |
|
|
|
static int |
mdoc_em_pre(MDOC_ARGS) |
mdoc_em_pre(MDOC_ARGS) |
{ |
{ |
print_otag(h, TAG_I, "c", "Em"); |
print_otag(h, TAG_I, "c", "Em"); |
Line 1088 mdoc_fa_pre(MDOC_ARGS) |
|
Line 1093 mdoc_fa_pre(MDOC_ARGS) |
|
struct tag *t; |
struct tag *t; |
|
|
if (n->parent->tok != MDOC_Fo) { |
if (n->parent->tok != MDOC_Fo) { |
print_otag(h, TAG_I, "c", "Fa"); |
print_otag(h, TAG_VAR, "c", "Fa"); |
return 1; |
return 1; |
} |
} |
|
|
for (nn = n->child; nn; nn = nn->next) { |
for (nn = n->child; nn; nn = nn->next) { |
t = print_otag(h, TAG_I, "c", "Fa"); |
t = print_otag(h, TAG_VAR, "c", "Fa"); |
print_text(h, nn->string); |
print_text(h, nn->string); |
print_tagq(h, t); |
print_tagq(h, t); |
if (nn->next) { |
if (nn->next) { |
Line 1172 mdoc_vt_pre(MDOC_ARGS) |
|
Line 1177 mdoc_vt_pre(MDOC_ARGS) |
|
} else if (n->type == ROFFT_HEAD) |
} else if (n->type == ROFFT_HEAD) |
return 0; |
return 0; |
|
|
print_otag(h, TAG_I, "c", "Vt"); |
print_otag(h, TAG_VAR, "c", "Vt"); |
return 1; |
return 1; |
} |
} |
|
|
|
|
mdoc_ft_pre(MDOC_ARGS) |
mdoc_ft_pre(MDOC_ARGS) |
{ |
{ |
synopsis_pre(h, n); |
synopsis_pre(h, n); |
print_otag(h, TAG_I, "c", "Ft"); |
print_otag(h, TAG_VAR, "c", "Ft"); |
return 1; |
return 1; |
} |
} |
|
|
Line 1201 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1206 mdoc_fn_pre(MDOC_ARGS) |
|
|
|
ep = strchr(sp, ' '); |
ep = strchr(sp, ' '); |
if (NULL != ep) { |
if (NULL != ep) { |
t = print_otag(h, TAG_I, "c", "Ft"); |
t = print_otag(h, TAG_VAR, "c", "Ft"); |
|
|
while (ep) { |
while (ep) { |
sz = MIN((int)(ep - sp), BUFSIZ - 1); |
sz = MIN((int)(ep - sp), BUFSIZ - 1); |
Line 1227 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1232 mdoc_fn_pre(MDOC_ARGS) |
|
|
|
for (n = n->child->next; n; n = n->next) { |
for (n = n->child->next; n; n = n->next) { |
if (NODE_SYNPRETTY & n->flags) |
if (NODE_SYNPRETTY & n->flags) |
t = print_otag(h, TAG_I, "css?", "Fa", |
t = print_otag(h, TAG_VAR, "css?", "Fa", |
"white-space", "nowrap"); |
"white-space", "nowrap"); |
else |
else |
t = print_otag(h, TAG_I, "c", "Fa"); |
t = print_otag(h, TAG_VAR, "c", "Fa"); |
print_text(h, n->string); |
print_text(h, n->string); |
print_tagq(h, t); |
print_tagq(h, t); |
if (n->next) { |
if (n->next) { |
Line 1438 mdoc_ic_pre(MDOC_ARGS) |
|
Line 1443 mdoc_ic_pre(MDOC_ARGS) |
|
static int |
static int |
mdoc_va_pre(MDOC_ARGS) |
mdoc_va_pre(MDOC_ARGS) |
{ |
{ |
print_otag(h, TAG_I, "c", "Va"); |
print_otag(h, TAG_VAR, "c", "Va"); |
return 1; |
return 1; |
} |
} |
|
|
Line 1469 mdoc_bf_pre(MDOC_ARGS) |
|
Line 1474 mdoc_bf_pre(MDOC_ARGS) |
|
else if (FONT_Li == n->norm->Bf.font) |
else if (FONT_Li == n->norm->Bf.font) |
cattr = "Li"; |
cattr = "Li"; |
else |
else |
cattr = "none"; |
cattr = "No"; |
|
|
/* |
/* |
* We want this to be inline-formatted, but needs to be div to |
* We want this to be inline-formatted, but needs to be div to |
Line 1512 mdoc_rs_pre(MDOC_ARGS) |
|
Line 1517 mdoc_rs_pre(MDOC_ARGS) |
|
if (n->prev && SEC_SEE_ALSO == n->sec) |
if (n->prev && SEC_SEE_ALSO == n->sec) |
print_paragraph(h); |
print_paragraph(h); |
|
|
print_otag(h, TAG_SPAN, "c", "Rs"); |
print_otag(h, TAG_CITE, "c", "Rs"); |
return 1; |
return 1; |
} |
} |
|
|