version 1.248, 2014/09/11 23:53:30 |
version 1.251, 2014/10/11 21:34:04 |
Line 100 static int post_en(POST_ARGS); |
|
Line 100 static int post_en(POST_ARGS); |
|
static int post_es(POST_ARGS); |
static int post_es(POST_ARGS); |
static int post_eoln(POST_ARGS); |
static int post_eoln(POST_ARGS); |
static int post_ex(POST_ARGS); |
static int post_ex(POST_ARGS); |
|
static int post_fa(POST_ARGS); |
|
static int post_fn(POST_ARGS); |
|
static int post_fname(POST_ARGS); |
static int post_fo(POST_ARGS); |
static int post_fo(POST_ARGS); |
static int post_hyph(POST_ARGS); |
static int post_hyph(POST_ARGS); |
static int post_hyphtext(POST_ARGS); |
static int post_hyphtext(POST_ARGS); |
Line 157 static const struct valids mdoc_valids[MDOC_MAX] = { |
|
Line 160 static const struct valids mdoc_valids[MDOC_MAX] = { |
|
{ NULL, NULL }, /* Er */ |
{ NULL, NULL }, /* Er */ |
{ NULL, NULL }, /* Ev */ |
{ NULL, NULL }, /* Ev */ |
{ pre_std, post_ex }, /* Ex */ |
{ pre_std, post_ex }, /* Ex */ |
{ NULL, NULL }, /* Fa */ |
{ NULL, post_fa }, /* Fa */ |
{ NULL, ewarn_ge1 }, /* Fd */ |
{ NULL, ewarn_ge1 }, /* Fd */ |
{ NULL, NULL }, /* Fl */ |
{ NULL, NULL }, /* Fl */ |
{ NULL, NULL }, /* Fn */ |
{ NULL, post_fn }, /* Fn */ |
{ NULL, NULL }, /* Ft */ |
{ NULL, NULL }, /* Ft */ |
{ NULL, NULL }, /* Ic */ |
{ NULL, NULL }, /* Ic */ |
{ NULL, ewarn_eq1 }, /* In */ |
{ NULL, ewarn_eq1 }, /* In */ |
Line 999 post_eoln(POST_ARGS) |
|
Line 1002 post_eoln(POST_ARGS) |
|
} |
} |
|
|
static int |
static int |
|
post_fname(POST_ARGS) |
|
{ |
|
const struct mdoc_node *n; |
|
size_t pos; |
|
|
|
n = mdoc->last->child; |
|
pos = strcspn(n->string, "()"); |
|
if (n->string[pos] != '\0') |
|
mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse, |
|
n->line, n->pos + pos, n->string); |
|
return(1); |
|
} |
|
|
|
static int |
|
post_fn(POST_ARGS) |
|
{ |
|
|
|
post_fname(mdoc); |
|
post_fa(mdoc); |
|
return(1); |
|
} |
|
|
|
static int |
post_fo(POST_ARGS) |
post_fo(POST_ARGS) |
{ |
{ |
|
|
hwarn_eq1(mdoc); |
hwarn_eq1(mdoc); |
bwarn_ge1(mdoc); |
bwarn_ge1(mdoc); |
|
if (mdoc->last->type == MDOC_HEAD && mdoc->last->nchild) |
|
post_fname(mdoc); |
|
return(1); |
|
} |
|
|
|
static int |
|
post_fa(POST_ARGS) |
|
{ |
|
const struct mdoc_node *n; |
|
const char *cp; |
|
|
|
for (n = mdoc->last->child; n != NULL; n = n->next) { |
|
for (cp = n->string; *cp != '\0'; cp++) { |
|
/* Ignore callbacks and alterations. */ |
|
if (*cp == '(' || *cp == '{') |
|
break; |
|
if (*cp != ',') |
|
continue; |
|
mandoc_msg(MANDOCERR_FA_COMMA, mdoc->parse, |
|
n->line, n->pos + (cp - n->string), |
|
n->string); |
|
break; |
|
} |
|
} |
return(1); |
return(1); |
} |
} |
|
|