=================================================================== RCS file: /cvs/mandoc/mdoc_validate.c,v retrieving revision 1.100 retrieving revision 1.103 diff -u -p -r1.100 -r1.103 --- mandoc/mdoc_validate.c 2010/06/27 16:36:22 1.100 +++ mandoc/mdoc_validate.c 2010/07/01 21:44:47 1.103 @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.100 2010/06/27 16:36:22 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.103 2010/07/01 21:44:47 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -107,7 +107,7 @@ static int pre_ss(PRE_ARGS); static v_post posts_an[] = { post_an, NULL }; static v_post posts_at[] = { post_at, NULL }; -static v_post posts_bd[] = { hwarn_eq0, bwarn_ge1, NULL }; +static v_post posts_bd_bk[] = { hwarn_eq0, bwarn_ge1, NULL }; static v_post posts_bf[] = { hwarn_le1, post_bf, NULL }; static v_post posts_bl[] = { bwarn_ge1, post_bl, NULL }; static v_post posts_bool[] = { eerr_eq1, ebool, NULL }; @@ -154,7 +154,7 @@ const struct valids mdoc_valids[MDOC_MAX] = { { NULL, posts_notext }, /* Pp */ { pres_d1, posts_wline }, /* D1 */ { pres_d1, posts_wline }, /* Dl */ - { pres_bd, posts_bd }, /* Bd */ + { pres_bd, posts_bd_bk }, /* Bd */ { NULL, NULL }, /* Ed */ { pres_bl, posts_bl }, /* Bl */ { NULL, NULL }, /* El */ @@ -245,7 +245,7 @@ const struct valids mdoc_valids[MDOC_MAX] = { { NULL, NULL }, /* Fc */ { NULL, NULL }, /* Oo */ { NULL, NULL }, /* Oc */ - { NULL, posts_wline }, /* Bk */ + { NULL, posts_bd_bk }, /* Bk */ { NULL, NULL }, /* Ek */ { NULL, posts_eoln }, /* Bt */ { NULL, NULL }, /* Hf */ @@ -458,6 +458,11 @@ check_text(struct mdoc *mdoc, int line, int pos, char { int c; + /* + * FIXME: we absolutely cannot let \b get through or it will + * destroy some assumptions in terms of format. + */ + for ( ; *p; p++, pos++) { if ('\t' == *p) { if ( ! (MDOC_LITERAL & mdoc->flags)) @@ -538,6 +543,8 @@ pre_bl(PRE_ARGS) if (MDOC_BLOCK != n->type) { assert(n->parent); + if (ENDBODY_NOT != n->end) + return(1); assert(MDOC_BLOCK == n->parent->type); assert(MDOC_Bl == n->parent->tok); assert(LIST__NONE != n->parent->data.Bl.type);