=================================================================== RCS file: /cvs/mandoc/mdoc_validate.c,v retrieving revision 1.196 retrieving revision 1.199 diff -u -p -r1.196 -r1.199 --- mandoc/mdoc_validate.c 2013/10/06 22:46:15 1.196 +++ mandoc/mdoc_validate.c 2014/01/06 00:53:33 1.199 @@ -1,7 +1,8 @@ -/* $Id: mdoc_validate.c,v 1.196 2013/10/06 22:46:15 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.199 2014/01/06 00:53:33 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze + * Copyright (c) 2010 Joerg Sonnenberger * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -1674,10 +1675,16 @@ ebool(struct mdoc *mdoc) assert(MDOC_TEXT == mdoc->last->child->type); - if (0 == strcmp(mdoc->last->child->string, "on")) + if (0 == strcmp(mdoc->last->child->string, "on")) { + if (MDOC_Sm == mdoc->last->tok) + mdoc->flags &= ~MDOC_SMOFF; return(1); - if (0 == strcmp(mdoc->last->child->string, "off")) + } + if (0 == strcmp(mdoc->last->child->string, "off")) { + if (MDOC_Sm == mdoc->last->tok) + mdoc->flags |= MDOC_SMOFF; return(1); + } mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_BADBOOL); return(1); @@ -1985,10 +1992,10 @@ post_sh_head(POST_ARGS) /* The SYNOPSIS gets special attention in other areas. */ if (SEC_SYNOPSIS == sec) { - roff_setreg(mdoc->roff, "nS", 1); + roff_setreg(mdoc->roff, "nS", 1, '='); mdoc->flags |= MDOC_SYNOPSIS; } else { - roff_setreg(mdoc->roff, "nS", 0); + roff_setreg(mdoc->roff, "nS", 0, '='); mdoc->flags &= ~MDOC_SYNOPSIS; }