version 1.89, 2015/04/02 21:36:50 |
version 1.92, 2015/04/18 16:06:40 |
|
|
#include "out.h" |
#include "out.h" |
#include "main.h" |
#include "main.h" |
|
|
#define DECL_ARGS const struct mdoc_meta *meta, struct mdoc_node *n |
#define DECL_ARGS const struct roff_meta *meta, struct roff_node *n |
|
|
struct manact { |
struct manact { |
int (*cond)(DECL_ARGS); /* DON'T run actions */ |
int (*cond)(DECL_ARGS); /* DON'T run actions */ |
Line 108 static int pre_sm(DECL_ARGS); |
|
Line 108 static int pre_sm(DECL_ARGS); |
|
static int pre_sp(DECL_ARGS); |
static int pre_sp(DECL_ARGS); |
static int pre_sect(DECL_ARGS); |
static int pre_sect(DECL_ARGS); |
static int pre_sy(DECL_ARGS); |
static int pre_sy(DECL_ARGS); |
static void pre_syn(const struct mdoc_node *); |
static void pre_syn(const struct roff_node *); |
static int pre_vt(DECL_ARGS); |
static int pre_vt(DECL_ARGS); |
static int pre_ux(DECL_ARGS); |
static int pre_ux(DECL_ARGS); |
static int pre_xr(DECL_ARGS); |
static int pre_xr(DECL_ARGS); |
Line 117 static void print_line(const char *, int); |
|
Line 117 static void print_line(const char *, int); |
|
static void print_block(const char *, int); |
static void print_block(const char *, int); |
static void print_offs(const char *, int); |
static void print_offs(const char *, int); |
static void print_width(const struct mdoc_bl *, |
static void print_width(const struct mdoc_bl *, |
const struct mdoc_node *); |
const struct roff_node *); |
static void print_count(int *); |
static void print_count(int *); |
static void print_node(DECL_ARGS); |
static void print_node(DECL_ARGS); |
|
|
Line 468 print_offs(const char *v, int keywords) |
|
Line 468 print_offs(const char *v, int keywords) |
|
* Set up the indentation for a list item; used from pre_it(). |
* Set up the indentation for a list item; used from pre_it(). |
*/ |
*/ |
static void |
static void |
print_width(const struct mdoc_bl *bl, const struct mdoc_node *child) |
print_width(const struct mdoc_bl *bl, const struct roff_node *child) |
{ |
{ |
char buf[24]; |
char buf[24]; |
struct roffsu su; |
struct roffsu su; |
Line 532 print_count(int *count) |
|
Line 532 print_count(int *count) |
|
} |
} |
|
|
void |
void |
man_man(void *arg, const struct man *man) |
man_man(void *arg, const struct roff_man *man) |
{ |
{ |
|
|
/* |
/* |
Line 545 man_man(void *arg, const struct man *man) |
|
Line 545 man_man(void *arg, const struct man *man) |
|
} |
} |
|
|
void |
void |
man_mdoc(void *arg, const struct mdoc *mdoc) |
man_mdoc(void *arg, const struct roff_man *mdoc) |
{ |
{ |
const struct mdoc_meta *meta; |
const struct roff_meta *meta; |
struct mdoc_node *n; |
struct roff_node *n; |
|
|
meta = mdoc_meta(mdoc); |
meta = mdoc_meta(mdoc); |
n = mdoc_node(mdoc)->child; |
n = mdoc_node(mdoc)->child; |
|
|
print_node(DECL_ARGS) |
print_node(DECL_ARGS) |
{ |
{ |
const struct manact *act; |
const struct manact *act; |
struct mdoc_node *sub; |
struct roff_node *sub; |
int cond, do_sub; |
int cond, do_sub; |
|
|
/* |
/* |
Line 808 post_sect(DECL_ARGS) |
|
Line 808 post_sect(DECL_ARGS) |
|
|
|
/* See mdoc_term.c, synopsis_pre() for comments. */ |
/* See mdoc_term.c, synopsis_pre() for comments. */ |
static void |
static void |
pre_syn(const struct mdoc_node *n) |
pre_syn(const struct roff_node *n) |
{ |
{ |
|
|
if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) |
if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) |
Line 1366 post_in(DECL_ARGS) |
|
Line 1366 post_in(DECL_ARGS) |
|
static int |
static int |
pre_it(DECL_ARGS) |
pre_it(DECL_ARGS) |
{ |
{ |
const struct mdoc_node *bln; |
const struct roff_node *bln; |
|
|
switch (n->type) { |
switch (n->type) { |
case ROFFT_HEAD: |
case ROFFT_HEAD: |
|
|
static void |
static void |
post_it(DECL_ARGS) |
post_it(DECL_ARGS) |
{ |
{ |
const struct mdoc_node *bln; |
const struct roff_node *bln; |
|
|
bln = n->parent->parent; |
bln = n->parent->parent; |
|
|
Line 1533 post_lb(DECL_ARGS) |
|
Line 1533 post_lb(DECL_ARGS) |
|
static int |
static int |
pre_lk(DECL_ARGS) |
pre_lk(DECL_ARGS) |
{ |
{ |
const struct mdoc_node *link, *descr; |
const struct roff_node *link, *descr; |
|
|
if (NULL == (link = n->child)) |
if (NULL == (link = n->child)) |
return(0); |
return(0); |