version 1.98, 2010/07/19 11:11:54 |
version 1.102, 2010/08/20 01:02:07 |
Line 125 static int mdoc_pq_pre(MDOC_ARGS); |
|
Line 125 static int mdoc_pq_pre(MDOC_ARGS); |
|
static int mdoc_rs_pre(MDOC_ARGS); |
static int mdoc_rs_pre(MDOC_ARGS); |
static int mdoc_rv_pre(MDOC_ARGS); |
static int mdoc_rv_pre(MDOC_ARGS); |
static int mdoc_sh_pre(MDOC_ARGS); |
static int mdoc_sh_pre(MDOC_ARGS); |
|
static int mdoc_sm_pre(MDOC_ARGS); |
static int mdoc_sp_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); |
Line 227 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
Line 228 static const struct htmlmdoc mdocs[MDOC_MAX] = { |
|
{NULL, NULL}, /* Sc */ |
{NULL, NULL}, /* Sc */ |
{mdoc_sq_pre, mdoc_sq_post}, /* So */ |
{mdoc_sq_pre, mdoc_sq_post}, /* So */ |
{mdoc_sq_pre, mdoc_sq_post}, /* Sq */ |
{mdoc_sq_pre, mdoc_sq_post}, /* Sq */ |
{NULL, NULL}, /* Sm */ /* FIXME - no idea. */ |
{mdoc_sm_pre, NULL}, /* Sm */ |
{mdoc_sx_pre, NULL}, /* Sx */ |
{mdoc_sx_pre, NULL}, /* Sx */ |
{mdoc_sy_pre, NULL}, /* Sy */ |
{mdoc_sy_pre, NULL}, /* Sy */ |
{NULL, NULL}, /* Tn */ |
{NULL, NULL}, /* Tn */ |
Line 1182 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(MANDOCLEVEL_SYSERR); |
} |
} |
ord->cookie = n; |
ord->cookie = n; |
ord->pos = 1; |
ord->pos = 1; |
Line 1456 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); |
Line 1715 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1713 mdoc_fn_pre(MDOC_ARGS) |
|
print_text(h, ")"); |
print_text(h, ")"); |
if (MDOC_SYNPRETTY & n->flags) |
if (MDOC_SYNPRETTY & n->flags) |
print_text(h, ";"); |
print_text(h, ";"); |
|
|
|
return(0); |
|
} |
|
|
|
|
|
/* ARGSUSED */ |
|
static int |
|
mdoc_sm_pre(MDOC_ARGS) |
|
{ |
|
|
|
assert(n->child && MDOC_TEXT == n->child->type); |
|
if (0 == strcmp("on", n->child->string)) { |
|
/* FIXME: no p->col to check... */ |
|
h->flags &= ~HTML_NOSPACE; |
|
h->flags &= ~HTML_NONOSPACE; |
|
} else |
|
h->flags |= HTML_NONOSPACE; |
|
|
return(0); |
return(0); |
} |
} |