version 1.39, 2009/09/20 19:25:06 |
version 1.40, 2009/09/20 19:44:16 |
|
|
mdoc_root_post(MDOC_ARGS) |
mdoc_root_post(MDOC_ARGS) |
{ |
{ |
struct tm *tm; |
struct tm *tm; |
struct htmlpair tag[2]; |
struct htmlpair tag; |
struct tag *t; |
struct tag *t; |
char b[BUFSIZ], os[BUFSIZ]; |
char b[BUFSIZ], os[BUFSIZ]; |
|
|
Line 1003 mdoc_root_post(MDOC_ARGS) |
|
Line 1003 mdoc_root_post(MDOC_ARGS) |
|
if (0 == strftime(b, BUFSIZ - 1, "%B %e, %Y", tm)) |
if (0 == strftime(b, BUFSIZ - 1, "%B %e, %Y", tm)) |
err(EXIT_FAILURE, "strftime"); |
err(EXIT_FAILURE, "strftime"); |
|
|
(void)strlcpy(os, m->os, BUFSIZ); |
strlcpy(os, m->os, BUFSIZ); |
|
|
tag[0].key = ATTR_STYLE; |
tag.key = ATTR_CLASS; |
tag[0].val = "width: 100%; margin-top: 1em;"; |
tag.val = "foot"; |
tag[1].key = ATTR_CLASS; |
|
tag[1].val = "foot"; |
|
|
|
t = print_otag(h, TAG_DIV, 2, tag); |
t = print_otag(h, TAG_DIV, 1, &tag); |
|
|
bufinit(); |
tag.key = ATTR_STYLE; |
bufcat("width: 50%;"); |
tag.val = "width: 49%; display: " |
bufcat("text-align: left;"); |
"inline-block; text-align: left;"; |
bufcat("float: left;"); |
print_otag(h, TAG_SPAN, 1, &tag); |
tag[0].key = ATTR_STYLE; |
|
tag[0].val = buf; |
|
print_otag(h, TAG_SPAN, 1, tag); |
|
print_text(h, b); |
print_text(h, b); |
print_stagq(h, t); |
print_stagq(h, t); |
|
|
bufinit(); |
tag.key = ATTR_STYLE; |
bufcat("width: 50%;"); |
tag.val = "width: 49%; display: " |
bufcat("text-align: right;"); |
"inline-block; text-align: right;"; |
bufcat("float: left;"); |
print_otag(h, TAG_SPAN, 1, &tag); |
tag[0].key = ATTR_STYLE; |
|
tag[0].val = buf; |
|
print_otag(h, TAG_SPAN, 1, tag); |
|
print_text(h, os); |
print_text(h, os); |
print_tagq(h, t); |
print_tagq(h, t); |
|
|
Line 1040 mdoc_root_post(MDOC_ARGS) |
|
Line 1032 mdoc_root_post(MDOC_ARGS) |
|
static int |
static int |
mdoc_root_pre(MDOC_ARGS) |
mdoc_root_pre(MDOC_ARGS) |
{ |
{ |
struct htmlpair tag[2]; |
struct htmlpair tag; |
struct tag *t, *tt; |
struct tag *t, *tt; |
char b[BUFSIZ], title[BUFSIZ]; |
char b[BUFSIZ], title[BUFSIZ]; |
|
|
Line 1048 mdoc_root_pre(MDOC_ARGS) |
|
Line 1040 mdoc_root_pre(MDOC_ARGS) |
|
(void)strlcpy(b, m->vol, BUFSIZ); |
(void)strlcpy(b, m->vol, BUFSIZ); |
|
|
if (m->arch) { |
if (m->arch) { |
(void)strlcat(b, " (", BUFSIZ); |
strlcat(b, " (", BUFSIZ); |
(void)strlcat(b, m->arch, BUFSIZ); |
strlcat(b, m->arch, BUFSIZ); |
(void)strlcat(b, ")", BUFSIZ); |
strlcat(b, ")", BUFSIZ); |
} |
} |
|
|
(void)snprintf(title, BUFSIZ - 1, "%s(%d)", m->title, m->msec); |
snprintf(title, BUFSIZ - 1, "%s(%d)", m->title, m->msec); |
|
|
tag[0].key = ATTR_CLASS; |
tag.key = ATTR_CLASS; |
tag[0].val = "body"; |
tag.val = "body"; |
|
|
t = print_otag(h, TAG_DIV, 1, tag); |
t = print_otag(h, TAG_DIV, 1, &tag); |
|
|
tag[0].key = ATTR_CLASS; |
tag.key = ATTR_CLASS; |
tag[0].val = "head"; |
tag.val = "head"; |
tag[1].key = ATTR_STYLE; |
|
tag[1].val = "margin-bottom: 1em; clear: both;"; |
|
|
|
tt = print_otag(h, TAG_DIV, 2, tag); |
tt = print_otag(h, TAG_DIV, 1, &tag); |
|
|
bufinit(); |
tag.key = ATTR_STYLE; |
bufcat("width: 30%;"); |
tag.val = "width: 32%; text-align: left; " |
bufcat("text-align: left;"); |
"display: inline-block;"; |
bufcat("float: left;"); |
print_otag(h, TAG_SPAN, 1, &tag); |
tag[0].key = ATTR_STYLE; |
|
tag[0].val = buf; |
|
print_otag(h, TAG_SPAN, 1, tag); |
|
print_text(h, b); |
print_text(h, b); |
print_stagq(h, tt); |
print_stagq(h, tt); |
|
|
bufinit(); |
tag.key = ATTR_STYLE; |
bufcat("width: 30%;"); |
tag.val = "width: 32%; text-align: center; " |
bufcat("text-align: center;"); |
"display: inline-block;"; |
bufcat("float: left;"); |
print_otag(h, TAG_SPAN, 1, &tag); |
tag[0].key = ATTR_STYLE; |
|
tag[0].val = buf; |
|
print_otag(h, TAG_SPAN, 1, tag); |
|
print_text(h, title); |
print_text(h, title); |
print_stagq(h, tt); |
print_stagq(h, tt); |
|
|
bufinit(); |
tag.key = ATTR_STYLE; |
bufcat("width: 30%;"); |
tag.val = "width: 32%; text-align: right; " |
bufcat("text-align: right;"); |
"display: inline-block;"; |
bufcat("float: left;"); |
print_otag(h, TAG_SPAN, 1, &tag); |
tag[0].key = ATTR_STYLE; |
|
tag[0].val = buf; |
|
print_otag(h, TAG_SPAN, 1, tag); |
|
print_text(h, b); |
print_text(h, b); |
|
|
print_stagq(h, t); |
print_stagq(h, t); |
|
|
return(1); |
return(1); |
Line 1123 mdoc_sh_pre(MDOC_ARGS) |
|
Line 1103 mdoc_sh_pre(MDOC_ARGS) |
|
return(1); |
return(1); |
} |
} |
|
|
|
bufcat("margin-top: 1em;"); |
|
if (NULL == n->next) |
|
bufcat("margin-bottom: 1em;"); |
|
|
tag[1].key = ATTR_STYLE; |
tag[1].key = ATTR_STYLE; |
tag[1].val = "margin-top: 1em;"; |
tag[1].val = buf; |
|
|
print_otag(h, TAG_DIV, 2, tag); |
print_otag(h, TAG_DIV, 2, tag); |
return(1); |
return(1); |