-/* $Id: validate.c,v 1.71 2009/03/08 11:41:22 kristaps Exp $ */
+/* $Id: validate.c,v 1.73 2009/03/08 12:40:27 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
if (NULL == n->args)
return(1);
+ assert(n->args->argc);
for (i = 0; i < (int)n->args->argc; i++)
if ( ! check_argv(m, n, &n->args->argv[i]))
return(0);
p += (int)c - 1;
continue;
}
- return(mdoc_perr(mdoc, line, pos,
- "invalid escape sequence"));
+ return(mdoc_perr(mdoc, line, pos, "invalid escape"));
}
return(1);
pre_an(PRE_ARGS)
{
- if (n->args && 1 >= n->args->argc)
+ if (NULL == n->args || 1 == n->args->argc)
return(1);
return(mdoc_nerr(mdoc, n, "only one argument allowed"));
}