-/* $Id: mdoc_validate.c,v 1.285 2015/04/02 22:48:17 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.286 2015/04/18 16:06:41 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
/* 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,
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);
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;
}
void
-mdoc_valid_post(struct mdoc *mdoc)
+mdoc_valid_post(struct roff_man *mdoc)
{
struct roff_node *n;
v_post p;
}
static void
-check_args(struct mdoc *mdoc, struct roff_node *n)
+check_args(struct roff_man *mdoc, struct roff_node *n)
{
int i;
}
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;
}
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;
return;
nn = mdoc->last;
- mdoc->next = MDOC_NEXT_CHILD;
+ mdoc->next = ROFF_NEXT_CHILD;
switch (nn->tok) {
case MDOC_Ar:
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;
}
static void
-post_sm(struct mdoc *mdoc)
+post_sm(struct roff_man *mdoc)
{
struct roff_node *nch;
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;
}