[GRASS-SVN] r67081 - grass/branches/releasebranch_7_0/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 12 05:53:22 PST 2015
Author: martinl
Date: 2015-12-12 05:53:22 -0800 (Sat, 12 Dec 2015)
New Revision: 67081
Modified:
grass/branches/releasebranch_7_0/lib/gis/env.c
Log:
libgis: revert r67044:5 (it causing strange compilation problem with g.mkfontcap -s)
G_debug cannot be called here
Modified: grass/branches/releasebranch_7_0/lib/gis/env.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/env.c 2015-12-12 13:37:01 UTC (rev 67080)
+++ grass/branches/releasebranch_7_0/lib/gis/env.c 2015-12-12 13:53:22 UTC (rev 67081)
@@ -17,8 +17,6 @@
#include <stdlib.h>
#include <unistd.h> /* for sleep() */
#include <string.h>
-#include <errno.h>
-
#include <grass/gis.h>
#include <grass/glocale.h>
@@ -152,7 +150,7 @@
parse_env(fd, loc);
fclose(fd);
}
-
+
G_initialize_done(&st->init[loc]);
return 0;
}
@@ -304,12 +302,11 @@
static FILE *open_env(const char *mode, int loc)
{
char buf[GPATH_MAX];
- FILE *fd;
if (loc == G_VAR_GISRC) {
if (!st->gisrc)
st->gisrc = getenv("GISRC");
-
+
if (!st->gisrc) {
G_fatal_error(_("GISRC - variable not set"));
return NULL;
@@ -324,11 +321,7 @@
sprintf(buf, "%s/%s/VAR", G_location_path(), G_mapset());
}
- fd = fopen(buf, mode);
- if (!fd) /* reading failed, call fatal error */
- G_debug(1, "Unable to read GISRC <%s>: %s", buf, strerror(errno));
-
- return fd;
+ return fopen(buf, mode);
}
/*!
More information about the grass-commit
mailing list