diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 16:06:39 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 16:06:39 +0000 |
commit | 87a05fb3c50ab6e9a1befb22c6e63e3e47f571f3 (patch) | |
tree | 77e785e3111f4ee50958f980199ad642e4ff878d /mdoc_validate.c | |
parent | 2b2bf499dc15caf698ef62f3186d475c99e996bc (diff) | |
download | mandoc-87a05fb3c50ab6e9a1befb22c6e63e3e47f571f3.tar.gz |
Replace the structs mdoc and man by a unified struct roff_man.
Almost completely mechanical, no functional change.
Written on the train from Exeter to London returning from p2k15.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index ccccbc41..21109bc1 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -40,8 +40,8 @@ /* FIXME: .Bl -diag can't have non-text children in HEAD. */ -#define PRE_ARGS struct mdoc *mdoc, struct roff_node *n -#define POST_ARGS struct mdoc *mdoc +#define PRE_ARGS struct roff_man *mdoc, struct roff_node *n +#define POST_ARGS struct roff_man *mdoc enum check_ineq { CHECK_LT, @@ -57,10 +57,10 @@ struct valids { v_post post; }; -static void check_text(struct mdoc *, int, int, char *); -static void check_argv(struct mdoc *, +static void check_text(struct roff_man *, int, int, char *); +static void check_argv(struct roff_man *, struct roff_node *, struct mdoc_argv *); -static void check_args(struct mdoc *, struct roff_node *); +static void check_args(struct roff_man *, struct roff_node *); static int child_an(const struct roff_node *); static enum roff_sec a2sec(const char *); static size_t macro2len(int); @@ -293,7 +293,7 @@ static const char * const secnames[SEC__MAX] = { void -mdoc_valid_pre(struct mdoc *mdoc, struct roff_node *n) +mdoc_valid_pre(struct roff_man *mdoc, struct roff_node *n) { v_pre p; @@ -319,7 +319,7 @@ mdoc_valid_pre(struct mdoc *mdoc, struct roff_node *n) } void -mdoc_valid_post(struct mdoc *mdoc) +mdoc_valid_post(struct roff_man *mdoc) { struct roff_node *n; v_post p; @@ -362,7 +362,7 @@ mdoc_valid_post(struct mdoc *mdoc) } static void -check_args(struct mdoc *mdoc, struct roff_node *n) +check_args(struct roff_man *mdoc, struct roff_node *n) { int i; @@ -375,7 +375,7 @@ check_args(struct mdoc *mdoc, struct roff_node *n) } static void -check_argv(struct mdoc *mdoc, struct roff_node *n, struct mdoc_argv *v) +check_argv(struct roff_man *mdoc, struct roff_node *n, struct mdoc_argv *v) { int i; @@ -384,7 +384,7 @@ check_argv(struct mdoc *mdoc, struct roff_node *n, struct mdoc_argv *v) } static void -check_text(struct mdoc *mdoc, int ln, int pos, char *p) +check_text(struct roff_man *mdoc, int ln, int pos, char *p) { char *cp; @@ -1046,7 +1046,7 @@ post_defaults(POST_ARGS) return; nn = mdoc->last; - mdoc->next = MDOC_NEXT_CHILD; + mdoc->next = ROFF_NEXT_CHILD; switch (nn->tok) { case MDOC_Ar: @@ -1074,7 +1074,7 @@ post_at(POST_ARGS) n = mdoc->last; if (n->child == NULL) { - mdoc->next = MDOC_NEXT_CHILD; + mdoc->next = ROFF_NEXT_CHILD; mdoc_word_alloc(mdoc, n->line, n->pos, "AT&T UNIX"); mdoc->last = n; return; @@ -1502,7 +1502,7 @@ post_bk(POST_ARGS) } static void -post_sm(struct mdoc *mdoc) +post_sm(struct roff_man *mdoc) { struct roff_node *nch; @@ -2313,7 +2313,7 @@ post_ex(POST_ARGS) return; } - mdoc->next = MDOC_NEXT_CHILD; + mdoc->next = ROFF_NEXT_CHILD; mdoc_word_alloc(mdoc, n->line, n->pos, mdoc->meta.name); mdoc->last = n; } |