=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/roff.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- src/usr.bin/mandoc/roff.c 2014/07/07 11:34:41 1.93 +++ src/usr.bin/mandoc/roff.c 2014/07/07 21:35:42 1.94 @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.93 2014/07/07 11:34:41 schwarze Exp $ */ +/* $Id: roff.c,v 1.94 2014/07/07 21:35:42 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -782,18 +782,19 @@ { if (r->last) - mandoc_msg(MANDOCERR_SCOPEEXIT, r->parse, - r->last->line, r->last->col, NULL); + mandoc_msg(MANDOCERR_BLK_NOEND, r->parse, + r->last->line, r->last->col, + roffs[r->last->tok].name); if (r->eqn) { - mandoc_msg(MANDOCERR_SCOPEEXIT, r->parse, - r->eqn->eqn.ln, r->eqn->eqn.pos, NULL); + mandoc_msg(MANDOCERR_BLK_NOEND, r->parse, + r->eqn->eqn.ln, r->eqn->eqn.pos, "EQ"); eqn_end(&r->eqn); } if (r->tbl) { - mandoc_msg(MANDOCERR_SCOPEEXIT, r->parse, - r->tbl->line, r->tbl->pos, NULL); + mandoc_msg(MANDOCERR_BLK_NOEND, r->parse, + r->tbl->line, r->tbl->pos, "TS"); tbl_end(&r->tbl); } } @@ -837,7 +838,8 @@ */ if (NULL == r->last) { - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, + ln, ppos, ".."); return(ROFF_IGN); } @@ -855,7 +857,8 @@ case ROFF_ig: break; default: - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, + ln, ppos, ".."); return(ROFF_IGN); } @@ -885,7 +888,8 @@ { if (NULL == r->last) { - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, + ln, ppos, "\\}"); return; } @@ -897,12 +901,14 @@ case ROFF_if: break; default: - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, + ln, ppos, "\\}"); return; } if (r->last->endspan > -1) { - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, + ln, ppos, "\\}"); return; } @@ -1789,7 +1795,8 @@ { if (NULL == r->tbl) - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, + ln, ppos, "TE"); else tbl_end(&r->tbl); @@ -1801,7 +1808,8 @@ { if (NULL == r->tbl) - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, + ln, ppos, "T&"); else tbl_restart(ppos, ln, r->tbl); @@ -1852,7 +1860,7 @@ roff_EN(ROFF_ARGS) { - mandoc_msg(MANDOCERR_NOSCOPE, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse, ln, ppos, "EN"); return(ROFF_IGN); } @@ -1862,7 +1870,8 @@ struct tbl_node *tbl; if (r->tbl) { - mandoc_msg(MANDOCERR_SCOPEBROKEN, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_BLK_BROKEN, r->parse, + ln, ppos, "TS breaks TS"); tbl_end(&r->tbl); }