version 1.24, 2009/07/07 09:52:08 |
version 1.31, 2009/07/12 20:50:08 |
Line 85 static int eerr_le2(POST_ARGS); |
|
Line 85 static int eerr_le2(POST_ARGS); |
|
static int eerr_eq1(POST_ARGS); |
static int eerr_eq1(POST_ARGS); |
static int eerr_ge1(POST_ARGS); |
static int eerr_ge1(POST_ARGS); |
static int ewarn_eq0(POST_ARGS); |
static int ewarn_eq0(POST_ARGS); |
static int ewarn_eq1(POST_ARGS); |
|
static int bwarn_ge1(POST_ARGS); |
static int bwarn_ge1(POST_ARGS); |
|
static int berr_ge1(POST_ARGS); |
static int hwarn_eq1(POST_ARGS); |
static int hwarn_eq1(POST_ARGS); |
static int ewarn_ge1(POST_ARGS); |
static int ewarn_ge1(POST_ARGS); |
static int ebool(POST_ARGS); |
static int ebool(POST_ARGS); |
|
|
static int post_an(POST_ARGS); |
static int post_an(POST_ARGS); |
static int post_args(POST_ARGS); |
static int post_args(POST_ARGS); |
static int post_at(POST_ARGS); |
static int post_at(POST_ARGS); |
Line 97 static int post_bf(POST_ARGS); |
|
Line 98 static int post_bf(POST_ARGS); |
|
static int post_bl(POST_ARGS); |
static int post_bl(POST_ARGS); |
static int post_bl_head(POST_ARGS); |
static int post_bl_head(POST_ARGS); |
static int post_it(POST_ARGS); |
static int post_it(POST_ARGS); |
|
static int post_lb(POST_ARGS); |
static int post_nm(POST_ARGS); |
static int post_nm(POST_ARGS); |
static int post_root(POST_ARGS); |
static int post_root(POST_ARGS); |
static int post_sh(POST_ARGS); |
static int post_sh(POST_ARGS); |
Line 129 static v_post posts_wline[] = { bwarn_ge1, herr_eq0, N |
|
Line 131 static v_post posts_wline[] = { bwarn_ge1, herr_eq0, N |
|
static v_post posts_sh[] = { herr_ge1, bwarn_ge1, post_sh, NULL }; |
static v_post posts_sh[] = { herr_ge1, bwarn_ge1, post_sh, NULL }; |
static v_post posts_bl[] = { bwarn_ge1, post_bl, NULL }; |
static v_post posts_bl[] = { bwarn_ge1, post_bl, NULL }; |
static v_post posts_it[] = { post_it, NULL }; |
static v_post posts_it[] = { post_it, NULL }; |
static v_post posts_in[] = { ewarn_eq1, NULL }; |
static v_post posts_in[] = { eerr_eq1, NULL }; |
static v_post posts_ss[] = { herr_ge1, NULL }; |
static v_post posts_ss[] = { herr_ge1, NULL }; |
|
static v_post posts_nd[] = { berr_ge1, NULL }; |
static v_post posts_pf[] = { eerr_eq1, NULL }; |
static v_post posts_pf[] = { eerr_eq1, NULL }; |
static v_post posts_lb[] = { eerr_eq1, NULL }; |
static v_post posts_lb[] = { eerr_eq1, post_lb, NULL }; |
static v_post posts_st[] = { eerr_eq1, post_st, NULL }; |
static v_post posts_st[] = { eerr_eq1, post_st, NULL }; |
static v_post posts_pp[] = { ewarn_eq0, NULL }; |
static v_post posts_pp[] = { ewarn_eq0, NULL }; |
static v_post posts_ex[] = { eerr_eq0, post_args, NULL }; |
static v_post posts_ex[] = { eerr_eq0, post_args, NULL }; |
Line 176 const struct valids mdoc_valids[MDOC_MAX] = { |
|
Line 179 const struct valids mdoc_valids[MDOC_MAX] = { |
|
{ NULL, posts_text }, /* Ic */ |
{ NULL, posts_text }, /* Ic */ |
{ NULL, posts_in }, /* In */ |
{ NULL, posts_in }, /* In */ |
{ NULL, NULL }, /* Li */ |
{ NULL, NULL }, /* Li */ |
{ NULL, posts_wtext }, /* Nd */ |
{ NULL, posts_nd }, /* Nd */ |
{ NULL, posts_nm }, /* Nm */ |
{ NULL, posts_nm }, /* Nm */ |
{ NULL, posts_wline }, /* Op */ |
{ NULL, posts_wline }, /* Op */ |
{ NULL, NULL }, /* Ot */ |
{ NULL, NULL }, /* Ot */ |
Line 408 CHECK_CHILD_DEFN(err, eq, ==) /* err_child_eq() */ |
|
Line 411 CHECK_CHILD_DEFN(err, eq, ==) /* err_child_eq() */ |
|
CHECK_CHILD_DEFN(err, lt, <) /* err_child_lt() */ |
CHECK_CHILD_DEFN(err, lt, <) /* err_child_lt() */ |
CHECK_CHILD_DEFN(warn, lt, <) /* warn_child_lt() */ |
CHECK_CHILD_DEFN(warn, lt, <) /* warn_child_lt() */ |
CHECK_BODY_DEFN(ge1, warn, warn_child_gt, 0) /* bwarn_ge1() */ |
CHECK_BODY_DEFN(ge1, warn, warn_child_gt, 0) /* bwarn_ge1() */ |
CHECK_ELEM_DEFN(eq1, warn, warn_child_eq, 1) /* ewarn_eq1() */ |
CHECK_BODY_DEFN(ge1, err, err_child_gt, 0) /* berr_ge1() */ |
CHECK_ELEM_DEFN(eq0, warn, warn_child_eq, 0) /* ewarn_eq0() */ |
CHECK_ELEM_DEFN(eq0, warn, warn_child_eq, 0) /* ewarn_eq0() */ |
CHECK_ELEM_DEFN(ge1, warn, warn_child_gt, 0) /* ewarn_gt1() */ |
CHECK_ELEM_DEFN(ge1, warn, warn_child_gt, 0) /* ewarn_gt1() */ |
CHECK_ELEM_DEFN(eq1, err, err_child_eq, 1) /* eerr_eq1() */ |
CHECK_ELEM_DEFN(eq1, err, err_child_eq, 1) /* eerr_eq1() */ |
Line 874 post_bf(POST_ARGS) |
|
Line 877 post_bf(POST_ARGS) |
|
|
|
|
|
static int |
static int |
|
post_lb(POST_ARGS) |
|
{ |
|
|
|
if (mdoc_a2lib(mdoc->last->child->string)) |
|
return(1); |
|
return(mdoc_nwarn(mdoc, mdoc->last, ELIB)); |
|
} |
|
|
|
|
|
static int |
post_nm(POST_ARGS) |
post_nm(POST_ARGS) |
{ |
{ |
|
|
Line 1130 post_st(POST_ARGS) |
|
Line 1143 post_st(POST_ARGS) |
|
|
|
if (mdoc_a2st(mdoc->last->child->string)) |
if (mdoc_a2st(mdoc->last->child->string)) |
return(1); |
return(1); |
return(mdoc_nwarn(mdoc, mdoc->last, EBADSTAND)); |
return(mdoc_nerr(mdoc, mdoc->last, EBADSTAND)); |
} |
} |
|
|
|
|
Line 1152 post_sh_body(POST_ARGS) |
|
Line 1165 post_sh_body(POST_ARGS) |
|
{ |
{ |
struct mdoc_node *n; |
struct mdoc_node *n; |
|
|
if (SEC_NAME != mdoc->lastnamed) |
if (SEC_NAME != mdoc->lastsec) |
return(1); |
return(1); |
|
|
/* |
/* |
Line 1173 post_sh_body(POST_ARGS) |
|
Line 1186 post_sh_body(POST_ARGS) |
|
return(0); |
return(0); |
} |
} |
|
|
if (MDOC_ELEM == n->type && MDOC_Nd == n->tok) |
if (MDOC_BLOCK == n->type && MDOC_Nd == n->tok) |
return(1); |
return(1); |
return(mdoc_nwarn(mdoc, mdoc->last, ENAMESECINC)); |
return(mdoc_nwarn(mdoc, mdoc->last, ENAMESECINC)); |
} |
} |
Line 1219 post_sh_head(POST_ARGS) |
|
Line 1232 post_sh_head(POST_ARGS) |
|
if (SEC_CUSTOM == sec) |
if (SEC_CUSTOM == sec) |
return(1); |
return(1); |
if (sec == mdoc->lastnamed) |
if (sec == mdoc->lastnamed) |
return(mdoc_nwarn(mdoc, mdoc->last, ESECREP)); |
if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECREP)) |
|
return(0); |
if (sec < mdoc->lastnamed) |
if (sec < mdoc->lastnamed) |
return(mdoc_nwarn(mdoc, mdoc->last, ESECOOO)); |
if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECOOO)) |
|
return(0); |
|
|
/* |
/* |
* Check particular section/manual conventions. LIBRARY can |
* Check particular section/manual conventions. LIBRARY can |