version 1.227, 2015/04/02 21:36:50 |
version 1.231, 2015/04/18 16:06:40 |
|
|
|
|
#define INDENT 5 |
#define INDENT 5 |
|
|
#define MDOC_ARGS const struct mdoc_meta *meta, \ |
#define MDOC_ARGS const struct roff_meta *meta, \ |
struct mdoc_node *n, \ |
struct roff_node *n, \ |
struct html *h |
struct html *h |
|
|
#ifndef MIN |
#ifndef MIN |
Line 53 static void print_mdoc_head(MDOC_ARGS); |
|
Line 53 static void print_mdoc_head(MDOC_ARGS); |
|
static void print_mdoc_node(MDOC_ARGS); |
static void print_mdoc_node(MDOC_ARGS); |
static void print_mdoc_nodelist(MDOC_ARGS); |
static void print_mdoc_nodelist(MDOC_ARGS); |
static void synopsis_pre(struct html *, |
static void synopsis_pre(struct html *, |
const struct mdoc_node *); |
const struct roff_node *); |
|
|
static void a2width(const char *, struct roffsu *); |
static void a2width(const char *, struct roffsu *); |
|
|
Line 265 static const char * const lists[LIST_MAX] = { |
|
Line 265 static const char * const lists[LIST_MAX] = { |
|
|
|
|
|
void |
void |
html_mdoc(void *arg, const struct mdoc *mdoc) |
html_mdoc(void *arg, const struct roff_man *mdoc) |
{ |
{ |
|
|
print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc)->child, |
print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc)->child, |
Line 293 a2width(const char *p, struct roffsu *su) |
|
Line 293 a2width(const char *p, struct roffsu *su) |
|
* See the same function in mdoc_term.c for documentation. |
* See the same function in mdoc_term.c for documentation. |
*/ |
*/ |
static void |
static void |
synopsis_pre(struct html *h, const struct mdoc_node *n) |
synopsis_pre(struct html *h, const struct roff_node *n) |
{ |
{ |
|
|
if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) |
if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) |
Line 350 print_mdoc(MDOC_ARGS) |
|
Line 350 print_mdoc(MDOC_ARGS) |
|
} else |
} else |
t = print_otag(h, TAG_DIV, 1, &tag); |
t = print_otag(h, TAG_DIV, 1, &tag); |
|
|
|
mdoc_root_pre(meta, n, h); |
print_mdoc_nodelist(meta, n, h); |
print_mdoc_nodelist(meta, n, h); |
|
mdoc_root_post(meta, n, h); |
print_tagq(h, t); |
print_tagq(h, t); |
} |
} |
|
|
Line 391 print_mdoc_node(MDOC_ARGS) |
|
Line 393 print_mdoc_node(MDOC_ARGS) |
|
n->flags &= ~MDOC_ENDED; |
n->flags &= ~MDOC_ENDED; |
|
|
switch (n->type) { |
switch (n->type) { |
case ROFFT_ROOT: |
|
child = mdoc_root_pre(meta, n, h); |
|
break; |
|
case ROFFT_TEXT: |
case ROFFT_TEXT: |
/* No tables in this mode... */ |
/* No tables in this mode... */ |
assert(NULL == h->tblt); |
assert(NULL == h->tblt); |
Line 451 print_mdoc_node(MDOC_ARGS) |
|
Line 450 print_mdoc_node(MDOC_ARGS) |
|
print_stagq(h, t); |
print_stagq(h, t); |
|
|
switch (n->type) { |
switch (n->type) { |
case ROFFT_ROOT: |
|
mdoc_root_post(meta, n, h); |
|
break; |
|
case ROFFT_EQN: |
case ROFFT_EQN: |
break; |
break; |
default: |
default: |
Line 822 mdoc_it_pre(MDOC_ARGS) |
|
Line 818 mdoc_it_pre(MDOC_ARGS) |
|
struct roffsu su; |
struct roffsu su; |
enum mdoc_list type; |
enum mdoc_list type; |
struct htmlpair tag[2]; |
struct htmlpair tag[2]; |
const struct mdoc_node *bl; |
const struct roff_node *bl; |
|
|
bl = n->parent; |
bl = n->parent; |
while (bl && MDOC_Bl != bl->tok) |
while (bl && MDOC_Bl != bl->tok) |
Line 1126 mdoc_bd_pre(MDOC_ARGS) |
|
Line 1122 mdoc_bd_pre(MDOC_ARGS) |
|
{ |
{ |
struct htmlpair tag[2]; |
struct htmlpair tag[2]; |
int comp, sv; |
int comp, sv; |
struct mdoc_node *nn; |
struct roff_node *nn; |
struct roffsu su; |
struct roffsu su; |
|
|
if (n->type == ROFFT_HEAD) |
if (n->type == ROFFT_HEAD) |
Line 1312 mdoc_er_pre(MDOC_ARGS) |
|
Line 1308 mdoc_er_pre(MDOC_ARGS) |
|
static int |
static int |
mdoc_fa_pre(MDOC_ARGS) |
mdoc_fa_pre(MDOC_ARGS) |
{ |
{ |
const struct mdoc_node *nn; |
const struct roff_node *nn; |
struct htmlpair tag; |
struct htmlpair tag; |
struct tag *t; |
struct tag *t; |
|
|