version 1.251, 2017/01/19 01:00:14 |
version 1.253, 2017/01/19 15:27:34 |
|
|
html_mdoc(void *arg, const struct roff_man *mdoc) |
html_mdoc(void *arg, const struct roff_man *mdoc) |
{ |
{ |
struct html *h; |
struct html *h; |
struct tag *t, *tt; |
struct tag *t; |
|
|
h = (struct html *)arg; |
h = (struct html *)arg; |
|
|
if ( ! (HTML_FRAGMENT & h->oflags)) { |
if ((h->oflags & HTML_FRAGMENT) == 0) { |
print_gen_decls(h); |
print_gen_decls(h); |
t = print_otag(h, TAG_HTML, ""); |
print_otag(h, TAG_HTML, ""); |
tt = print_otag(h, TAG_HEAD, ""); |
t = print_otag(h, TAG_HEAD, ""); |
print_mdoc_head(&mdoc->meta, mdoc->first->child, h); |
print_mdoc_head(&mdoc->meta, mdoc->first->child, h); |
print_tagq(h, tt); |
print_tagq(h, t); |
print_otag(h, TAG_BODY, ""); |
print_otag(h, TAG_BODY, ""); |
print_otag(h, TAG_DIV, "c", "mandoc"); |
} |
} else |
|
t = print_otag(h, TAG_DIV, "c", "mandoc"); |
|
|
|
mdoc_root_pre(&mdoc->meta, mdoc->first->child, h); |
mdoc_root_pre(&mdoc->meta, mdoc->first->child, h); |
|
t = print_otag(h, TAG_DIV, "c", "manual-text"); |
print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h); |
print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h); |
mdoc_root_post(&mdoc->meta, mdoc->first->child, h); |
|
print_tagq(h, t); |
print_tagq(h, t); |
|
mdoc_root_post(&mdoc->meta, mdoc->first->child, h); |
|
print_tagq(h, NULL); |
} |
} |
|
|
static void |
static void |
Line 521 mdoc_sh_pre(MDOC_ARGS) |
|
Line 521 mdoc_sh_pre(MDOC_ARGS) |
|
|
|
switch (n->type) { |
switch (n->type) { |
case ROFFT_BLOCK: |
case ROFFT_BLOCK: |
print_otag(h, TAG_DIV, "c", "section"); |
|
return 1; |
return 1; |
case ROFFT_BODY: |
case ROFFT_BODY: |
if (n->sec == SEC_AUTHORS) |
if (n->sec == SEC_AUTHORS) |
Line 532 mdoc_sh_pre(MDOC_ARGS) |
|
Line 531 mdoc_sh_pre(MDOC_ARGS) |
|
} |
} |
|
|
if ((id = make_id(n)) != NULL) { |
if ((id = make_id(n)) != NULL) { |
print_otag(h, TAG_H1, "i", id); |
print_otag(h, TAG_H1, "ci", "Sh", id); |
free(id); |
free(id); |
} else |
} else |
print_otag(h, TAG_H1, ""); |
print_otag(h, TAG_H1, "c", "Sh"); |
|
|
return 1; |
return 1; |
} |
} |
Line 545 mdoc_ss_pre(MDOC_ARGS) |
|
Line 544 mdoc_ss_pre(MDOC_ARGS) |
|
{ |
{ |
char *id; |
char *id; |
|
|
if (n->type == ROFFT_BLOCK) { |
if (n->type != ROFFT_HEAD) |
print_otag(h, TAG_DIV, "c", "subsection"); |
|
return 1; |
return 1; |
} else if (n->type == ROFFT_BODY) |
|
return 1; |
|
|
|
if ((id = make_id(n)) != NULL) { |
if ((id = make_id(n)) != NULL) { |
print_otag(h, TAG_H2, "i", id); |
print_otag(h, TAG_H2, "ci", "Ss", id); |
free(id); |
free(id); |
} else |
} else |
print_otag(h, TAG_H2, ""); |
print_otag(h, TAG_H2, "c", "Ss"); |
|
|
return 1; |
return 1; |
} |
} |