=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_macro.c,v retrieving revision 1.111 retrieving revision 1.112 diff -c -r1.111 -r1.112 *** src/usr.bin/mandoc/mdoc_macro.c 2014/11/30 02:31:32 1.111 --- src/usr.bin/mandoc/mdoc_macro.c 2014/11/30 05:28:00 1.112 *************** *** 1,4 **** ! /* $OpenBSD: mdoc_macro.c,v 1.111 2014/11/30 02:31:32 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: mdoc_macro.c,v 1.112 2014/11/30 05:28:00 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze *************** *** 1394,1400 **** char *p; enum mdoct ntok; ! nl = MDOC_NEWLINE & mdoc->flags; /* * A line macro that has a fixed number of arguments (maxargs). --- 1394,1400 ---- char *p; enum mdoct ntok; ! nl = mdoc->flags & MDOC_NEWLINE; /* * A line macro that has a fixed number of arguments (maxargs). *************** *** 1426,1436 **** mdoc_argv(mdoc, line, tok, &arg, pos, buf); ! for (flushed = j = 0; ; ) { la = *pos; ac = mdoc_args(mdoc, line, pos, buf, tok, &p); ! if (ac == ARGS_PUNCT || ac == ARGS_EOLN) break; if ( ! (mdoc_macros[tok].flags & MDOC_IGNDELIM) && ac != ARGS_QWORD && j == 0 && --- 1426,1443 ---- mdoc_argv(mdoc, line, tok, &arg, pos, buf); ! p = NULL; ! flushed = j = 0; ! for (;;) { la = *pos; ac = mdoc_args(mdoc, line, pos, buf, tok, &p); ! if (ac == ARGS_PUNCT || ac == ARGS_EOLN) { ! if (j < 2 && tok == MDOC_Pf) ! mandoc_vmsg(MANDOCERR_PF_SKIP, ! mdoc->parse, line, ppos, "Pf %s", ! p == NULL ? "at eol" : p); break; + } if ( ! (mdoc_macros[tok].flags & MDOC_IGNDELIM) && ac != ARGS_QWORD && j == 0 && *************** *** 1445,1452 **** flushed = 1; } ! ntok = ac == ARGS_QWORD ? MDOC_MAX : ! lookup(mdoc, tok, line, la, p); if (ntok != MDOC_MAX) { if ( ! flushed) --- 1452,1459 ---- flushed = 1; } ! ntok = (ac == ARGS_QWORD || (tok == MDOC_Pf && j == 0)) ? ! MDOC_MAX : lookup(mdoc, tok, line, la, p); if (ntok != MDOC_MAX) { if ( ! flushed) *************** *** 1469,1476 **** j++; } ! if (j == 0) mdoc_elem_alloc(mdoc, line, ppos, tok, arg); if ( ! flushed) rew_elem(mdoc, tok); if (nl) --- 1476,1486 ---- j++; } ! if (j == 0) { mdoc_elem_alloc(mdoc, line, ppos, tok, arg); + if (ac == ARGS_PUNCT && tok == MDOC_Pf) + append_delims(mdoc, line, pos, buf); + } if ( ! flushed) rew_elem(mdoc, tok); if (nl)