[GRASS-SVN] r63832 - in grass/branches/releasebranch_7_0: . db/drivers/dbf db/drivers/mysql db/drivers/sqlite display/d.mon general/g.gisenv general/g.gui general/g.mapset imagery/i.find imagery/i.ortho.photo/i.ortho.elev imagery/i.ortho.photo/i.ortho.rectify imagery/i.rectify include/defs lib/db/dbmi_base lib/db/dbmi_client lib/db/dbmi_driver lib/display lib/gis lib/temporal/lib lib/vector/Vlib lib/vector/diglib raster/r.in.gdal raster/r.proj vector/v.lidar.correction vector/v.lidar.edgedetection vector/v.net.salesman vector/v.outlier vector/v.proj vector/v.rectify
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 29 10:16:10 PST 2014
Author: martinl
Date: 2014-12-29 10:16:10 -0800 (Mon, 29 Dec 2014)
New Revision: 63832
Modified:
grass/branches/releasebranch_7_0/
grass/branches/releasebranch_7_0/db/drivers/dbf/db.c
grass/branches/releasebranch_7_0/db/drivers/mysql/replace.c
grass/branches/releasebranch_7_0/db/drivers/sqlite/db.c
grass/branches/releasebranch_7_0/display/d.mon/list.c
grass/branches/releasebranch_7_0/display/d.mon/main.c
grass/branches/releasebranch_7_0/display/d.mon/select.c
grass/branches/releasebranch_7_0/display/d.mon/start.c
grass/branches/releasebranch_7_0/display/d.mon/stop.c
grass/branches/releasebranch_7_0/general/g.gisenv/main.c
grass/branches/releasebranch_7_0/general/g.gui/main.c
grass/branches/releasebranch_7_0/general/g.mapset/main.c
grass/branches/releasebranch_7_0/imagery/i.find/main.c
grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.elev/main.c
grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/env.c
grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/target.c
grass/branches/releasebranch_7_0/imagery/i.rectify/env.c
grass/branches/releasebranch_7_0/imagery/i.rectify/target.c
grass/branches/releasebranch_7_0/include/defs/gis.h
grass/branches/releasebranch_7_0/lib/db/dbmi_base/connect.c
grass/branches/releasebranch_7_0/lib/db/dbmi_base/default_name.c
grass/branches/releasebranch_7_0/lib/db/dbmi_client/start.c
grass/branches/releasebranch_7_0/lib/db/dbmi_driver/driver.c
grass/branches/releasebranch_7_0/lib/display/r_raster.c
grass/branches/releasebranch_7_0/lib/gis/debug.c
grass/branches/releasebranch_7_0/lib/gis/env.c
grass/branches/releasebranch_7_0/lib/gis/make_loc.c
grass/branches/releasebranch_7_0/lib/gis/make_mapset.c
grass/branches/releasebranch_7_0/lib/gis/mapset.c
grass/branches/releasebranch_7_0/lib/gis/overwrite.c
grass/branches/releasebranch_7_0/lib/gis/parser.c
grass/branches/releasebranch_7_0/lib/temporal/lib/connect.c
grass/branches/releasebranch_7_0/lib/vector/Vlib/intersect.c
grass/branches/releasebranch_7_0/lib/vector/Vlib/sindex.c
grass/branches/releasebranch_7_0/lib/vector/diglib/file.c
grass/branches/releasebranch_7_0/lib/vector/diglib/plus_area.c
grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c
grass/branches/releasebranch_7_0/raster/r.proj/main.c
grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c
grass/branches/releasebranch_7_0/vector/v.lidar.edgedetection/main.c
grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c
grass/branches/releasebranch_7_0/vector/v.outlier/main.c
grass/branches/releasebranch_7_0/vector/v.proj/main.c
grass/branches/releasebranch_7_0/vector/v.rectify/env.c
grass/branches/releasebranch_7_0/vector/v.rectify/target.c
Log:
libgis: G__getenv() -> G_getenv_nofatal()
G__getenv2() -> G_getenv_nofatal2()
G__setenv() -> G_setenv_nogisrc()
G__setenv2() -> G_setenv_nogisrc2()
update modules
(merge r63830-1 from trunk)
Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
- /grass/trunk:60817,61096,61141,61994,62105,62179-62180,62182,62190,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750-62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62828,62831,62838,62845,62847,62850,62856,62879,62881,62886,62904,62907-62908,62910,62912,62914,62916,62918,62920,62925,62932-62933,62935,62940,62942,62944-62946,62949,62955-62956,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,63047,63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,
63076,63079,63081,63083,63085,63087,63089,63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63160,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63275-63276,63279,63281,63283,63287,63290,63292,63297,63302,63304-63307,63315,63319,63327,63330,63332,63339,63342,63345,63361-63363,63367,63379,63389,63391,63393,63402,63408-63409,63416-63417,63425,63427,63429,63431,63433,63448,63451,63453,63457,63459,63464-63470,63473,63482,63497,63505,63508,63510,63515,63521-63524,63526,63536-63537,63551-63552,63554,63556,63558-63559,63562,63570,63576,63582,63589-63593,63602,63604,63608-63609,63616,63618,63624,63626,63628,63630,63634,63639,63642,63644,63650,63652,63656,63679,63685,63689,63691,63693,63695,63698,63700-63702,63704,63706-63707,63709,63711,63713,63715,63717-63718
,63721-63727,63731,63733,63740-63742,63744,63747-63749,63751-63752,63756,63758,63761,63767,63777,63780,63783,63787,63793,63796-63798,63801,63803,63807-63808,63812,63814,63816,63821,63823-63824,63827-63828
+ /grass/trunk:60817,61096,61141,61994,62105,62179-62180,62182,62190,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750-62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62828,62831,62838,62845,62847,62850,62856,62879,62881,62886,62904,62907-62908,62910,62912,62914,62916,62918,62920,62925,62932-62933,62935,62940,62942,62944-62946,62949,62955-62956,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,63047,63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,
63076,63079,63081,63083,63085,63087,63089,63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63160,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63275-63276,63279,63281,63283,63287,63290,63292,63297,63302,63304-63307,63315,63319,63327,63330,63332,63339,63342,63345,63361-63363,63367,63379,63389,63391,63393,63402,63408-63409,63416-63417,63425,63427,63429,63431,63433,63448,63451,63453,63457,63459,63464-63470,63473,63482,63497,63505,63508,63510,63515,63521-63524,63526,63536-63537,63551-63552,63554,63556,63558-63559,63562,63570,63576,63582,63589-63593,63602,63604,63608-63609,63616,63618,63624,63626,63628,63630,63634,63639,63642,63644,63650,63652,63656,63679,63685,63689,63691,63693,63695,63698,63700-63702,63704,63706-63707,63709,63711,63713,63715,63717-63718
,63721-63727,63731,63733,63740-63742,63744,63747-63749,63751-63752,63756,63758,63761,63767,63777,63780,63783,63787,63793,63796-63798,63801,63803,63807-63808,63812,63814,63816,63821,63823-63824,63827-63828,63830-63831
Modified: grass/branches/releasebranch_7_0/db/drivers/dbf/db.c
===================================================================
--- grass/branches/releasebranch_7_0/db/drivers/dbf/db.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/db/drivers/dbf/db.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -69,8 +69,8 @@
if (tokens[n][0] == '$') {
G_strchg(tokens[n], '$', ' ');
G_chop(tokens[n]);
- strcat(db.name, G__getenv(tokens[n]));
- G_debug(3, " -> %s", G__getenv(tokens[n]));
+ strcat(db.name, G_getenv_nofatal(tokens[n]));
+ G_debug(3, " -> %s", G_getenv_nofatal(tokens[n]));
}
else
strcat(db.name, tokens[n]);
Modified: grass/branches/releasebranch_7_0/db/drivers/mysql/replace.c
===================================================================
--- grass/branches/releasebranch_7_0/db/drivers/mysql/replace.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/db/drivers/mysql/replace.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -49,8 +49,8 @@
if (tokens[n][0] == '$') {
G_strchg(tokens[n], '$', ' ');
G_chop(tokens[n]);
- strcat(tmp, G__getenv(tokens[n]));
- G_debug(3, " -> %s", G__getenv(tokens[n]));
+ strcat(tmp, G_getenv_nofatal(tokens[n]));
+ G_debug(3, " -> %s", G_getenv_nofatal(tokens[n]));
}
else {
strcat(tmp, tokens[n]);
Modified: grass/branches/releasebranch_7_0/db/drivers/sqlite/db.c
===================================================================
--- grass/branches/releasebranch_7_0/db/drivers/sqlite/db.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/db/drivers/sqlite/db.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -67,8 +67,8 @@
if (tokens[n][0] == '$') {
G_strchg(tokens[n], '$', ' ');
G_chop(tokens[n]);
- strcat(name2, G__getenv(tokens[n]));
- G_debug(3, " -> %s", G__getenv(tokens[n]));
+ strcat(name2, G_getenv_nofatal(tokens[n]));
+ G_debug(3, " -> %s", G_getenv_nofatal(tokens[n]));
}
else {
strcat(name2, tokens[n]);
Modified: grass/branches/releasebranch_7_0/display/d.mon/list.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.mon/list.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/display/d.mon/list.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -62,7 +62,7 @@
env_name = NULL;
G_asprintf(&env_name, "MONITOR_%s_ENVFILE", G_store_upper(name));
- str = G__getenv(env_name);
+ str = G_getenv_nofatal(env_name);
if (!str)
return FALSE;
@@ -79,7 +79,7 @@
cmd_name = NULL;
G_asprintf(&cmd_name, "MONITOR_%s_CMDFILE", G_store_upper(name));
- cmd_value = G__getenv(cmd_name);
+ cmd_value = G_getenv_nofatal(cmd_name);
if (!cmd_value)
G_fatal_error(_("Command file not found"));
Modified: grass/branches/releasebranch_7_0/display/d.mon/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.mon/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/display/d.mon/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -139,7 +139,7 @@
if (selected_flag->answer || release_flag->answer || cmd_flag->answer) {
if (list_flag->answer)
G_warning(_("Flag -%c ignored"), list_flag->key);
- mon = G__getenv("MONITOR");
+ mon = G_getenv_nofatal("MONITOR");
if (mon) {
if (selected_flag->answer) {
G_verbose_message(_("Currently selected monitor:"));
Modified: grass/branches/releasebranch_7_0/display/d.mon/select.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.mon/select.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/display/d.mon/select.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -9,7 +9,7 @@
char **list;
int i, n, found;
- curr_mon = G__getenv("MONITOR");
+ curr_mon = G_getenv_nofatal("MONITOR");
if (G_strcasecmp(name, curr_mon) == 0) {
G_warning(_("Monitor <%s> is already selected"), name);
return 0;
Modified: grass/branches/releasebranch_7_0/display/d.mon/start.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.mon/start.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/display/d.mon/start.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -110,7 +110,7 @@
if (check_mon(name)) {
const char *curr_mon;
- curr_mon = G__getenv("MONITOR");
+ curr_mon = G_getenv_nofatal("MONITOR");
if (select && (!curr_mon || strcmp(curr_mon, name) != 0))
G_setenv("MONITOR", name);
Modified: grass/branches/releasebranch_7_0/display/d.mon/stop.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.mon/stop.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/display/d.mon/stop.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -32,7 +32,7 @@
env_name = NULL;
G_asprintf(&env_name, "MONITOR_%s_ENVFILE", G_store_upper(name));
- env_file = G__getenv(env_name);
+ env_file = G_getenv_nofatal(env_name);
if (!env_file)
G_warning(_("Env file not found"));
@@ -49,7 +49,7 @@
env_name = NULL;
G_asprintf(&env_name, "MONITOR_%s_PID", G_store_upper(name));
- pid = G__getenv(env_name);
+ pid = G_getenv_nofatal(env_name);
if (!pid) {
clean_env(name);
G_fatal_error(_("PID file not found"));
Modified: grass/branches/releasebranch_7_0/general/g.gisenv/main.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.gisenv/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/general/g.gisenv/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -116,7 +116,7 @@
quote = !isatty(fileno(stdout));
for (n = 0; (name = G_get_env_name(n)); n++) {
- value = (char *)G__getenv(name);
+ value = (char *)G_getenv_nofatal(name);
if (value) {
if (!quote)
fprintf(stdout, "%s=%s\n", name, value);
Modified: grass/branches/releasebranch_7_0/general/g.gui/main.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.gui/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/general/g.gui/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -84,7 +84,7 @@
if (nolaunch->answer && !update->answer)
update->answer = TRUE;
- gui_type_env = G__getenv("GUI");
+ gui_type_env = G_getenv_nofatal("GUI");
if (!type->answer) {
if (gui_type_env && strcmp(gui_type_env, "text")) {
Modified: grass/branches/releasebranch_7_0/general/g.mapset/main.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.mapset/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/general/g.mapset/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -98,9 +98,9 @@
exit(EXIT_FAILURE);
/* Store original values */
- gisdbase_old = G__getenv("GISDBASE");
- location_old = G__getenv("LOCATION_NAME");
- mapset_old = G__getenv("MAPSET");
+ gisdbase_old = G_getenv_nofatal("GISDBASE");
+ location_old = G_getenv_nofatal("LOCATION_NAME");
+ mapset_old = G_getenv_nofatal("MAPSET");
if (flag.curr->answer) {
fprintf(stdout, "%s\n", mapset_old);
@@ -125,8 +125,8 @@
char **ms;
int nmapsets;
- G__setenv("LOCATION_NAME", location_new);
- G__setenv("GISDBASE", gisdbase_new);
+ G_setenv_nogisrc("LOCATION_NAME", location_new);
+ G_setenv_nogisrc("GISDBASE", gisdbase_new);
ms = G_get_available_mapsets();
Modified: grass/branches/releasebranch_7_0/imagery/i.find/main.c
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.find/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/imagery/i.find/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -70,8 +70,8 @@
*/
tempfile = G_tempfile();
- G__setenv("LOCATION_NAME", argv[1]);
- G__setenv("MAPSET", argv[2]);
+ G_setenv_nogisrc("LOCATION_NAME", argv[1]);
+ G_setenv_nogisrc("MAPSET", argv[2]);
for (n = 3; n < argc; n += 2) {
FILE *fd;
Modified: grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.elev/main.c
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.elev/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.elev/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -122,11 +122,11 @@
G_create_alt_env();
- G__setenv("LOCATION_NAME", location);
+ G_setenv_nogisrc("LOCATION_NAME", location);
stat = G__mapset_permissions(mapset);
if (stat > 0) {
- G__setenv("MAPSET", mapset);
+ G_setenv_nogisrc("MAPSET", mapset);
G_create_alt_search_path();
G_switch_env();
G_switch_search_path();
@@ -156,7 +156,7 @@
}
I_get_group_elev(group, elev_layer, mapset_elev, tl, math_exp, units, nd);
- overwrite = G__getenv("OVERWRITE") != NULL;
+ overwrite = G_getenv_nofatal("OVERWRITE") != NULL;
if (!overwrite && *elev_layer) {
G_warning(_("Elevation for group <%s> is already set to <%s>"),
Modified: grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/env.c
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/env.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/env.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -34,9 +34,9 @@
int show_env(void)
{
fprintf(stderr, "env(%d) switch to LOCATION %s, MAPSET %s\n", which_env,
- G__getenv("LOCATION_NAME") ==
- NULL ? "?" : G__getenv("LOCATION_NAME"),
- G__getenv("MAPSET") == NULL ? "?" : G__getenv("MAPSET"));
+ G_getenv_nofatal("LOCATION_NAME") ==
+ NULL ? "?" : G_getenv_nofatal("LOCATION_NAME"),
+ G_getenv_nofatal("MAPSET") == NULL ? "?" : G_getenv_nofatal("MAPSET"));
G_sleep(2);
return 0;
Modified: grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/target.c
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/target.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/imagery/i.ortho.photo/i.ortho.rectify/target.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -20,10 +20,10 @@
goto error;
}
select_target_env();
- G__setenv("LOCATION_NAME", location);
+ G_setenv_nogisrc("LOCATION_NAME", location);
stat = G__mapset_permissions(mapset);
if (stat > 0) {
- G__setenv("MAPSET", mapset);
+ G_setenv_nogisrc("MAPSET", mapset);
G_get_window(&target_window);
select_current_env();
return 1;
Modified: grass/branches/releasebranch_7_0/imagery/i.rectify/env.c
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.rectify/env.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/imagery/i.rectify/env.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -33,9 +33,9 @@
int show_env(void)
{
fprintf(stderr, "env(%d) switch to LOCATION %s, MAPSET %s\n", which_env,
- G__getenv("LOCATION_NAME") ==
- NULL ? "?" : G__getenv("LOCATION_NAME"),
- G__getenv("MAPSET") == NULL ? "?" : G__getenv("MAPSET"));
+ G_getenv_nofatal("LOCATION_NAME") ==
+ NULL ? "?" : G_getenv_nofatal("LOCATION_NAME"),
+ G_getenv_nofatal("MAPSET") == NULL ? "?" : G_getenv_nofatal("MAPSET"));
G_sleep(2);
return 0;
Modified: grass/branches/releasebranch_7_0/imagery/i.rectify/target.c
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.rectify/target.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/imagery/i.rectify/target.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -21,10 +21,10 @@
goto error;
}
select_target_env();
- G__setenv("LOCATION_NAME", location);
+ G_setenv_nogisrc("LOCATION_NAME", location);
stat = G__mapset_permissions(mapset);
if (stat > 0) {
- G__setenv("MAPSET", mapset);
+ G_setenv_nogisrc("MAPSET", mapset);
G_get_window(&target_window);
select_current_env();
return 1;
Modified: grass/branches/releasebranch_7_0/include/defs/gis.h
===================================================================
--- grass/branches/releasebranch_7_0/include/defs/gis.h 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/include/defs/gis.h 2014-12-29 18:16:10 UTC (rev 63832)
@@ -210,12 +210,12 @@
void G_init_env(void);
const char *G_getenv(const char *);
const char *G_getenv2(const char *, int);
-const char *G__getenv(const char *);
-const char *G__getenv2(const char *, int);
+const char *G_getenv_nofatal(const char *);
+const char *G_getenv_nofatal2(const char *, int);
void G_setenv(const char *, const char *);
void G_setenv2(const char *, const char *, int);
-void G__setenv(const char *, const char *);
-void G__setenv2(const char *, const char *, int);
+void G_setenv_nogisrc(const char *, const char *);
+void G_setenv_nogisrc2(const char *, const char *, int);
void G_unsetenv(const char *);
void G_unsetenv2(const char *, int);
void G__write_env(void);
Modified: grass/branches/releasebranch_7_0/lib/db/dbmi_base/connect.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/db/dbmi_base/connect.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/db/dbmi_base/connect.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -71,16 +71,16 @@
G_zero(connection, sizeof(dbConnection));
- connection->driverName = (char *)G__getenv2("DB_DRIVER", G_VAR_MAPSET);
- connection->databaseName = (char *)G__getenv2("DB_DATABASE", G_VAR_MAPSET);
- connection->schemaName = (char *)G__getenv2("DB_SCHEMA", G_VAR_MAPSET);
- connection->group = (char *)G__getenv2("DB_GROUP", G_VAR_MAPSET);
+ connection->driverName = (char *)G_getenv_nofatal2("DB_DRIVER", G_VAR_MAPSET);
+ connection->databaseName = (char *)G_getenv_nofatal2("DB_DATABASE", G_VAR_MAPSET);
+ connection->schemaName = (char *)G_getenv_nofatal2("DB_SCHEMA", G_VAR_MAPSET);
+ connection->group = (char *)G_getenv_nofatal2("DB_GROUP", G_VAR_MAPSET);
/* below commented due to new mechanism:
- connection->hostName = G__getenv("DB_HOST");
- connection->location = G__getenv("DB_LOCATION");
- connection->user = G__getenv("DB_USER");
- connection->password = G__getenv("DB_PASSWORD");
+ connection->hostName = G_getenv_nofatal("DB_HOST");
+ connection->location = G_getenv_nofatal("DB_LOCATION");
+ connection->user = G_getenv_nofatal("DB_USER");
+ connection->password = G_getenv_nofatal("DB_PASSWORD");
*/
return DB_OK;
Modified: grass/branches/releasebranch_7_0/lib/db/dbmi_base/default_name.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/db/dbmi_base/default_name.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/db/dbmi_base/default_name.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -28,7 +28,7 @@
{
const char *drv;
- if ((drv = G__getenv2("DB_DRIVER", G_VAR_MAPSET)))
+ if ((drv = G_getenv_nofatal2("DB_DRIVER", G_VAR_MAPSET)))
return G_store(drv);
return NULL;
@@ -44,7 +44,7 @@
{
const char *drv;
- if ((drv = G__getenv2("DB_DATABASE", G_VAR_MAPSET)))
+ if ((drv = G_getenv_nofatal2("DB_DATABASE", G_VAR_MAPSET)))
return G_store(drv);
return NULL;
@@ -60,7 +60,7 @@
{
const char *sch;
- if ((sch = G__getenv2("DB_SCHEMA", G_VAR_MAPSET)))
+ if ((sch = G_getenv_nofatal2("DB_SCHEMA", G_VAR_MAPSET)))
return G_store(sch);
return NULL;
@@ -76,7 +76,7 @@
{
const char *gr;
- if ((gr = G__getenv2("DB_GROUP", G_VAR_MAPSET)))
+ if ((gr = G_getenv_nofatal2("DB_GROUP", G_VAR_MAPSET)))
return G_store(gr);
return NULL;
Modified: grass/branches/releasebranch_7_0/lib/db/dbmi_client/start.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/db/dbmi_client/start.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/db/dbmi_client/start.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -64,16 +64,16 @@
sprintf(ebuf, "%d", G_GISRC_MODE_MEMORY);
G_putenv("GRASS_DB_DRIVER_GISRC_MODE", ebuf); /* to tell driver that it must read variables */
- if (G__getenv("DEBUG")) {
- G_putenv("DEBUG", G__getenv("DEBUG"));
+ if (G_getenv_nofatal("DEBUG")) {
+ G_putenv("DEBUG", G_getenv_nofatal("DEBUG"));
}
else {
G_putenv("DEBUG", "0");
}
- G_putenv("GISDBASE", G__getenv("GISDBASE"));
- G_putenv("LOCATION_NAME", G__getenv("LOCATION_NAME"));
- G_putenv("MAPSET", G__getenv("MAPSET"));
+ G_putenv("GISDBASE", G_getenv_nofatal("GISDBASE"));
+ G_putenv("LOCATION_NAME", G_getenv_nofatal("LOCATION_NAME"));
+ G_putenv("MAPSET", G_getenv_nofatal("MAPSET"));
}
else {
/* Warning: GISRC_MODE_MEMORY _must_ be set to G_GISRC_MODE_FILE, because the module can be
Modified: grass/branches/releasebranch_7_0/lib/db/dbmi_driver/driver.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/db/dbmi_driver/driver.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/db/dbmi_driver/driver.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -53,10 +53,10 @@
if (mode == G_GISRC_MODE_MEMORY) {
G_set_gisrc_mode(G_GISRC_MODE_MEMORY);
- G__setenv("DEBUG", getenv("DEBUG"));
- G__setenv("GISDBASE", getenv("GISDBASE"));
- G__setenv("LOCATION_NAME", getenv("LOCATION_NAME"));
- G__setenv("MAPSET", getenv("MAPSET"));
+ G_setenv_nogisrc("DEBUG", getenv("DEBUG"));
+ G_setenv_nogisrc("GISDBASE", getenv("GISDBASE"));
+ G_setenv_nogisrc("LOCATION_NAME", getenv("LOCATION_NAME"));
+ G_setenv_nogisrc("MAPSET", getenv("MAPSET"));
G_debug(3, "Driver GISDBASE set to '%s'", G_getenv("GISDBASE"));
}
}
Modified: grass/branches/releasebranch_7_0/lib/display/r_raster.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/display/r_raster.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/display/r_raster.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -107,7 +107,7 @@
G_debug(1, "D_open_driver():");
p = getenv("GRASS_RENDER_IMMEDIATE");
- m = G__getenv("MONITOR");
+ m = G_getenv_nofatal("MONITOR");
if (m && G_strncasecmp(m, "wx", 2) == 0) {
/* wx monitors always use GRASS_RENDER_IMMEDIATE. */
@@ -126,14 +126,14 @@
env = NULL;
G_asprintf(&env, "MONITOR_%s_MAPFILE", u_m);
- v = G__getenv(env);
+ v = G_getenv_nofatal(env);
p = m;
if (v)
G_putenv("GRASS_RENDER_FILE", v);
G_asprintf(&env, "MONITOR_%s_ENVFILE", u_m);
- v = G__getenv(env);
+ v = G_getenv_nofatal(env);
if (v)
read_env_file(v);
}
@@ -204,7 +204,7 @@
G_debug(1, "D_save_command(): %s", cmd);
- mon_name = G__getenv("MONITOR");
+ mon_name = G_getenv_nofatal("MONITOR");
if (!mon_name || /* if no monitor selected */
/* or wx monitor selected and display commands called by the monitor */
(G_strncasecmp(mon_name, "wx", 2) == 0 &&
@@ -216,7 +216,7 @@
env = NULL;
G_asprintf(&env, "MONITOR_%s_CMDFILE", u_mon_name);
- mon_cmd = G__getenv(env);
+ mon_cmd = G_getenv_nofatal(env);
if (!mon_cmd)
return 0;
Modified: grass/branches/releasebranch_7_0/lib/gis/debug.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/debug.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/gis/debug.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -31,7 +31,7 @@
if (G_is_initialized(&initialized))
return;
- lstr = G__getenv("DEBUG");
+ lstr = G_getenv_nofatal("DEBUG");
if (lstr != NULL)
grass_debug_level = atoi(lstr);
Modified: grass/branches/releasebranch_7_0/lib/gis/env.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/env.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/gis/env.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -335,7 +335,7 @@
*/
const char *G_getenv(const char *name)
{
- const char *value = G__getenv(name);
+ const char *value = G_getenv_nofatal(name);
if (value)
return value;
@@ -361,7 +361,7 @@
*/
const char *G_getenv2(const char *name, int loc)
{
- const char *value = G__getenv2(name, loc);
+ const char *value = G_getenv_nofatal2(name, loc);
if (value)
return value;
@@ -378,7 +378,7 @@
\return char pointer to value for name
\return NULL if name not set
*/
-const char *G__getenv(const char *name)
+const char *G_getenv_nofatal(const char *name)
{
if (strcmp(name, "GISBASE") == 0)
return getenv(name);
@@ -397,7 +397,7 @@
\return char pointer to value for name
\return NULL if name not set
*/
-const char *G__getenv2(const char *name, int loc)
+const char *G_getenv_nofatal2(const char *name, int loc)
{
if (strcmp(name, "GISBASE") == 0)
return getenv(name);
@@ -445,7 +445,7 @@
\param name variable name
\param value variable value
*/
-void G__setenv(const char *name, const char *value)
+void G_setenv_nogisrc(const char *name, const char *value)
{
read_env(G_VAR_GISRC);
set_env(name, value, G_VAR_GISRC);
@@ -458,7 +458,7 @@
\param value variable value
\param loc location (G_VAR_GISRC, G_VAR_MAPSET)
*/
-void G__setenv2(const char *name, const char *value, int loc)
+void G_setenv_nogisrc2(const char *name, const char *value, int loc)
{
read_env(loc);
set_env(name, value, loc);
Modified: grass/branches/releasebranch_7_0/lib/gis/make_loc.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/make_loc.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/gis/make_loc.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -71,8 +71,8 @@
}
/* make these the new current location and mapset */
- G__setenv("LOCATION_NAME", location_name);
- G__setenv("MAPSET", "PERMANENT");
+ G_setenv_nogisrc("LOCATION_NAME", location_name);
+ G_setenv_nogisrc("MAPSET", "PERMANENT");
/* Create the default, and current window files */
G_put_element_window(wind, "", "DEFAULT_WIND");
Modified: grass/branches/releasebranch_7_0/lib/gis/make_mapset.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/make_mapset.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/gis/make_mapset.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -74,13 +74,13 @@
G_create_alt_env();
/* Get PERMANENT default window */
- G__setenv("GISDBASE", gisdbase_name);
- G__setenv("LOCATION", location_name);
- G__setenv("MAPSET", "PERMANENT");
+ G_setenv_nogisrc("GISDBASE", gisdbase_name);
+ G_setenv_nogisrc("LOCATION", location_name);
+ G_setenv_nogisrc("MAPSET", "PERMANENT");
G_get_default_window(&default_window);
/* Change to the new mapset */
- G__setenv("MAPSET", mapset_name);
+ G_setenv_nogisrc("MAPSET", mapset_name);
/* Copy default window/regions to new mapset */
G_put_element_window(&default_window, "", "WIND");
Modified: grass/branches/releasebranch_7_0/lib/gis/mapset.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/mapset.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/gis/mapset.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -50,7 +50,7 @@
*/
const char *G__mapset(void)
{
- return G__getenv("MAPSET");
+ return G_getenv_nofatal("MAPSET");
}
/*!
Modified: grass/branches/releasebranch_7_0/lib/gis/overwrite.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/overwrite.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/gis/overwrite.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -37,7 +37,7 @@
int overwrite;
overwrite = 0;
- if ((overstr = G__getenv("OVERWRITE"))) {
+ if ((overstr = G_getenv_nofatal("OVERWRITE"))) {
overwrite = atoi(overstr);
}
@@ -59,7 +59,7 @@
}
}
- G__setenv("OVERWRITE", "1");
+ G_setenv_nogisrc("OVERWRITE", "1");
return overwrite;
}
Modified: grass/branches/releasebranch_7_0/lib/gis/parser.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/parser.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/gis/parser.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -1424,7 +1424,7 @@
over = 0;
/* Check the GRASS OVERWRITE variable */
- if ((overstr = G__getenv("OVERWRITE"))) {
+ if ((overstr = G_getenv_nofatal("OVERWRITE"))) {
over = atoi(overstr);
}
Modified: grass/branches/releasebranch_7_0/lib/temporal/lib/connect.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/temporal/lib/connect.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/temporal/lib/connect.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -25,7 +25,7 @@
{
const char *drv;
- if ((drv = G__getenv2("TGISDB_DRIVER", G_VAR_MAPSET)))
+ if ((drv = G_getenv_nofatal2("TGISDB_DRIVER", G_VAR_MAPSET)))
return G_store(drv);
return NULL;
@@ -41,7 +41,7 @@
{
const char *drv;
- if ((drv = G__getenv2("TGISDB_DATABASE", G_VAR_MAPSET)))
+ if ((drv = G_getenv_nofatal2("TGISDB_DATABASE", G_VAR_MAPSET)))
return G_store(drv);
return NULL;
@@ -78,8 +78,8 @@
{
G_zero(connection, sizeof(dbConnection));
- connection->driverName = (char *)G__getenv2("TGISDB_DRIVER", G_VAR_MAPSET);
- connection->databaseName = (char *)G__getenv2("TGISDB_DATABASE", G_VAR_MAPSET);
+ connection->driverName = (char *)G_getenv_nofatal2("TGISDB_DRIVER", G_VAR_MAPSET);
+ connection->databaseName = (char *)G_getenv_nofatal2("TGISDB_DATABASE", G_VAR_MAPSET);
return DB_OK;
}
@@ -91,8 +91,8 @@
{
const char *val = NULL;
char *ret_val = NULL;;
- const char *gisdbase = G__getenv("GISDBASE");
- const char *location = G__getenv("LOCATION_NAME");
+ const char *gisdbase = G_getenv_nofatal("GISDBASE");
+ const char *location = G_getenv_nofatal("LOCATION_NAME");
int ret;
ret = G__mapset_permissions2(gisdbase, location, mapset);
@@ -110,16 +110,16 @@
}
G_create_alt_env();
- G__setenv("GISDBASE", gisdbase);
- G__setenv("LOCATION_NAME", location);
- G__setenv("MAPSET", mapset);
+ G_setenv_nogisrc("GISDBASE", gisdbase);
+ G_setenv_nogisrc("LOCATION_NAME", location);
+ G_setenv_nogisrc("MAPSET", mapset);
G__read_mapset_env();
if(contype == DATABASE_NAME) {
- if ((val = G__getenv2("TGISDB_DATABASE", G_VAR_MAPSET)))
+ if ((val = G_getenv_nofatal2("TGISDB_DATABASE", G_VAR_MAPSET)))
ret_val = G_store(val);
} else if(contype == DRIVER_NAME) {
- if ((val = G__getenv2("TGISDB_DRIVER", G_VAR_MAPSET)))
+ if ((val = G_getenv_nofatal2("TGISDB_DRIVER", G_VAR_MAPSET)))
ret_val = G_store(val);
}
Modified: grass/branches/releasebranch_7_0/lib/vector/Vlib/intersect.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/vector/Vlib/intersect.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/vector/Vlib/intersect.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -579,7 +579,7 @@
struct bound_box box, abbox;
if (debug_level == -1) {
- const char *dstr = G__getenv("DEBUG");
+ const char *dstr = G_getenv_nofatal("DEBUG");
if (dstr != NULL)
debug_level = atoi(dstr);
Modified: grass/branches/releasebranch_7_0/lib/vector/Vlib/sindex.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/vector/Vlib/sindex.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/vector/Vlib/sindex.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -129,7 +129,7 @@
static int debug_level = -1;
if (debug_level == -1) {
- const char *dstr = G__getenv("DEBUG");
+ const char *dstr = G_getenv_nofatal("DEBUG");
if (dstr != NULL)
debug_level = atoi(dstr);
Modified: grass/branches/releasebranch_7_0/lib/vector/diglib/file.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/vector/diglib/file.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/vector/diglib/file.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -200,7 +200,7 @@
/* Get mode */
mode = GV_MEMORY_NEVER;
- cmode = G__getenv("GV_MEMORY");
+ cmode = G_getenv_nofatal("GV_MEMORY");
if (cmode != NULL) {
if (G_strcasecmp(cmode, "ALWAYS") == 0)
mode = GV_MEMORY_ALWAYS;
Modified: grass/branches/releasebranch_7_0/lib/vector/diglib/plus_area.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/vector/diglib/plus_area.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/lib/vector/diglib/plus_area.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -62,7 +62,7 @@
int node;
if (debug_level == -1) {
- const char *dstr = G__getenv("DEBUG");
+ const char *dstr = G_getenv_nofatal("DEBUG");
if (dstr != NULL)
debug_level = atoi(dstr);
@@ -260,7 +260,7 @@
G_debug(3, "dig_area_add_isle(): area = %d isle = %d", area, isle);
if (debug_level == -1) {
- const char *dstr = G__getenv("DEBUG");
+ const char *dstr = G_getenv_nofatal("DEBUG");
if (dstr != NULL)
debug_level = atoi(dstr);
@@ -472,7 +472,7 @@
struct P_line *Line;
if (debug_level == -1) {
- const char *dstr = G__getenv("DEBUG");
+ const char *dstr = G_getenv_nofatal("DEBUG");
if (dstr != NULL)
debug_level = atoi(dstr);
Modified: grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -649,7 +649,7 @@
/* does the target location exist? */
G_create_alt_env();
- G__setenv("LOCATION_NAME", parm.target->answer);
+ G_setenv_nogisrc("LOCATION_NAME", parm.target->answer);
sprintf(target_mapset, "PERMANENT"); /* must exist */
if (G__mapset_permissions(target_mapset) == -1) {
@@ -822,7 +822,7 @@
/* Change to user defined target location for GCPs transformation */
G_create_alt_env();
- G__setenv("LOCATION_NAME", (char *)pszDstLoc);
+ G_setenv_nogisrc("LOCATION_NAME", (char *)pszDstLoc);
sprintf(target_mapset, "PERMANENT"); /* to find PROJ_INFO */
permissions = G__mapset_permissions(target_mapset);
Modified: grass/branches/releasebranch_7_0/raster/r.proj/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.proj/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/raster/r.proj/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -278,8 +278,8 @@
/* Change the location */
G_create_alt_env();
- G__setenv("GISDBASE", indbase->answer ? indbase->answer : G_gisdbase());
- G__setenv("LOCATION_NAME", inlocation->answer);
+ G_setenv_nogisrc("GISDBASE", indbase->answer ? indbase->answer : G_gisdbase());
+ G_setenv_nogisrc("LOCATION_NAME", inlocation->answer);
permissions = G__mapset_permissions(setname);
if (permissions < 0) /* can't access mapset */
@@ -294,8 +294,8 @@
char **list;
G_verbose_message(_("Checking location <%s> mapset <%s>"),
inlocation->answer, setname);
- list = G_list(G_ELEMENT_RASTER, G__getenv("GISDBASE"),
- G__getenv("LOCATION_NAME"), setname);
+ list = G_list(G_ELEMENT_RASTER, G_getenv_nofatal("GISDBASE"),
+ G_getenv_nofatal("LOCATION_NAME"), setname);
for (i = 0; list[i]; i++) {
fprintf(stdout, "%s\n", list[i]);
}
Modified: grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -144,10 +144,10 @@
HighThresh = atof(Thresh_A_opt->answer);
LowThresh = atof(Thresh_B_opt->answer);
- if (!(db = G__getenv2("DB_DATABASE", G_VAR_MAPSET)))
+ if (!(db = G_getenv_nofatal2("DB_DATABASE", G_VAR_MAPSET)))
G_fatal_error(_("Unable to read name of database"));
- if (!(dvr = G__getenv2("DB_DRIVER", G_VAR_MAPSET)))
+ if (!(dvr = G_getenv_nofatal2("DB_DRIVER", G_VAR_MAPSET)))
G_fatal_error(_("Unable to read name of driver"));
/* Setting auxiliar table's name */
Modified: grass/branches/releasebranch_7_0/vector/v.lidar.edgedetection/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lidar.edgedetection/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/vector/v.lidar.edgedetection/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -165,10 +165,10 @@
grad_L = grad_L * grad_L;
grad_H = grad_H * grad_H;
- if (!(db = G__getenv2("DB_DATABASE", G_VAR_MAPSET)))
+ if (!(db = G_getenv_nofatal2("DB_DATABASE", G_VAR_MAPSET)))
G_fatal_error(_("Unable to read name of database"));
- if (!(dvr = G__getenv2("DB_DRIVER", G_VAR_MAPSET)))
+ if (!(dvr = G_getenv_nofatal2("DB_DRIVER", G_VAR_MAPSET)))
G_fatal_error(_("Unable to read name of driver"));
/* Setting auxiliar table's name */
Modified: grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -197,7 +197,7 @@
tfield = atoi(tfield_opt->answer);
Vect_str_to_cat_list(term_opt->answer, Clist);
- dstr = G__getenv("DEBUG");
+ dstr = G_getenv_nofatal("DEBUG");
if (dstr != NULL)
debug_level = atoi(dstr);
Modified: grass/branches/releasebranch_7_0/vector/v.outlier/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.outlier/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/vector/v.outlier/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -142,10 +142,10 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
- if (!(db = G__getenv2("DB_DATABASE", G_VAR_MAPSET)))
+ if (!(db = G_getenv_nofatal2("DB_DATABASE", G_VAR_MAPSET)))
G_fatal_error(_("Unable to read name of database"));
- if (!(dvr = G__getenv2("DB_DRIVER", G_VAR_MAPSET)))
+ if (!(dvr = G_getenv_nofatal2("DB_DRIVER", G_VAR_MAPSET)))
G_fatal_error(_("Unable to read name of driver"));
stepN = atof(stepN_opt->answer);
Modified: grass/branches/releasebranch_7_0/vector/v.proj/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.proj/main.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/vector/v.proj/main.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -180,8 +180,8 @@
/* Change the location here and then come back */
select_target_env();
- G__setenv("GISDBASE", gbase);
- G__setenv("LOCATION_NAME", iloc_name);
+ G_setenv_nogisrc("GISDBASE", gbase);
+ G_setenv_nogisrc("LOCATION_NAME", iloc_name);
stat = G__mapset_permissions(iset_name);
if (stat >= 0) { /* yes, we can access the mapset */
@@ -191,8 +191,8 @@
char **list;
G_verbose_message(_("Checking location <%s> mapset <%s>"),
iloc_name, iset_name);
- list = G_list(G_ELEMENT_VECTOR, G__getenv("GISDBASE"),
- G__getenv("LOCATION_NAME"), iset_name);
+ list = G_list(G_ELEMENT_VECTOR, G_getenv_nofatal("GISDBASE"),
+ G_getenv_nofatal("LOCATION_NAME"), iset_name);
if (list[0]) {
for (i = 0; list[i]; i++) {
fprintf(stdout, "%s\n", list[i]);
@@ -209,7 +209,7 @@
G_fatal_error(_("Required parameter <%s> not set"), mapopt->key);
}
- G__setenv("MAPSET", iset_name);
+ G_setenv_nogisrc("MAPSET", iset_name);
/* Make sure map is available */
mapset = G_find_vector2(map_name, iset_name);
if (mapset == NULL)
Modified: grass/branches/releasebranch_7_0/vector/v.rectify/env.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.rectify/env.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/vector/v.rectify/env.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -36,9 +36,9 @@
int show_env(void)
{
fprintf(stderr, "env(%d) switch to LOCATION %s, MAPSET %s\n", which_env,
- G__getenv("LOCATION_NAME") ==
- NULL ? "?" : G__getenv("LOCATION_NAME"),
- G__getenv("MAPSET") == NULL ? "?" : G__getenv("MAPSET"));
+ G_getenv_nofatal("LOCATION_NAME") ==
+ NULL ? "?" : G_getenv_nofatal("LOCATION_NAME"),
+ G_getenv_nofatal("MAPSET") == NULL ? "?" : G_getenv_nofatal("MAPSET"));
G_sleep(2);
return 0;
Modified: grass/branches/releasebranch_7_0/vector/v.rectify/target.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.rectify/target.c 2014-12-29 18:09:52 UTC (rev 63831)
+++ grass/branches/releasebranch_7_0/vector/v.rectify/target.c 2014-12-29 18:16:10 UTC (rev 63832)
@@ -30,10 +30,10 @@
goto error;
}
select_target_env();
- G__setenv("LOCATION_NAME", location);
+ G_setenv_nogisrc("LOCATION_NAME", location);
stat = G__mapset_permissions(mapset);
if (stat > 0) {
- G__setenv("MAPSET", mapset);
+ G_setenv_nogisrc("MAPSET", mapset);
select_current_env();
return 1;
}
More information about the grass-commit
mailing list