diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-09-14 15:36:14 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-09-14 15:36:14 +0000 |
commit | a56a160b9614f2772c5f1aa68fe4b0e7f3baf55c (patch) | |
tree | 13d9ab28831d91e2d09ea2b46b6cb65f463b7ca8 /mdoc_validate.c | |
parent | d2adfebbaa7840853e155aeba058fa8378e9c967 (diff) | |
download | mandoc-a56a160b9614f2772c5f1aa68fe4b0e7f3baf55c.tar.gz |
Remove the warning about children of .Vt blocks because actually,
.Vt type global_variable No = Dv defined_constant ;
is the best way to specify in the SYNOPSIS how a global variable
is initialized in the rare case where that matters.
Issue noticed by jmc@.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 6c9fff89..426332c2 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -107,7 +107,6 @@ static void post_sh_see_also(POST_ARGS); static void post_sh_authors(POST_ARGS); static void post_sm(POST_ARGS); static void post_st(POST_ARGS); -static void post_vt(POST_ARGS); static void pre_an(PRE_ARGS); static void pre_bd(PRE_ARGS); @@ -161,7 +160,7 @@ static const struct valids mdoc_valids[MDOC_MAX] = { { pre_std, NULL }, /* Rv */ { NULL, post_st }, /* St */ { NULL, NULL }, /* Va */ - { NULL, post_vt }, /* Vt */ + { NULL, NULL }, /* Vt */ { NULL, NULL }, /* Xr */ { NULL, NULL }, /* %A */ { NULL, post_hyph }, /* %B */ /* FIXME: can be used outside Rs/Re. */ @@ -933,28 +932,6 @@ post_fa(POST_ARGS) } static void -post_vt(POST_ARGS) -{ - const struct roff_node *n; - - /* - * The Vt macro comes in both ELEM and BLOCK form, both of which - * have different syntaxes (yet more context-sensitive - * behaviour). ELEM types must have a child, which is already - * guaranteed by the in_line parsing routine; BLOCK types, - * specifically the BODY, should only have TEXT children. - */ - - if (mdoc->last->type != ROFFT_BODY) - return; - - for (n = mdoc->last->child; n; n = n->next) - if (n->type != ROFFT_TEXT) - mandoc_msg(MANDOCERR_VT_CHILD, mdoc->parse, - n->line, n->pos, mdoc_macronames[n->tok]); -} - -static void post_nm(POST_ARGS) { struct roff_node *n; |