[GRASS-SVN] r40522 - grass/trunk/raster/r.mapcalc
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jan 17 21:16:48 EST 2010
Author: glynn
Date: 2010-01-17 21:16:47 -0500 (Sun, 17 Jan 2010)
New Revision: 40522
Modified:
grass/trunk/raster/r.mapcalc/evaluate.c
Log:
Use G_add_error_handler() instead of G_set_error_routine()
Modified: grass/trunk/raster/r.mapcalc/evaluate.c
===================================================================
--- grass/trunk/raster/r.mapcalc/evaluate.c 2010-01-18 02:13:51 UTC (rev 40521)
+++ grass/trunk/raster/r.mapcalc/evaluate.c 2010-01-18 02:16:47 UTC (rev 40522)
@@ -241,13 +241,10 @@
/****************************************************************************/
-static int error_handler(const char *msg, int fatal)
+static void error_handler(void *p)
{
expr_list *l;
- if (!fatal)
- return 0;
-
for (l = exprs; l; l = l->next) {
expression *e = l->exp;
int fd = e->data.bind.fd;
@@ -255,10 +252,6 @@
if (fd >= 0)
unopen_output_map(fd);
}
-
- G_unset_error_routine();
- G_fatal_error("%s", msg);
- return 0;
}
static void setup_rand(void)
@@ -291,7 +284,7 @@
setup_rand();
exprs = ee;
- G_set_error_routine(error_handler);
+ G_add_error_handler(error_handler, NULL);
for (l = ee; l; l = l->next) {
expression *e = l->exp;
More information about the grass-commit
mailing list