version 1.174, 2011/07/23 22:57:13 |
version 1.177, 2011/08/18 09:16:01 |
|
|
#include "main.h" |
#include "main.h" |
|
|
#define INDENT 5 |
#define INDENT 5 |
#define HALFINDENT 3 |
|
|
|
#define MDOC_ARGS const struct mdoc_meta *m, \ |
#define MDOC_ARGS const struct mdoc_meta *m, \ |
const struct mdoc_node *n, \ |
const struct mdoc_node *n, \ |
Line 353 a2offs(const char *p, struct roffsu *su) |
|
Line 352 a2offs(const char *p, struct roffsu *su) |
|
SCALE_HS_INIT(su, INDENT); |
SCALE_HS_INIT(su, INDENT); |
else if (0 == strcmp(p, "indent-two")) |
else if (0 == strcmp(p, "indent-two")) |
SCALE_HS_INIT(su, INDENT * 2); |
SCALE_HS_INIT(su, INDENT * 2); |
else if ( ! a2roffsu(p, su, SCALE_MAX)) { |
else if ( ! a2roffsu(p, su, SCALE_MAX)) |
su->unit = SCALE_BU; |
SCALE_HS_INIT(su, html_strlen(p)); |
su->scale = html_strlen(p); |
|
} |
|
} |
} |
|
|
|
|
Line 608 mdoc_sh_pre(MDOC_ARGS) |
|
Line 605 mdoc_sh_pre(MDOC_ARGS) |
|
|
|
bufinit(h); |
bufinit(h); |
bufcat(h, "x"); |
bufcat(h, "x"); |
for (n = n->child; n; n = n->next) { |
|
|
for (n = n->child; n && MDOC_TEXT == n->type; ) { |
bufcat_id(h, n->string); |
bufcat_id(h, n->string); |
if (n->next) |
if (NULL != (n = n->next)) |
bufcat_id(h, " "); |
bufcat_id(h, " "); |
} |
} |
|
|
PAIR_ID_INIT(&tag, h->buf); |
if (NULL == n) { |
print_otag(h, TAG_H1, 1, &tag); |
PAIR_ID_INIT(&tag, h->buf); |
|
print_otag(h, TAG_H1, 1, &tag); |
|
} else |
|
print_otag(h, TAG_H1, 0, NULL); |
|
|
return(1); |
return(1); |
} |
} |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static int |
static int |
mdoc_ss_pre(MDOC_ARGS) |
mdoc_ss_pre(MDOC_ARGS) |
Line 635 mdoc_ss_pre(MDOC_ARGS) |
|
Line 636 mdoc_ss_pre(MDOC_ARGS) |
|
|
|
bufinit(h); |
bufinit(h); |
bufcat(h, "x"); |
bufcat(h, "x"); |
for (n = n->child; n; n = n->next) { |
|
|
for (n = n->child; n && MDOC_TEXT == n->type; ) { |
bufcat_id(h, n->string); |
bufcat_id(h, n->string); |
if (n->next) |
if (NULL != (n = n->next)) |
bufcat_id(h, " "); |
bufcat_id(h, " "); |
} |
} |
|
|
PAIR_ID_INIT(&tag, h->buf); |
if (NULL == n) { |
print_otag(h, TAG_H2, 1, &tag); |
PAIR_ID_INIT(&tag, h->buf); |
|
print_otag(h, TAG_H2, 1, &tag); |
|
} else |
|
print_otag(h, TAG_H2, 0, NULL); |
|
|
return(1); |
return(1); |
} |
} |
|
|
Line 1171 mdoc_sx_pre(MDOC_ARGS) |
|
Line 1177 mdoc_sx_pre(MDOC_ARGS) |
|
|
|
bufinit(h); |
bufinit(h); |
bufcat(h, "#x"); |
bufcat(h, "#x"); |
for (n = n->child; n; n = n->next) { |
|
|
for (n = n->child; n; ) { |
bufcat_id(h, n->string); |
bufcat_id(h, n->string); |
if (n->next) |
if (NULL != (n = n->next)) |
bufcat_id(h, " "); |
bufcat_id(h, " "); |
} |
} |
|
|
Line 1984 mdoc_li_pre(MDOC_ARGS) |
|
Line 1991 mdoc_li_pre(MDOC_ARGS) |
|
struct htmlpair tag; |
struct htmlpair tag; |
|
|
PAIR_CLASS_INIT(&tag, "lit"); |
PAIR_CLASS_INIT(&tag, "lit"); |
print_otag(h, TAG_SPAN, 1, &tag); |
print_otag(h, TAG_CODE, 1, &tag); |
return(1); |
return(1); |
} |
} |
|
|