=================================================================== RCS file: /cvs/mandoc/mdoc_validate.c,v retrieving revision 1.290 retrieving revision 1.293 diff -u -p -r1.290 -r1.293 --- mandoc/mdoc_validate.c 2015/04/20 09:48:53 1.290 +++ mandoc/mdoc_validate.c 2015/09/26 00:54:04 1.293 @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.290 2015/04/20 09:48:53 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.293 2015/09/26 00:54:04 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -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. */ @@ -658,7 +657,6 @@ pre_bd(PRE_ARGS) break; default: abort(); - /* NOTREACHED */ } if (DISP__NONE == dt) continue; @@ -933,28 +931,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; @@ -969,7 +945,7 @@ post_nm(POST_ARGS) if (NULL != mdoc->meta.name) return; - mdoc_deroff(&mdoc->meta.name, n); + deroff(&mdoc->meta.name, n); if (NULL == mdoc->meta.name) mandoc_msg(MANDOCERR_NM_NONAME, mdoc->parse, @@ -1061,7 +1037,6 @@ post_defaults(POST_ARGS) break; default: abort(); - /* NOTREACHED */ } mdoc->last = nn; } @@ -1883,7 +1858,7 @@ post_sh_head(POST_ARGS) secname = NULL; sec = SEC_CUSTOM; - mdoc_deroff(&secname, mdoc->last); + deroff(&secname, mdoc->last); sec = NULL == secname ? SEC_CUSTOM : a2sec(secname); /* The NAME should be first. */ @@ -2111,7 +2086,6 @@ pre_literal(PRE_ARGS) break; default: abort(); - /* NOTREACHED */ } } @@ -2132,7 +2106,7 @@ post_dd(POST_ARGS) } datestr = NULL; - mdoc_deroff(&datestr, n); + deroff(&datestr, n); if (mdoc->quick) mdoc->meta.date = datestr; else { @@ -2267,7 +2241,7 @@ post_os(POST_ARGS) free(mdoc->meta.os); mdoc->meta.os = NULL; - mdoc_deroff(&mdoc->meta.os, n); + deroff(&mdoc->meta.os, n); if (mdoc->meta.os) goto out;