version 1.41, 2010/05/17 22:11:42 |
version 1.43, 2010/06/09 19:22:56 |
|
|
#include "libman.h" |
#include "libman.h" |
#include "libmandoc.h" |
#include "libmandoc.h" |
|
|
#define CHKARGS struct man *m, const struct man_node *n |
#define CHKARGS struct man *m, struct man_node *n |
|
|
typedef int (*v_check)(CHKARGS); |
typedef int (*v_check)(CHKARGS); |
|
|
Line 101 static const struct man_valid man_valids[MAN_MAX] = { |
|
Line 101 static const struct man_valid man_valids[MAN_MAX] = { |
|
|
|
|
|
int |
int |
man_valid_pre(struct man *m, const struct man_node *n) |
man_valid_pre(struct man *m, struct man_node *n) |
{ |
{ |
v_check *cp; |
v_check *cp; |
|
|
Line 204 check_title(CHKARGS) |
|
Line 204 check_title(CHKARGS) |
|
static int |
static int |
check_text(CHKARGS) |
check_text(CHKARGS) |
{ |
{ |
const char *p; |
char *p; |
int pos, c; |
int pos, c; |
|
|
assert(n->string); |
assert(n->string); |
Line 223 check_text(CHKARGS) |
|
Line 223 check_text(CHKARGS) |
|
return(c); |
return(c); |
} |
} |
|
|
if ('\t' == *p || isprint((u_char)*p)) |
if ('\t' == *p || isprint((u_char)*p) || ASCII_HYPH == *p) |
continue; |
continue; |
if ( ! man_pmsg(m, n->line, pos, MANDOCERR_BADCHAR)) |
if ( ! man_pmsg(m, n->line, pos, MANDOCERR_BADCHAR)) |
return(0); |
return(0); |