version 1.1, 2009/09/21 14:56:57 |
version 1.2, 2009/09/21 23:12:08 |
Line 67 static int mdoc_ar_pre(MDOC_ARGS); |
|
Line 67 static int mdoc_ar_pre(MDOC_ARGS); |
|
static int mdoc_bd_pre(MDOC_ARGS); |
static int mdoc_bd_pre(MDOC_ARGS); |
static void mdoc_bl_post(MDOC_ARGS); |
static void mdoc_bl_post(MDOC_ARGS); |
static int mdoc_bl_pre(MDOC_ARGS); |
static int mdoc_bl_pre(MDOC_ARGS); |
|
static void mdoc_brq_post(MDOC_ARGS); |
|
static int mdoc_brq_pre(MDOC_ARGS); |
static int mdoc_cd_pre(MDOC_ARGS); |
static int mdoc_cd_pre(MDOC_ARGS); |
static int mdoc_d1_pre(MDOC_ARGS); |
static int mdoc_d1_pre(MDOC_ARGS); |
static void mdoc_dq_post(MDOC_ARGS); |
static void mdoc_dq_post(MDOC_ARGS); |
Line 82 static int mdoc_er_pre(MDOC_ARGS); |
|
Line 84 static int mdoc_er_pre(MDOC_ARGS); |
|
static int mdoc_ev_pre(MDOC_ARGS); |
static int mdoc_ev_pre(MDOC_ARGS); |
static int mdoc_ex_pre(MDOC_ARGS); |
static int mdoc_ex_pre(MDOC_ARGS); |
static int mdoc_it_pre(MDOC_ARGS); |
static int mdoc_it_pre(MDOC_ARGS); |
|
static int mdoc_lk_pre(MDOC_ARGS); |
|
static int mdoc_mt_pre(MDOC_ARGS); |
static int mdoc_nd_pre(MDOC_ARGS); |
static int mdoc_nd_pre(MDOC_ARGS); |
static int mdoc_nm_pre(MDOC_ARGS); |
static int mdoc_nm_pre(MDOC_ARGS); |
static int mdoc_ns_pre(MDOC_ARGS); |
static int mdoc_ns_pre(MDOC_ARGS); |
Line 216 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
Line 220 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
{NULL, NULL}, /* Ud */ |
{NULL, NULL}, /* Ud */ |
{NULL, NULL}, /* Lb */ |
{NULL, NULL}, /* Lb */ |
{mdoc_sp_pre, NULL}, /* Lp */ |
{mdoc_sp_pre, NULL}, /* Lp */ |
{NULL, NULL}, /* Lk */ |
{mdoc_lk_pre, NULL}, /* Lk */ |
{NULL, NULL}, /* Mt */ |
{mdoc_mt_pre, NULL}, /* Mt */ |
{NULL, NULL}, /* Brq */ |
{mdoc_brq_pre, mdoc_brq_post}, /* Brq */ |
{NULL, NULL}, /* Bro */ |
{mdoc_brq_pre, mdoc_brq_post}, /* Bro */ |
{NULL, NULL}, /* Brc */ |
{NULL, NULL}, /* Brc */ |
{NULL, NULL}, /* %C */ |
{NULL, NULL}, /* %C */ |
{NULL, NULL}, /* Es */ |
{NULL, NULL}, /* Es */ /* TODO */ |
{NULL, NULL}, /* En */ |
{NULL, NULL}, /* En */ /* TODO */ |
{mdoc_xx_pre, NULL}, /* Dx */ |
{mdoc_xx_pre, NULL}, /* Dx */ |
{NULL, NULL}, /* %Q */ |
{NULL, NULL}, /* %Q */ |
{mdoc_sp_pre, NULL}, /* br */ |
{mdoc_sp_pre, NULL}, /* br */ |
Line 502 mdoc_root_pre(MDOC_ARGS) |
|
Line 506 mdoc_root_pre(MDOC_ARGS) |
|
tag[0].key = ATTR_STYLE; |
tag[0].key = ATTR_STYLE; |
tag[0].val = "width: 33%;"; |
tag[0].val = "width: 33%;"; |
print_otag(h, TAG_TD, 1, tag); |
print_otag(h, TAG_TD, 1, tag); |
print_text(h, b); |
print_text(h, title); |
print_stagq(h, tt); |
print_stagq(h, tt); |
|
|
tag[0].key = ATTR_STYLE; |
tag[0].key = ATTR_STYLE; |
tag[0].val = "width: 33%; text-align: center;"; |
tag[0].val = "width: 33%; text-align: center;"; |
print_otag(h, TAG_TD, 1, tag); |
print_otag(h, TAG_TD, 1, tag); |
print_text(h, title); |
print_text(h, b); |
print_stagq(h, tt); |
print_stagq(h, tt); |
|
|
tag[0].key = ATTR_STYLE; |
tag[0].key = ATTR_STYLE; |
tag[0].val = "width: 33%; text-align: right;"; |
tag[0].val = "width: 33%; text-align: right;"; |
print_otag(h, TAG_TD, 1, tag); |
print_otag(h, TAG_TD, 1, tag); |
print_text(h, b); |
print_text(h, title); |
print_tagq(h, t); |
print_tagq(h, t); |
|
|
return(1); |
return(1); |
Line 890 mdoc_tbl_head_pre(MDOC_ARGS, int t, int w) |
|
Line 894 mdoc_tbl_head_pre(MDOC_ARGS, int t, int w) |
|
default: |
default: |
buffmt("margin-left: -%dem;", w); |
buffmt("margin-left: -%dem;", w); |
bufcat("clear: left;"); |
bufcat("clear: left;"); |
bufcat("float: left;"); |
if (n->next && n->next->child) |
|
bufcat("float: left;"); |
bufcat("padding-right: 1em;"); |
bufcat("padding-right: 1em;"); |
tag.key = ATTR_STYLE; |
tag.key = ATTR_STYLE; |
tag.val = buf; |
tag.val = buf; |
Line 1521 mdoc_vt_pre(MDOC_ARGS) |
|
Line 1526 mdoc_vt_pre(MDOC_ARGS) |
|
return(1); |
return(1); |
} |
} |
|
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static int |
static int |
mdoc_ft_pre(MDOC_ARGS) |
mdoc_ft_pre(MDOC_ARGS) |
Line 1614 mdoc_sp_pre(MDOC_ARGS) |
|
Line 1620 mdoc_sp_pre(MDOC_ARGS) |
|
print_otag(h, TAG_DIV, 1, &tag); |
print_otag(h, TAG_DIV, 1, &tag); |
return(1); |
return(1); |
|
|
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
mdoc_brq_pre(MDOC_ARGS) |
|
{ |
|
|
|
if (MDOC_BODY != n->type) |
|
return(1); |
|
print_text(h, "\\(lC"); |
|
h->flags |= HTML_NOSPACE; |
|
return(1); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static void |
|
mdoc_brq_post(MDOC_ARGS) |
|
{ |
|
|
|
if (MDOC_BODY != n->type) |
|
return; |
|
h->flags |= HTML_NOSPACE; |
|
print_text(h, "\\(rC"); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
mdoc_lk_pre(MDOC_ARGS) |
|
{ |
|
const struct mdoc_node *nn; |
|
struct htmlpair tag[2]; |
|
|
|
nn = n->child; |
|
|
|
tag[0].key = ATTR_CLASS; |
|
tag[0].val = "link-ext"; |
|
tag[1].key = ATTR_HREF; |
|
tag[1].val = nn->string; |
|
|
|
print_otag(h, TAG_A, 2, tag); |
|
|
|
if (NULL == nn->next) |
|
return(1); |
|
|
|
for (nn = nn->next; nn; nn = nn->next) |
|
print_text(h, nn->string); |
|
|
|
return(0); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
mdoc_mt_pre(MDOC_ARGS) |
|
{ |
|
struct htmlpair tag[2]; |
|
struct tag *t; |
|
const struct mdoc_node *nn; |
|
|
|
tag[0].key = ATTR_CLASS; |
|
tag[0].val = "link-mail"; |
|
|
|
for (nn = n->child; nn; nn = nn->next) { |
|
bufinit(); |
|
bufcat("mailto:"); |
|
bufcat(nn->string); |
|
|
|
tag[1].key = ATTR_HREF; |
|
tag[1].val = buf; |
|
|
|
t = print_otag(h, TAG_A, 2, tag); |
|
print_text(h, nn->string); |
|
print_tagq(h, t); |
|
} |
|
|
|
return(0); |
} |
} |