version 1.79, 2010/05/15 16:24:38 |
version 1.86, 2010/06/12 11:58:22 |
|
|
MDOC_br, |
MDOC_br, |
MDOC_sp, |
MDOC_sp, |
MDOC__U, |
MDOC__U, |
|
MDOC_Ta, |
MDOC_MAX |
MDOC_MAX |
}; |
}; |
|
|
Line 247 struct mdoc_arg { |
|
Line 248 struct mdoc_arg { |
|
unsigned int refcnt; |
unsigned int refcnt; |
}; |
}; |
|
|
|
enum mdoc_list { |
|
LIST__NONE = 0, |
|
LIST_bullet, |
|
LIST_column, |
|
LIST_dash, |
|
LIST_diag, |
|
LIST_enum, |
|
LIST_hang, |
|
LIST_hyphen, |
|
LIST_inset, |
|
LIST_item, |
|
LIST_ohang, |
|
LIST_tag |
|
}; |
|
|
|
enum mdoc_disp { |
|
DISP__NONE = 0, |
|
DISP_centred, |
|
DISP_ragged, |
|
DISP_unfilled, |
|
DISP_filled, |
|
DISP_literal |
|
}; |
|
|
|
struct mdoc_bd { |
|
const char *offs; |
|
enum mdoc_disp type; |
|
int comp; |
|
}; |
|
|
|
struct mdoc_bl { |
|
enum mdoc_list type; |
|
}; |
|
|
/* Node in AST. */ |
/* Node in AST. */ |
struct mdoc_node { |
struct mdoc_node { |
struct mdoc_node *parent; /* parent AST node */ |
struct mdoc_node *parent; /* parent AST node */ |
Line 272 struct mdoc_node { |
|
Line 307 struct mdoc_node { |
|
struct mdoc_node *body; /* BLOCK */ |
struct mdoc_node *body; /* BLOCK */ |
struct mdoc_node *tail; /* BLOCK */ |
struct mdoc_node *tail; /* BLOCK */ |
char *string; /* TEXT */ |
char *string; /* TEXT */ |
|
|
|
union { |
|
struct mdoc_bl Bl; |
|
struct mdoc_bd Bd; |
|
} data; |
}; |
}; |
|
|
#define MDOC_IGN_SCOPE (1 << 0) /* Ignore scope violations. */ |
#define MDOC_IGN_SCOPE (1 << 0) /* Ignore scope violations. */ |
#define MDOC_IGN_ESCAPE (1 << 1) /* Ignore bad escape sequences. */ |
#define MDOC_IGN_ESCAPE (1 << 1) /* Ignore bad escape sequences. */ |
#define MDOC_IGN_MACRO (1 << 2) /* Ignore unknown macros. */ |
#define MDOC_IGN_MACRO (1 << 2) /* Ignore unknown macros. */ |
|
|
/* Call-backs for parse messages. */ |
|
|
|
struct mdoc_cb { |
|
int (*mdoc_err)(void *, int, int, const char *); |
|
int (*mdoc_warn)(void *, int, int, const char *); |
|
}; |
|
|
|
/* See mdoc.3 for documentation. */ |
/* See mdoc.3 for documentation. */ |
|
|
extern const char *const *mdoc_macronames; |
extern const char *const *mdoc_macronames; |
|
|
/* See mdoc.3 for documentation. */ |
/* See mdoc.3 for documentation. */ |
|
|
void mdoc_free(struct mdoc *); |
void mdoc_free(struct mdoc *); |
struct mdoc *mdoc_alloc(void *, int, const struct mdoc_cb *); |
struct mdoc *mdoc_alloc(void *, int, mandocmsg); |
void mdoc_reset(struct mdoc *); |
void mdoc_reset(struct mdoc *); |
int mdoc_parseln(struct mdoc *, int, char *buf); |
int mdoc_parseln(struct mdoc *, int, char *, int); |
const struct mdoc_node *mdoc_node(const struct mdoc *); |
const struct mdoc_node *mdoc_node(const struct mdoc *); |
const struct mdoc_meta *mdoc_meta(const struct mdoc *); |
const struct mdoc_meta *mdoc_meta(const struct mdoc *); |
int mdoc_endparse(struct mdoc *); |
int mdoc_endparse(struct mdoc *); |