version 1.189, 2014/04/20 20:18:12 |
version 1.190, 2014/04/23 16:08:33 |
Line 515 mdoc_root_post(MDOC_ARGS) |
|
Line 515 mdoc_root_post(MDOC_ARGS) |
|
static int |
static int |
mdoc_root_pre(MDOC_ARGS) |
mdoc_root_pre(MDOC_ARGS) |
{ |
{ |
char b[BUFSIZ]; |
|
struct htmlpair tag[3]; |
struct htmlpair tag[3]; |
struct tag *t, *tt; |
struct tag *t, *tt; |
char *title; |
char *volume, *title; |
|
|
strlcpy(b, meta->vol, BUFSIZ); |
if (NULL == meta->arch) |
|
volume = mandoc_strdup(meta->vol); |
|
else |
|
mandoc_asprintf(&volume, "%s (%s)", |
|
meta->vol, meta->arch); |
|
|
if (meta->arch) { |
|
strlcat(b, " (", BUFSIZ); |
|
strlcat(b, meta->arch, BUFSIZ); |
|
strlcat(b, ")", BUFSIZ); |
|
} |
|
|
|
mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec); |
mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec); |
|
|
PAIR_SUMMARY_INIT(&tag[0], "Document Header"); |
PAIR_SUMMARY_INIT(&tag[0], "Document Header"); |
Line 551 mdoc_root_pre(MDOC_ARGS) |
|
Line 548 mdoc_root_pre(MDOC_ARGS) |
|
PAIR_CLASS_INIT(&tag[0], "head-vol"); |
PAIR_CLASS_INIT(&tag[0], "head-vol"); |
PAIR_INIT(&tag[1], ATTR_ALIGN, "center"); |
PAIR_INIT(&tag[1], ATTR_ALIGN, "center"); |
print_otag(h, TAG_TD, 2, tag); |
print_otag(h, TAG_TD, 2, tag); |
print_text(h, b); |
print_text(h, volume); |
print_stagq(h, tt); |
print_stagq(h, tt); |
|
|
PAIR_CLASS_INIT(&tag[0], "head-rtitle"); |
PAIR_CLASS_INIT(&tag[0], "head-rtitle"); |
Line 561 mdoc_root_pre(MDOC_ARGS) |
|
Line 558 mdoc_root_pre(MDOC_ARGS) |
|
print_tagq(h, t); |
print_tagq(h, t); |
|
|
free(title); |
free(title); |
|
free(volume); |
return(1); |
return(1); |
} |
} |
|
|
Line 993 mdoc_bl_pre(MDOC_ARGS) |
|
Line 991 mdoc_bl_pre(MDOC_ARGS) |
|
PAIR_STYLE_INIT(&tag[0], h); |
PAIR_STYLE_INIT(&tag[0], h); |
|
|
assert(lists[n->norm->Bl.type]); |
assert(lists[n->norm->Bl.type]); |
strlcpy(buf, "list ", BUFSIZ); |
(void)strlcpy(buf, "list ", BUFSIZ); |
strlcat(buf, lists[n->norm->Bl.type], BUFSIZ); |
(void)strlcat(buf, lists[n->norm->Bl.type], BUFSIZ); |
PAIR_INIT(&tag[1], ATTR_CLASS, buf); |
PAIR_INIT(&tag[1], ATTR_CLASS, buf); |
|
|
/* Set the block's left-hand margin. */ |
/* Set the block's left-hand margin. */ |
Line 1363 mdoc_fd_pre(MDOC_ARGS) |
|
Line 1361 mdoc_fd_pre(MDOC_ARGS) |
|
|
|
if (NULL != (n = n->next)) { |
if (NULL != (n = n->next)) { |
assert(MDOC_TEXT == n->type); |
assert(MDOC_TEXT == n->type); |
|
|
|
/* |
|
* XXX This is broken and not easy to fix. |
|
* When using -Oincludes, truncation may occur. |
|
* Dynamic allocation wouldn't help because |
|
* passing long strings to buffmt_includes() |
|
* does not work either. |
|
*/ |
|
|
strlcpy(buf, '<' == *n->string || '"' == *n->string ? |
strlcpy(buf, '<' == *n->string || '"' == *n->string ? |
n->string + 1 : n->string, BUFSIZ); |
n->string + 1 : n->string, BUFSIZ); |
|
|
Line 1475 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1482 mdoc_fn_pre(MDOC_ARGS) |
|
|
|
t = print_otag(h, TAG_B, 1, tag); |
t = print_otag(h, TAG_B, 1, tag); |
|
|
if (sp) { |
if (sp) |
strlcpy(nbuf, sp, BUFSIZ); |
print_text(h, sp); |
print_text(h, nbuf); |
|
} |
|
|
|
print_tagq(h, t); |
print_tagq(h, t); |
|
|