=================================================================== RCS file: /cvs/mandoc/mdoc_validate.c,v retrieving revision 1.191 retrieving revision 1.194 diff -u -p -r1.191 -r1.194 --- mandoc/mdoc_validate.c 2012/11/17 00:26:33 1.191 +++ mandoc/mdoc_validate.c 2013/10/05 22:08:12 1.194 @@ -1,7 +1,7 @@ -/* $Id: mdoc_validate.c,v 1.191 2012/11/17 00:26:33 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.194 2013/10/05 22:08:12 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons - * Copyright (c) 2010, 2011, 2012 Ingo Schwarze + * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -319,9 +319,9 @@ static const enum mdoct rsord[RSORD_MAX] = { MDOC__U, MDOC__P, MDOC__Q, + MDOC__C, MDOC__D, - MDOC__O, - MDOC__C + MDOC__O }; static const char * const secnames[SEC__MAX] = { @@ -888,8 +888,6 @@ pre_sh(PRE_ARGS) if (MDOC_BLOCK != n->type) return(1); - - roff_regunset(mdoc->roff, REG_nS); return(check_parent(mdoc, n, MDOC_MAX, MDOC_ROOT)); } @@ -1905,10 +1903,13 @@ post_sh_head(POST_ARGS) /* The SYNOPSIS gets special attention in other areas. */ - if (SEC_SYNOPSIS == sec) + if (SEC_SYNOPSIS == sec) { + roff_setreg(mdoc->roff, "nS", 1); mdoc->flags |= MDOC_SYNOPSIS; - else + } else { + roff_setreg(mdoc->roff, "nS", 0); mdoc->flags &= ~MDOC_SYNOPSIS; + } /* Mark our last section. */ @@ -1964,7 +1965,8 @@ post_sh_head(POST_ARGS) break; if (*mdoc->meta.msec == '9') break; - mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_SECMSEC); + mandoc_msg(MANDOCERR_SECMSEC, mdoc->parse, + mdoc->last->line, mdoc->last->pos, buf); break; default: break;