=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_macro.c,v retrieving revision 1.96 retrieving revision 1.97 diff -c -r1.96 -r1.97 *** src/usr.bin/mandoc/man_macro.c 2018/12/14 01:17:46 1.96 --- src/usr.bin/mandoc/man_macro.c 2018/12/14 05:17:45 1.97 *************** *** 1,4 **** ! /* $OpenBSD: man_macro.c,v 1.96 2018/12/14 01:17:46 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: man_macro.c,v 1.97 2018/12/14 05:17:45 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze *************** *** 104,111 **** if (man->flags & (MAN_BLINE | MAN_ELINE) && man_macro(n->tok)->flags & (MAN_BSCOPED | MAN_NSCOPED)) { ! mandoc_vmsg(MANDOCERR_BLK_LINE, ! man->parse, n->line, n->pos, "EOF breaks %s", roff_name[n->tok]); if (man->flags & MAN_ELINE) man->flags &= ~MAN_ELINE; --- 104,111 ---- if (man->flags & (MAN_BLINE | MAN_ELINE) && man_macro(n->tok)->flags & (MAN_BSCOPED | MAN_NSCOPED)) { ! mandoc_msg(MANDOCERR_BLK_LINE, ! n->line, n->pos, "EOF breaks %s", roff_name[n->tok]); if (man->flags & MAN_ELINE) man->flags &= ~MAN_ELINE; *************** *** 122,128 **** if (n->type == ROFFT_BLOCK && man_macro(n->tok)->fp == blk_exp) mandoc_msg(MANDOCERR_BLK_NOEND, ! man->parse, n->line, n->pos, roff_name[n->tok]); } --- 122,128 ---- if (n->type == ROFFT_BLOCK && man_macro(n->tok)->fp == blk_exp) mandoc_msg(MANDOCERR_BLK_NOEND, ! n->line, n->pos, "%s", roff_name[n->tok]); } *************** *** 214,226 **** nrew++; target = strtol(p, &p, 10); if (*p != '\0') ! mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse, ! line, p - buf, "RE ... %s", p); if (target == 0) target = 1; nrew -= target; if (nrew < 1) { ! mandoc_vmsg(MANDOCERR_RE_NOTOPEN, man->parse, line, ppos, "RE %d", target); return; } --- 214,226 ---- nrew++; target = strtol(p, &p, 10); if (*p != '\0') ! mandoc_msg(MANDOCERR_ARG_EXCESS, line, ! (int)(p - buf), "RE ... %s", p); if (target == 0) target = 1; nrew -= target; if (nrew < 1) { ! mandoc_msg(MANDOCERR_RE_NOTOPEN, line, ppos, "RE %d", target); return; } *************** *** 243,250 **** break; if (nn == NULL) { ! mandoc_msg(MANDOCERR_BLK_NOTOPEN, man->parse, ! line, ppos, roff_name[tok]); rew_scope(man, MAN_PP); if (tok == MAN_RE) { roff_elem_alloc(man, line, ppos, ROFF_br); --- 243,250 ---- break; if (nn == NULL) { ! mandoc_msg(MANDOCERR_BLK_NOTOPEN, ! line, ppos, "%s", roff_name[tok]); rew_scope(man, MAN_PP); if (tok == MAN_RE) { roff_elem_alloc(man, line, ppos, ROFF_br); *************** *** 313,320 **** } if (buf[*pos] != '\0') ! mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse, line, ! *pos, "%s ... %s", roff_name[tok], buf + *pos); man_unscope(man, head); roff_body_alloc(man, line, ppos, tok); --- 313,320 ---- } if (buf[*pos] != '\0') ! mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos, ! "%s ... %s", roff_name[tok], buf + *pos); man_unscope(man, head); roff_body_alloc(man, line, ppos, tok); *************** *** 378,392 **** for (;;) { if (buf[*pos] != '\0' && (tok == MAN_fi || tok == MAN_nf)) { ! mandoc_vmsg(MANDOCERR_ARG_SKIP, ! man->parse, line, *pos, "%s %s", ! roff_name[tok], buf + *pos); break; } if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) { ! mandoc_vmsg(MANDOCERR_ARG_EXCESS, ! man->parse, line, *pos, "%s ... %s", ! roff_name[tok], buf + *pos); break; } la = *pos; --- 378,390 ---- for (;;) { if (buf[*pos] != '\0' && (tok == MAN_fi || tok == MAN_nf)) { ! mandoc_msg(MANDOCERR_ARG_SKIP, line, *pos, ! "%s %s", roff_name[tok], buf + *pos); break; } if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) { ! mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos, ! "%s ... %s", roff_name[tok], buf + *pos); break; } la = *pos;