-/* $Id: mdoc_validate.c,v 1.251 2014/10/11 21:34:04 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.252 2014/10/13 14:01:21 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
static int
post_fname(POST_ARGS)
{
- const struct mdoc_node *n;
- size_t pos;
+ const struct mdoc_node *n;
+ const char *cp;
+ size_t pos;
n = mdoc->last->child;
pos = strcspn(n->string, "()");
- if (n->string[pos] != '\0')
+ cp = n->string + pos;
+ if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*')))
mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse,
n->line, n->pos + pos, n->string);
return(1);