From: erg Date: Thu, 3 Mar 2011 01:04:43 +0000 (+0000) Subject: Add function to reset error count X-Git-Tag: LAST_LIBGRAPH~32^2~968 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8adc5c70ee7f440355bbfce17da21d7c16416112;p=graphviz Add function to reset error count --- diff --git a/lib/graph/graph.h b/lib/graph/graph.h index 0e656ccb3..b0ef9f152 100644 --- a/lib/graph/graph.h +++ b/lib/graph/graph.h @@ -170,6 +170,7 @@ extern "C" { extern int agputc(int c, FILE *fp); extern int agwrite(Agraph_t *, FILE *); extern int agerrors(void); + extern int agreseterrors(void); extern Agraph_t *agprotograph(void); extern Agnode_t *agprotonode(Agraph_t *); extern Agedge_t *agprotoedge(Agraph_t *); diff --git a/lib/graph/lexer.c b/lib/graph/lexer.c index bab94b3f4..d2f053ee4 100644 --- a/lib/graph/lexer.c +++ b/lib/graph/lexer.c @@ -504,6 +504,13 @@ int agerrors(void) return MAX(agmaxerr, AG.syntax_errors); } +int agreseterrors(void) +{ + int rc = MAX(agmaxerr, AG.syntax_errors); + agmaxerr = 0; + return rc; +} + char *aglasterr() { long endpos;