version 1.99, 2010/07/23 00:08:57 |
version 1.106, 2010/09/25 16:41:33 |
Line 1183 mdoc_bl_pre(MDOC_ARGS) |
|
Line 1183 mdoc_bl_pre(MDOC_ARGS) |
|
ord = malloc(sizeof(struct ord)); |
ord = malloc(sizeof(struct ord)); |
if (NULL == ord) { |
if (NULL == ord) { |
perror(NULL); |
perror(NULL); |
exit(EXIT_FAILURE); |
exit((int)MANDOCLEVEL_SYSERR); |
} |
} |
ord->cookie = n; |
ord->cookie = n; |
ord->pos = 1; |
ord->pos = 1; |
Line 1457 mdoc_bd_pre(MDOC_ARGS) |
|
Line 1457 mdoc_bd_pre(MDOC_ARGS) |
|
print_otag(h, TAG_DIV, 2, tag); |
print_otag(h, TAG_DIV, 2, tag); |
|
|
for (nn = n->child; nn; nn = nn->next) { |
for (nn = n->child; nn; nn = nn->next) { |
h->flags |= HTML_NOSPACE; |
|
print_mdoc_node(m, nn, h); |
print_mdoc_node(m, nn, h); |
if (NULL == nn->next) |
if (nn->next && nn->next->line == nn->line) |
continue; |
continue; |
if (nn->prev && nn->prev->line < nn->line) |
print_text(h, "\n"); |
print_text(h, "\n"); |
h->flags |= HTML_NOSPACE; |
else if (NULL == nn->prev) |
|
print_text(h, "\n"); |
|
} |
} |
|
|
return(0); |
return(0); |
|
|
mdoc_rs_pre(MDOC_ARGS) |
mdoc_rs_pre(MDOC_ARGS) |
{ |
{ |
struct htmlpair tag; |
struct htmlpair tag; |
struct roffsu su; |
|
|
|
if (MDOC_BLOCK != n->type) |
if (MDOC_BLOCK != n->type) |
return(1); |
return(1); |
|
|
if (n->prev && SEC_SEE_ALSO == n->sec) { |
if (n->prev && SEC_SEE_ALSO == n->sec) { |
SCALE_VS_INIT(&su, 1); |
print_otag(h, TAG_BR, 0, NULL); |
bufcat_su(h, "margin-top", &su); |
print_otag(h, TAG_BR, 0, NULL); |
PAIR_STYLE_INIT(&tag, h); |
} |
print_otag(h, TAG_DIV, 1, &tag); |
|
} |
|
|
|
PAIR_CLASS_INIT(&tag, "ref"); |
PAIR_CLASS_INIT(&tag, "ref"); |
print_otag(h, TAG_SPAN, 1, &tag); |
print_otag(h, TAG_SPAN, 1, &tag); |
Line 2197 mdoc__x_pre(MDOC_ARGS) |
|
Line 2191 mdoc__x_pre(MDOC_ARGS) |
|
switch (n->tok) { |
switch (n->tok) { |
case(MDOC__A): |
case(MDOC__A): |
PAIR_CLASS_INIT(&tag[0], "ref-auth"); |
PAIR_CLASS_INIT(&tag[0], "ref-auth"); |
|
if (n->prev && MDOC__A == n->prev->tok) |
|
if (NULL == n->next || MDOC__A != n->next->tok) |
|
print_text(h, "and"); |
break; |
break; |
case(MDOC__B): |
case(MDOC__B): |
PAIR_CLASS_INIT(&tag[0], "ref-book"); |
PAIR_CLASS_INIT(&tag[0], "ref-book"); |
Line 2249 mdoc__x_pre(MDOC_ARGS) |
|
Line 2246 mdoc__x_pre(MDOC_ARGS) |
|
|
|
PAIR_HREF_INIT(&tag[1], n->child->string); |
PAIR_HREF_INIT(&tag[1], n->child->string); |
print_otag(h, TAG_A, 2, tag); |
print_otag(h, TAG_A, 2, tag); |
|
|
return(1); |
return(1); |
} |
} |
|
|
|
|
mdoc__x_post(MDOC_ARGS) |
mdoc__x_post(MDOC_ARGS) |
{ |
{ |
|
|
|
if (MDOC__A == n->tok && n->next && MDOC__A == n->next->tok) |
|
if (NULL == n->next->next || MDOC__A != n->next->next->tok) |
|
if (NULL == n->prev || MDOC__A != n->prev->tok) |
|
return; |
|
|
/* TODO: %U */ |
/* TODO: %U */ |
|
|
h->flags |= HTML_NOSPACE; |
if (NULL == n->parent || MDOC_Rs != n->parent->tok) |
|
return; |
|
|
print_text(h, n->next ? "," : "."); |
print_text(h, n->next ? "," : "."); |
} |
} |
|
|