version 1.47, 2009/09/21 13:47:40 |
version 1.49, 2009/09/21 14:08:13 |
Line 220 static int mdoc_ns_pre(MDOC_ARGS); |
|
Line 220 static int mdoc_ns_pre(MDOC_ARGS); |
|
static void mdoc_op_post(MDOC_ARGS); |
static void mdoc_op_post(MDOC_ARGS); |
static int mdoc_op_pre(MDOC_ARGS); |
static int mdoc_op_pre(MDOC_ARGS); |
static int mdoc_pa_pre(MDOC_ARGS); |
static int mdoc_pa_pre(MDOC_ARGS); |
static int mdoc_pp_pre(MDOC_ARGS); |
|
static void mdoc_pq_post(MDOC_ARGS); |
static void mdoc_pq_post(MDOC_ARGS); |
static int mdoc_pq_pre(MDOC_ARGS); |
static int mdoc_pq_pre(MDOC_ARGS); |
static void mdoc_qq_post(MDOC_ARGS); |
static void mdoc_qq_post(MDOC_ARGS); |
static int mdoc_qq_pre(MDOC_ARGS); |
static int mdoc_qq_pre(MDOC_ARGS); |
static int mdoc_sh_pre(MDOC_ARGS); |
static int mdoc_sh_pre(MDOC_ARGS); |
|
static int mdoc_sp_pre(MDOC_ARGS); |
static void mdoc_sq_post(MDOC_ARGS); |
static void mdoc_sq_post(MDOC_ARGS); |
static int mdoc_sq_pre(MDOC_ARGS); |
static int mdoc_sq_pre(MDOC_ARGS); |
static int mdoc_ss_pre(MDOC_ARGS); |
static int mdoc_ss_pre(MDOC_ARGS); |
Line 241 extern size_t strlcat(char *, const char *, size_ |
|
Line 241 extern size_t strlcat(char *, const char *, size_ |
|
#endif |
#endif |
|
|
static const struct htmlmdoc mdocs[MDOC_MAX] = { |
static const struct htmlmdoc mdocs[MDOC_MAX] = { |
{mdoc_pp_pre, NULL}, /* Ap */ |
{NULL, NULL}, /* Ap */ |
{NULL, NULL}, /* Dd */ |
{NULL, NULL}, /* Dd */ |
{NULL, NULL}, /* Dt */ |
{NULL, NULL}, /* Dt */ |
{NULL, NULL}, /* Os */ |
{NULL, NULL}, /* Os */ |
{mdoc_sh_pre, NULL }, /* Sh */ |
{mdoc_sh_pre, NULL }, /* Sh */ |
{mdoc_ss_pre, NULL }, /* Ss */ |
{mdoc_ss_pre, NULL }, /* Ss */ |
{mdoc_pp_pre, NULL}, /* Pp */ |
{mdoc_sp_pre, NULL}, /* Pp */ |
{mdoc_d1_pre, NULL}, /* D1 */ |
{mdoc_d1_pre, NULL}, /* D1 */ |
{mdoc_d1_pre, NULL}, /* Dl */ |
{mdoc_d1_pre, NULL}, /* Dl */ |
{mdoc_bd_pre, NULL}, /* Bd */ |
{mdoc_bd_pre, NULL}, /* Bd */ |
Line 348 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
Line 348 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
{NULL, NULL}, /* Fr */ |
{NULL, NULL}, /* Fr */ |
{NULL, NULL}, /* Ud */ |
{NULL, NULL}, /* Ud */ |
{NULL, NULL}, /* Lb */ |
{NULL, NULL}, /* Lb */ |
{NULL, NULL}, /* Lp */ |
{mdoc_sp_pre, NULL}, /* Lp */ |
{NULL, NULL}, /* Lk */ |
{NULL, NULL}, /* Lk */ |
{NULL, NULL}, /* Mt */ |
{NULL, NULL}, /* Mt */ |
{NULL, NULL}, /* Brq */ |
{NULL, NULL}, /* Brq */ |
Line 359 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
Line 359 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
{NULL, NULL}, /* En */ |
{NULL, NULL}, /* En */ |
{mdoc_xx_pre, NULL}, /* Dx */ |
{mdoc_xx_pre, NULL}, /* Dx */ |
{NULL, NULL}, /* %Q */ |
{NULL, NULL}, /* %Q */ |
{NULL, NULL}, /* br */ |
{mdoc_sp_pre, NULL}, /* br */ |
{NULL, NULL}, /* sp */ |
{mdoc_sp_pre, NULL}, /* sp */ |
}; |
}; |
|
|
static char buf[BUFSIZ]; /* XXX */ |
static char buf[BUFSIZ]; /* XXX */ |
Line 1223 mdoc_fl_pre(MDOC_ARGS) |
|
Line 1223 mdoc_fl_pre(MDOC_ARGS) |
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static int |
static int |
mdoc_pp_pre(MDOC_ARGS) |
|
{ |
|
struct htmlpair tag; |
|
|
|
tag.key = ATTR_STYLE; |
|
tag.val = "clear: both; height: 1em;"; |
|
print_otag(h, TAG_DIV, 1, &tag); |
|
return(0); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
mdoc_nd_pre(MDOC_ARGS) |
mdoc_nd_pre(MDOC_ARGS) |
{ |
{ |
struct htmlpair tag; |
struct htmlpair tag; |
Line 2171 mdoc_fn_pre(MDOC_ARGS) |
|
Line 2158 mdoc_fn_pre(MDOC_ARGS) |
|
print_text(h, ";"); |
print_text(h, ";"); |
|
|
return(0); |
return(0); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
mdoc_sp_pre(MDOC_ARGS) |
|
{ |
|
int len; |
|
struct htmlpair tag; |
|
|
|
switch (n->tok) { |
|
case (MDOC_sp): |
|
len = n->child ? atoi(n->child->string) : 1; |
|
break; |
|
case (MDOC_br): |
|
len = 0; |
|
break; |
|
default: |
|
len = 1; |
|
break; |
|
} |
|
|
|
buffmt("height: %dem", len); |
|
tag.key = ATTR_STYLE; |
|
tag.val = buf; |
|
print_otag(h, TAG_DIV, 1, &tag); |
|
return(1); |
|
|
} |
} |