=================================================================== RCS file: /cvs/mandoc/Attic/macro.c,v retrieving revision 1.75 retrieving revision 1.77 diff -u -p -r1.75 -r1.77 --- mandoc/Attic/macro.c 2009/03/21 09:30:52 1.75 +++ mandoc/Attic/macro.c 2009/03/22 19:01:11 1.77 @@ -1,4 +1,4 @@ -/* $Id: macro.c,v 1.75 2009/03/21 09:30:52 kristaps Exp $ */ +/* $Id: macro.c,v 1.77 2009/03/22 19:01:11 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -33,6 +33,7 @@ /* FIXME: .Fl, .Ar, .Cd handling of `|'. */ enum mwarn { + WIMPBRK, WMACPARM, WOBS }; @@ -198,6 +199,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { obsolete, 0 }, /* Es */ { obsolete, 0 }, /* En */ { in_line_argn, MDOC_CALLABLE | MDOC_PARSED }, /* Dx */ + { in_line_eoln, 0 }, /* %Q */ }; const struct mdoc_macro * const mdoc_macros = __mdoc_macros; @@ -235,6 +237,9 @@ pwarn(struct mdoc *mdoc, int line, int pos, enum mwarn p = NULL; switch (type) { + case (WIMPBRK): + p = "crufty end-of-line scope violation"; + break; case (WMACPARM): p = "macro-like parameter"; break; @@ -1056,6 +1061,9 @@ blk_part_imp(MACRO_PROT_ARGS) for (n = mdoc->last; n; n = n->parent) if (body == n) break; + + if (NULL == n && ! pwarn(mdoc, body->line, body->pos, WIMPBRK)) + return(0); if (n && ! rew_last(mdoc, body)) return(0);