=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -p -r1.62 -r1.63 --- mandoc/mdoc_macro.c 2010/05/14 12:55:22 1.62 +++ mandoc/mdoc_macro.c 2010/05/14 13:31:20 1.63 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.62 2010/05/14 12:55:22 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.63 2010/05/14 13:31:20 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -888,7 +888,7 @@ in_line(MACRO_PROT_ARGS) static int blk_full(MACRO_PROT_ARGS) { - int la; + int la, nl; struct mdoc_arg *arg; struct mdoc_node *head; /* save of head macro */ struct mdoc_node *body; /* save of body macro */ @@ -900,6 +900,8 @@ blk_full(MACRO_PROT_ARGS) enum margverr av; char *p; + nl = MDOC_NEWLINE & m->flags; + /* Close out prior implicit scope. */ if ( ! (MDOC_EXPLICIT & mdoc_macros[tok].flags)) { @@ -1033,7 +1035,7 @@ blk_full(MACRO_PROT_ARGS) head = m->last; } - if (1 == ppos && ! append_delims(m, line, pos, buf)) + if (nl && ! append_delims(m, line, pos, buf)) return(0); /* If we've already opened our body, exit now. */ @@ -1073,7 +1075,7 @@ blk_full(MACRO_PROT_ARGS) static int blk_part_imp(MACRO_PROT_ARGS) { - int la; + int la, nl; enum mdoct ntok; enum margserr ac; char *p; @@ -1081,6 +1083,8 @@ blk_part_imp(MACRO_PROT_ARGS) struct mdoc_node *body; /* saved body context */ struct mdoc_node *n; + nl = MDOC_NEWLINE & m->flags; + /* * A macro that spans to the end of the line. This is generally * (but not necessarily) called as the first macro. The block @@ -1156,6 +1160,8 @@ blk_part_imp(MACRO_PROT_ARGS) * been closed by another macro (like `Oc' closing `Op'). This * is ugly behaviour nodding its head to OpenBSD's overwhelming * crufty use of `Op' breakage. + * + * FIXME - this should be ifdef'd OpenBSD? */ for (n = m->last; n; n = n->parent) if (body == n) @@ -1169,7 +1175,7 @@ blk_part_imp(MACRO_PROT_ARGS) /* Standard appending of delimiters. */ - if (1 == ppos && ! append_delims(m, line, pos, buf)) + if (nl && ! append_delims(m, line, pos, buf)) return(0); /* Rewind scope, if applicable. */