=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_validate.c,v retrieving revision 1.16 retrieving revision 1.17 diff -c -r1.16 -r1.17 *** src/usr.bin/mandoc/mdoc_validate.c 2009/07/12 18:35:57 1.16 --- src/usr.bin/mandoc/mdoc_validate.c 2009/07/12 19:05:52 1.17 *************** *** 1,4 **** ! /* $Id: mdoc_validate.c,v 1.16 2009/07/12 18:35:57 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: mdoc_validate.c,v 1.17 2009/07/12 19:05:52 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 534,540 **** int want, const char *v, int has) { ! return(mdoc_err(m, "requires %s %s %d (has %d)", v, k, want, has)); } --- 534,540 ---- int want, const char *v, int has) { ! return(mdoc_verr(m, m->last->line, m->last->pos, "requires %s %s %d (has %d)", v, k, want, has)); } *************** *** 740,746 **** (t == n->parent->type)) return(1); ! return(mdoc_nerr(mdoc, n, "require parent %s", MDOC_ROOT == t ? "" : mdoc_macronames[tok])); } --- 740,746 ---- (t == n->parent->type)) return(1); ! return(mdoc_verr(mdoc, n->line, n->pos, "require parent %s", MDOC_ROOT == t ? "" : mdoc_macronames[tok])); } *************** *** 930,936 **** if (NULL == n->args || 1 == n->args->argc) return(1); ! return(mdoc_nerr(mdoc, n, "only one argument allowed")); } --- 930,937 ---- if (NULL == n->args || 1 == n->args->argc) return(1); ! return(mdoc_verr(mdoc, n->line, n->pos, ! "only one argument allowed")); } *************** *** 1203,1210 **** i++; if (i == cols) break; ! return(mdoc_err(mdoc, "column mismatch (have " ! "%d, want %d)", i, cols)); default: break; } --- 1204,1212 ---- i++; if (i == cols) break; ! return(mdoc_verr(mdoc, mdoc->last->line, mdoc->last->pos, ! "column mismatch (have %d, want %d)", ! i, cols)); default: break; } *************** *** 1253,1259 **** if (MDOC_BLOCK == n->type) if (MDOC_It == n->tok) continue; ! return(mdoc_nerr(mdoc, n, "bad child of parent %s", mdoc_macronames[mdoc->last->tok])); } --- 1255,1262 ---- if (MDOC_BLOCK == n->type) if (MDOC_It == n->tok) continue; ! return(mdoc_verr(mdoc, n->line, n->pos, ! "bad child of parent %s", mdoc_macronames[mdoc->last->tok])); }