-/* $Id: mdoc_validate.c,v 1.350 2017/07/20 12:54:02 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.352 2017/08/02 13:29:04 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*')))
mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse,
n->line, n->pos + pos, n->string);
- if (n->sec == SEC_SYNOPSIS && mdoc->meta.msec != NULL)
- mandoc_xr_add(mdoc->meta.msec, n->string, -1, -1);
}
static void
n = mdoc->last;
- if ((n->sec == SEC_NAME || n->sec == SEC_SYNOPSIS) &&
- n->child != NULL && n->child->type == ROFFT_TEXT &&
- mdoc->meta.msec != NULL)
+ if (n->sec == SEC_NAME && n->child != NULL &&
+ n->child->type == ROFFT_TEXT && mdoc->meta.msec != NULL)
mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1);
if (n->last != NULL &&
/* Check that we begin with a proper `Sh'. */
n = mdoc->first->child;
- while (n != NULL && n->tok != TOKEN_NONE &&
+ while (n != NULL && n->tok >= MDOC_Dd &&
mdoc_macros[n->tok].flags & MDOC_PROLOGUE)
n = n->next;