=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_macro.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- src/usr.bin/mandoc/man_macro.c 2010/03/02 01:00:39 1.10 +++ src/usr.bin/mandoc/man_macro.c 2010/03/25 23:23:01 1.11 @@ -1,4 +1,4 @@ -/* $Id: man_macro.c,v 1.10 2010/03/02 01:00:39 schwarze Exp $ */ +/* $Id: man_macro.c,v 1.11 2010/03/25 23:23:01 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -36,7 +36,7 @@ const struct man_node *); const struct man_macro __man_macros[MAN_MAX] = { - { in_line_eoln, 0 }, /* br */ + { in_line_eoln, MAN_NSCOPED }, /* br */ { in_line_eoln, 0 }, /* TH */ { blk_imp, MAN_SCOPED }, /* SH */ { blk_imp, MAN_SCOPED }, /* SS */ @@ -57,9 +57,9 @@ { in_line_eoln, MAN_SCOPED }, /* I */ { in_line_eoln, 0 }, /* IR */ { in_line_eoln, 0 }, /* RI */ - { in_line_eoln, 0 }, /* na */ + { in_line_eoln, MAN_NSCOPED }, /* na */ { in_line_eoln, 0 }, /* i */ - { in_line_eoln, 0 }, /* sp */ + { in_line_eoln, MAN_NSCOPED }, /* sp */ { in_line_eoln, 0 }, /* nf */ { in_line_eoln, 0 }, /* fi */ { in_line_eoln, 0 }, /* r */ @@ -323,14 +323,29 @@ return(0); } + /* + * If no arguments are specified and this is MAN_SCOPED (i.e., + * next-line scoped), then set our mode to indicate that we're + * waiting for terms to load into our context. + */ + if (n == m->last && MAN_SCOPED & man_macros[tok].flags) { + assert( ! (MAN_NSCOPED & man_macros[tok].flags)); m->flags |= MAN_ELINE; return(1); } + /* Set ignorable context, if applicable. */ + + if (MAN_NSCOPED & man_macros[tok].flags) { + assert( ! (MAN_SCOPED & man_macros[tok].flags)); + m->flags |= MAN_ILINE; + } + /* - * Note that when TH is pruned, we'll be back at the root, so - * make sure that we don't clobber as its sibling. + * Rewind our element scope. Note that when TH is pruned, we'll + * be back at the root, so make sure that we don't clobber as + * its sibling. */ for ( ; m->last; m->last = m->last->parent) {