version 1.72, 2009/03/08 11:48:44 |
version 1.77, 2009/03/09 13:17:50 |
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
* PERFORMANCE OF THIS SOFTWARE. |
* PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
#include <sys/types.h> |
|
|
#include <assert.h> |
#include <assert.h> |
#include <ctype.h> |
#include <ctype.h> |
#include <stdarg.h> |
#include <stdarg.h> |
Line 298 const struct valids mdoc_valids[MDOC_MAX] = { |
|
Line 300 const struct valids mdoc_valids[MDOC_MAX] = { |
|
{ NULL, NULL }, /* Fr */ |
{ NULL, NULL }, /* Fr */ |
{ NULL, posts_notext }, /* Ud */ |
{ NULL, posts_notext }, /* Ud */ |
{ pres_lb, posts_lb }, /* Lb */ |
{ pres_lb, posts_lb }, /* Lb */ |
|
{ NULL, NULL }, /* Lb */ |
|
{ NULL, posts_pp }, /* Pp */ |
}; |
}; |
|
|
|
|
Line 638 check_args(struct mdoc *m, const struct mdoc_node *n) |
|
Line 642 check_args(struct mdoc *m, const struct mdoc_node *n) |
|
if (NULL == n->args) |
if (NULL == n->args) |
return(1); |
return(1); |
|
|
|
assert(n->args->argc); |
for (i = 0; i < (int)n->args->argc; i++) |
for (i = 0; i < (int)n->args->argc; i++) |
if ( ! check_argv(m, n, &n->args->argv[i])) |
if ( ! check_argv(m, n, &n->args->argv[i])) |
return(0); |
return(0); |
Line 684 check_text(struct mdoc *mdoc, int line, int pos, const |
|
Line 689 check_text(struct mdoc *mdoc, int line, int pos, const |
|
p += (int)c - 1; |
p += (int)c - 1; |
continue; |
continue; |
} |
} |
return(mdoc_perr(mdoc, line, pos, |
if ( ! (MDOC_IGN_ESCAPE & mdoc->pflags)) |
"invalid escape sequence: %s", p)); |
return(mdoc_perr(mdoc, line, pos, |
|
"invalid escape sequence")); |
|
if ( ! mdoc_pwarn(mdoc, line, pos, WARN_SYNTAX, |
|
"invalid escape sequence")) |
|
return(0); |
} |
} |
|
|
return(1); |
return(1); |
|
|
pre_an(PRE_ARGS) |
pre_an(PRE_ARGS) |
{ |
{ |
|
|
if (n->args && 1 >= n->args->argc) |
if (NULL == n->args || 1 == n->args->argc) |
return(1); |
return(1); |
return(mdoc_nerr(mdoc, n, "only one argument allowed")); |
return(mdoc_nerr(mdoc, n, "only one argument allowed")); |
} |
} |