version 1.25, 2009/10/07 14:50:28 |
version 1.30, 2009/10/15 01:33:12 |
|
|
#include "out.h" |
#include "out.h" |
#include "html.h" |
#include "html.h" |
#include "mdoc.h" |
#include "mdoc.h" |
|
#include "main.h" |
|
|
#define INDENT 5 |
#define INDENT 5 |
#define HALFINDENT 3 |
#define HALFINDENT 3 |
Line 49 static void print_mdoc_nodelist(MDOC_ARGS); |
|
Line 50 static void print_mdoc_nodelist(MDOC_ARGS); |
|
|
|
static void a2width(const char *, struct roffsu *); |
static void a2width(const char *, struct roffsu *); |
static void a2offs(const char *, struct roffsu *); |
static void a2offs(const char *, struct roffsu *); |
|
|
static int a2list(const struct mdoc_node *); |
static int a2list(const struct mdoc_node *); |
|
|
static void mdoc_root_post(MDOC_ARGS); |
static void mdoc_root_post(MDOC_ARGS); |
static int mdoc_root_pre(MDOC_ARGS); |
static int mdoc_root_pre(MDOC_ARGS); |
static int mdoc_it_block_pre(MDOC_ARGS, int, |
|
struct roffsu *, int, |
|
struct roffsu *); |
|
static int mdoc_it_head_pre(MDOC_ARGS, int, |
|
struct roffsu *); |
|
static int mdoc_it_body_pre(MDOC_ARGS, int); |
|
|
|
static void mdoc__x_post(MDOC_ARGS); |
static void mdoc__x_post(MDOC_ARGS); |
static int mdoc__x_pre(MDOC_ARGS); |
static int mdoc__x_pre(MDOC_ARGS); |
Line 96 static void mdoc_fo_post(MDOC_ARGS); |
|
Line 92 static void mdoc_fo_post(MDOC_ARGS); |
|
static int mdoc_fo_pre(MDOC_ARGS); |
static int mdoc_fo_pre(MDOC_ARGS); |
static int mdoc_ic_pre(MDOC_ARGS); |
static int mdoc_ic_pre(MDOC_ARGS); |
static int mdoc_in_pre(MDOC_ARGS); |
static int mdoc_in_pre(MDOC_ARGS); |
|
static int mdoc_it_block_pre(MDOC_ARGS, int, int, |
|
struct roffsu *, struct roffsu *); |
|
static int mdoc_it_head_pre(MDOC_ARGS, int, |
|
struct roffsu *); |
|
static int mdoc_it_body_pre(MDOC_ARGS, int); |
static int mdoc_it_pre(MDOC_ARGS); |
static int mdoc_it_pre(MDOC_ARGS); |
static int mdoc_lb_pre(MDOC_ARGS); |
static int mdoc_lb_pre(MDOC_ARGS); |
static int mdoc_li_pre(MDOC_ARGS); |
static int mdoc_li_pre(MDOC_ARGS); |
Line 855 mdoc_bx_pre(MDOC_ARGS) |
|
Line 856 mdoc_bx_pre(MDOC_ARGS) |
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static int |
static int |
mdoc_it_block_pre(MDOC_ARGS, int type, struct roffsu *offs, |
mdoc_it_block_pre(MDOC_ARGS, int type, int comp, |
int comp, struct roffsu *width) |
struct roffsu *offs, struct roffsu *width) |
{ |
{ |
struct htmlpair tag; |
struct htmlpair tag; |
const struct mdoc_node *nn; |
const struct mdoc_node *nn; |
Line 1081 mdoc_it_pre(MDOC_ARGS) |
|
Line 1082 mdoc_it_pre(MDOC_ARGS) |
|
if (MDOC_BODY == n->type) |
if (MDOC_BODY == n->type) |
return(mdoc_it_body_pre(m, n, h, type)); |
return(mdoc_it_body_pre(m, n, h, type)); |
if (MDOC_BLOCK == n->type) |
if (MDOC_BLOCK == n->type) |
return(mdoc_it_block_pre(m, n, h, type, |
return(mdoc_it_block_pre(m, n, h, type, comp, |
&offs, comp, &width)); |
&offs, &width)); |
|
|
/* Override column widths. */ |
/* Override column widths. */ |
|
|
Line 1356 mdoc_bd_pre(MDOC_ARGS) |
|
Line 1357 mdoc_bd_pre(MDOC_ARGS) |
|
case (MDOC_Compact): |
case (MDOC_Compact): |
comp = 1; |
comp = 1; |
break; |
break; |
|
case (MDOC_Centred): |
|
/* FALLTHROUGH */ |
case (MDOC_Ragged): |
case (MDOC_Ragged): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (MDOC_Filled): |
case (MDOC_Filled): |
Line 1365 mdoc_bd_pre(MDOC_ARGS) |
|
Line 1368 mdoc_bd_pre(MDOC_ARGS) |
|
case (MDOC_Literal): |
case (MDOC_Literal): |
type = bl->args->argv[i].arg; |
type = bl->args->argv[i].arg; |
break; |
break; |
|
default: |
|
break; |
} |
} |
|
|
if (MDOC_BLOCK == n->type) { |
if (MDOC_BLOCK == n->type) { |
Line 1455 mdoc_cd_pre(MDOC_ARGS) |
|
Line 1460 mdoc_cd_pre(MDOC_ARGS) |
|
{ |
{ |
struct htmlpair tag; |
struct htmlpair tag; |
|
|
|
print_otag(h, TAG_DIV, 0, NULL); |
PAIR_CLASS_INIT(&tag, "config"); |
PAIR_CLASS_INIT(&tag, "config"); |
print_otag(h, TAG_SPAN, 1, &tag); |
print_otag(h, TAG_SPAN, 1, &tag); |
return(1); |
return(1); |
Line 1624 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1630 mdoc_fn_pre(MDOC_ARGS) |
|
assert(n->child->string); |
assert(n->child->string); |
sp = n->child->string; |
sp = n->child->string; |
|
|
if ((ep = strchr(sp, ' '))) { |
ep = strchr(sp, ' '); |
|
if (NULL != ep) { |
PAIR_CLASS_INIT(&tag[0], "ftype"); |
PAIR_CLASS_INIT(&tag[0], "ftype"); |
t = print_otag(h, TAG_SPAN, 1, tag); |
t = print_otag(h, TAG_SPAN, 1, tag); |
|
|