[GRASS-SVN] r60508 - in grass/trunk: display/d.mon general/g.gisenv general/g.mapset general/g.mapsets general/g.mlist imagery/i.find imagery/i.ortho.photo/i.ortho.elev imagery/i.ortho.photo/i.ortho.rectify imagery/i.points imagery/i.rectify imagery/i.vpoints include/defs lib/gis raster/r.in.gdal raster/r.out.mpeg raster/r.proj vector/v.in.lidar vector/v.proj vector/v.rectify
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 27 02:17:02 PDT 2014
Author: martinl
Date: 2014-05-27 02:17:02 -0700 (Tue, 27 May 2014)
New Revision: 60508
Modified:
grass/trunk/display/d.mon/list.c
grass/trunk/display/d.mon/stop.c
grass/trunk/general/g.gisenv/main.c
grass/trunk/general/g.mapset/main.c
grass/trunk/general/g.mapsets/get_maps.c
grass/trunk/general/g.mapsets/list.c
grass/trunk/general/g.mapsets/main.c
grass/trunk/general/g.mlist/main.c
grass/trunk/imagery/i.find/main.c
grass/trunk/imagery/i.ortho.photo/i.ortho.elev/main.c
grass/trunk/imagery/i.ortho.photo/i.ortho.rectify/env.c
grass/trunk/imagery/i.points/target.c
grass/trunk/imagery/i.rectify/env.c
grass/trunk/imagery/i.vpoints/target.c
grass/trunk/include/defs/gis.h
grass/trunk/lib/gis/env.c
grass/trunk/lib/gis/find_file.c
grass/trunk/lib/gis/gisinit.c
grass/trunk/lib/gis/list.c
grass/trunk/lib/gis/make_mapset.c
grass/trunk/lib/gis/mapset_nme.c
grass/trunk/raster/r.in.gdal/main.c
grass/trunk/raster/r.out.mpeg/main.c
grass/trunk/raster/r.proj/main.c
grass/trunk/raster/r.proj/readcell.c
grass/trunk/vector/v.in.lidar/main.c
grass/trunk/vector/v.proj/setenv.c
grass/trunk/vector/v.rectify/env.c
Log:
libgis: rename env-related G__ used in the modules to G_
G__env_name -> G_get_env_name
G__create_alt_env -> G_create_alt_env
G__switch_env -> G_switch_env
G__mapset_name -> G_get_mapset_name
G_get_list_of_mapsets -> G__get_list_of_mapsets
G__create_alt_search_path -> G_create_alt_search_path
G__switch_search_path -> G_switch_search_path
G_reset_mapsets -> G__reset_mapsets
G_available_mapsets -> G_get_available_mapsets
update modules
Modified: grass/trunk/display/d.mon/list.c
===================================================================
--- grass/trunk/display/d.mon/list.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/display/d.mon/list.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -18,7 +18,7 @@
*list = NULL;
*n = 0;
tokens = NULL;
- for (i = 0; (name = G__env_name(i)); i++) {
+ for (i = 0; (name = G_get_env_name(i)); i++) {
if (strncmp(env_prefix, name, env_prefix_len) == 0) {
tokens = G_tokenize(name, "_");
if (G_number_of_tokens(tokens) != 3 ||
Modified: grass/trunk/display/d.mon/stop.c
===================================================================
--- grass/trunk/display/d.mon/stop.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/display/d.mon/stop.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -81,7 +81,7 @@
env_prefix_len = strlen(env_prefix);
tokens = NULL;
- for (i = 0; (env = G__env_name(i)); i++) {
+ for (i = 0; (env = G_get_env_name(i)); i++) {
if (strncmp(env_prefix, env, env_prefix_len) != 0)
continue;
Modified: grass/trunk/general/g.gisenv/main.c
===================================================================
--- grass/trunk/general/g.gisenv/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/general/g.gisenv/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -115,7 +115,7 @@
else
quote = !isatty(fileno(stdout));
- for (n = 0; (name = G__env_name(n)); n++) {
+ for (n = 0; (name = G_get_env_name(n)); n++) {
value = (char *)G__getenv(name);
if (value) {
if (!quote)
Modified: grass/trunk/general/g.mapset/main.c
===================================================================
--- grass/trunk/general/g.mapset/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/general/g.mapset/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -128,7 +128,7 @@
G__setenv("LOCATION_NAME", location_new);
G__setenv("GISDBASE", gisdbase_new);
- ms = G_available_mapsets();
+ ms = G_get_available_mapsets();
for (nmapsets = 0; ms[nmapsets]; nmapsets++) {
if (G__mapset_permissions(ms[nmapsets]) > 0) {
Modified: grass/trunk/general/g.mapsets/get_maps.c
===================================================================
--- grass/trunk/general/g.mapsets/get_maps.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/general/g.mapsets/get_maps.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -11,7 +11,7 @@
char **ms, **mapset_name;
int i, n;
- ms = G_available_mapsets();
+ ms = G_get_available_mapsets();
for (n = 0; ms[n]; n++);
mapset_name = (char **)G_malloc(n * sizeof(char *));
Modified: grass/trunk/general/g.mapsets/list.c
===================================================================
--- grass/trunk/general/g.mapsets/list.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/general/g.mapsets/list.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -33,10 +33,10 @@
const char *name;
G_message(_("Accessible mapsets:"));
- for (n = 0; (name = G__mapset_name(n)); n++) {
+ for (n = 0; (name = G_get_mapset_name(n)); n++) {
/* match each mapset to its numeric equivalent */
fprintf(stdout, "%s", name);
- if (G__mapset_name(n+1)) {
+ if (G_get_mapset_name(n+1)) {
if (strcmp(fs, "newline") == 0)
fprintf(stdout, "\n");
else if (strcmp(fs, "space") == 0)
Modified: grass/trunk/general/g.mapsets/main.c
===================================================================
--- grass/trunk/general/g.mapsets/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/general/g.mapsets/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -193,7 +193,7 @@
}
/* read existing mapsets from SEARCH_PATH */
- for (n = 0; (oldname = G__mapset_name(n)); n++)
+ for (n = 0; (oldname = G_get_mapset_name(n)); n++)
append_mapset(&path, oldname);
/* fetch and add new mapsets from param list */
@@ -227,7 +227,7 @@
}
/* read existing mapsets from SEARCH_PATH */
- for (n = 0; (oldname = G__mapset_name(n)); n++) {
+ for (n = 0; (oldname = G_get_mapset_name(n)); n++) {
found = FALSE;
for (ptr = opt.mapset->answers; *ptr && !found; ptr++)
Modified: grass/trunk/general/g.mlist/main.c
===================================================================
--- grass/trunk/general/g.mlist/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/general/g.mlist/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -258,7 +258,7 @@
if (!mapset || !*mapset) {
int n;
- for (n = 0; mapset = G__mapset_name(n), mapset; n++)
+ for (n = 0; mapset = G_get_mapset_name(n), mapset; n++)
make_list(fp, elem, mapset, separator, add_type, add_mapset,
n == 0);
return;
Modified: grass/trunk/imagery/i.find/main.c
===================================================================
--- grass/trunk/imagery/i.find/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/imagery/i.find/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -111,7 +111,7 @@
fwrite(&len1, sizeof(len1), 1L, fd);
fwrite(&len2, sizeof(len2), 1L, fd);
- for (n = 0; ((mapset = G__mapset_name(n)) != NULL); n++) {
+ for (n = 0; ((mapset = G_get_mapset_name(n)) != NULL); n++) {
int len;
char dir[1024];
struct dirent *dp;
Modified: grass/trunk/imagery/i.ortho.photo/i.ortho.elev/main.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/i.ortho.elev/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/imagery/i.ortho.photo/i.ortho.elev/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -121,15 +121,15 @@
}
- G__create_alt_env();
+ G_create_alt_env();
G__setenv("LOCATION_NAME", location);
stat = G__mapset_permissions(mapset);
if (stat > 0) {
G__setenv("MAPSET", mapset);
- G__create_alt_search_path();
- G__switch_env();
- G__switch_search_path();
+ G_create_alt_search_path();
+ G_switch_env();
+ G_switch_search_path();
which_env = 0;
select_target_env();
@@ -181,8 +181,8 @@
int select_current_env(void)
{
if (which_env != 0) {
- G__switch_env();
- G__switch_search_path();
+ G_switch_env();
+ G_switch_search_path();
which_env = 0;
}
@@ -192,8 +192,8 @@
int select_target_env(void)
{
if (which_env != 1) {
- G__switch_env();
- G__switch_search_path();
+ G_switch_env();
+ G_switch_search_path();
which_env = 1;
}
Modified: grass/trunk/imagery/i.ortho.photo/i.ortho.rectify/env.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/i.ortho.rectify/env.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/imagery/i.ortho.photo/i.ortho.rectify/env.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -6,11 +6,11 @@
int select_current_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 0;
}
if (which_env != 0) {
- G__switch_env();
+ G_switch_env();
which_env = 0;
}
@@ -20,11 +20,11 @@
int select_target_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 1;
}
if (which_env != 1) {
- G__switch_env();
+ G_switch_env();
which_env = 1;
}
Modified: grass/trunk/imagery/i.points/target.c
===================================================================
--- grass/trunk/imagery/i.points/target.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/imagery/i.points/target.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -24,14 +24,14 @@
sprintf(buf, "Target location [%s] not found\n", location);
goto error;
}
- G__create_alt_env();
+ G_create_alt_env();
G__setenv("LOCATION_NAME", location);
stat = G__mapset_permissions(mapset);
if (stat > 0) {
G__setenv("MAPSET", mapset);
- G__create_alt_search_path();
- G__switch_env();
- G__switch_search_path();
+ G_create_alt_search_path();
+ G_switch_env();
+ G_switch_search_path();
which_env = 0;
return 1;
}
@@ -46,8 +46,8 @@
int select_current_env(void)
{
if (which_env != 0) {
- G__switch_env();
- G__switch_search_path();
+ G_switch_env();
+ G_switch_search_path();
which_env = 0;
}
@@ -57,8 +57,8 @@
int select_target_env(void)
{
if (which_env != 1) {
- G__switch_env();
- G__switch_search_path();
+ G_switch_env();
+ G_switch_search_path();
which_env = 1;
}
Modified: grass/trunk/imagery/i.rectify/env.c
===================================================================
--- grass/trunk/imagery/i.rectify/env.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/imagery/i.rectify/env.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -5,11 +5,11 @@
int select_current_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 0;
}
if (which_env != 0) {
- G__switch_env();
+ G_switch_env();
which_env = 0;
}
@@ -19,11 +19,11 @@
int select_target_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 1;
}
if (which_env != 1) {
- G__switch_env();
+ G_switch_env();
which_env = 1;
}
Modified: grass/trunk/imagery/i.vpoints/target.c
===================================================================
--- grass/trunk/imagery/i.vpoints/target.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/imagery/i.vpoints/target.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -25,14 +25,14 @@
sprintf(buf, "Target location [%s] not found\n", location);
goto error;
}
- G__create_alt_env();
+ G_create_alt_env();
G__setenv("LOCATION_NAME", location);
stat = G__mapset_permissions(mapset);
if (stat > 0) {
G__setenv("MAPSET", mapset);
- G__create_alt_search_path();
- G__switch_env();
- G__switch_search_path();
+ G_create_alt_search_path();
+ G_switch_env();
+ G_switch_search_path();
which_env = 0;
return 1;
}
@@ -49,7 +49,7 @@
int select_current_env(void)
{
if (which_env != 0) {
- G__switch_env();
+ G_switch_env();
G__switch_search_path();
which_env = 0;
}
@@ -60,7 +60,7 @@
int select_target_env(void)
{
if (which_env != 1) {
- G__switch_env();
+ G_switch_env();
G__switch_search_path();
which_env = 1;
}
Modified: grass/trunk/include/defs/gis.h
===================================================================
--- grass/trunk/include/defs/gis.h 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/include/defs/gis.h 2014-05-27 09:17:02 UTC (rev 60508)
@@ -209,12 +209,12 @@
void G_unsetenv(const char *);
void G_unsetenv2(const char *, int);
void G__write_env(void);
-const char *G__env_name(int);
+const char *G_get_env_name(int);
void G__read_env(void);
void G_set_gisrc_mode(int);
int G_get_gisrc_mode(void);
-void G__create_alt_env(void);
-void G__switch_env(void);
+void G_create_alt_env(void);
+void G_switch_env(void);
/* error.c */
int G_info_format(void);
@@ -430,12 +430,12 @@
int G__mapset_permissions2(const char *, const char *, const char *);
/* mapset_nme.c */
-const char *G__mapset_name(int);
-void G_get_list_of_mapsets(void);
-void G__create_alt_search_path(void);
-void G__switch_search_path(void);
-void G_reset_mapsets(void);
-char **G_available_mapsets(void);
+const char *G_get_mapset_name(int);
+void G__get_list_of_mapsets(void);
+void G_create_alt_search_path(void);
+void G_switch_search_path(void);
+void G__reset_mapsets(void);
+char **G_get_available_mapsets(void);
void G_add_mapset_to_search_path(const char *);
int G_is_mapset_in_search_path(const char *);
Modified: grass/trunk/lib/gis/env.c
===================================================================
--- grass/trunk/lib/gis/env.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/lib/gis/env.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -3,7 +3,7 @@
\brief GIS library - environment routines
- (C) 2001-2009, 2011 by the GRASS Development Team
+ (C) 2001-2014 by the GRASS Development Team
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
@@ -458,7 +458,7 @@
\code
for (n = 0; ; n++)
- if ((name = G__env_name(n)) == NULL)
+ if ((name = G_get_env_name(n)) == NULL)
break;
\endcode
@@ -467,7 +467,7 @@
\return pointer to variable name
\return NULL not found
*/
-const char *G__env_name(int n)
+const char *G_get_env_name(int n)
{
int i;
@@ -490,7 +490,7 @@
/*!
\brief Set up alternative environment variables
*/
-void G__create_alt_env(void)
+void G_create_alt_env(void)
{
int i;
@@ -511,7 +511,7 @@
/*!
\brief Switch environments
*/
-void G__switch_env(void)
+void G_switch_env(void)
{
struct env tmp;
Modified: grass/trunk/lib/gis/find_file.c
===================================================================
--- grass/trunk/lib/gis/find_file.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/lib/gis/find_file.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -67,7 +67,7 @@
int cnt = 0;
const char *pselmapset = NULL;
- for (n = 0; (pmapset = G__mapset_name(n)); n++) {
+ for (n = 0; (pmapset = G_get_mapset_name(n)); n++) {
if (misc)
G_file_name_misc(path, dir, element, pname, pmapset);
else
Modified: grass/trunk/lib/gis/gisinit.c
===================================================================
--- grass/trunk/lib/gis/gisinit.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/lib/gis/gisinit.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -134,7 +134,7 @@
G_init_debug();
G_verbose();
G_init_tempfile();
- G_get_list_of_mapsets();
+ G__get_list_of_mapsets();
G__home();
G__machine_name();
G_whoami();
Modified: grass/trunk/lib/gis/list.c
===================================================================
--- grass/trunk/lib/gis/list.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/lib/gis/list.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -73,7 +73,7 @@
* otherwise just list the specified mapset
*/
if (mapset == 0 || *mapset == 0)
- for (n = 0; (mapset = G__mapset_name(n)); n++)
+ for (n = 0; (mapset = G_get_mapset_name(n)); n++)
count += list_element(more, element, desc, mapset, lister);
else
count += list_element(more, element, desc, mapset, lister);
Modified: grass/trunk/lib/gis/make_mapset.c
===================================================================
--- grass/trunk/lib/gis/make_mapset.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/lib/gis/make_mapset.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -71,7 +71,7 @@
perror("G_make_mapset");
return -1;
}
- G__create_alt_env();
+ G_create_alt_env();
/* Get PERMANENT default window */
G__setenv("GISDBASE", gisdbase_name);
@@ -86,7 +86,7 @@
G__put_window(&default_window, "", "WIND");
/* And switch back to original environment */
- G__switch_env();
+ G_switch_env();
return 0;
}
Modified: grass/trunk/lib/gis/mapset_nme.c
===================================================================
--- grass/trunk/lib/gis/mapset_nme.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/lib/gis/mapset_nme.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -1,9 +1,9 @@
/*!
- \file mapset_nme.c
+ \file lib/gis/mapset_nme.c
\brief GIS library - Mapset name, search path routines.
- (C) 1999-2008 The GRASS development team
+ (C) 1999-2014 The GRASS development team
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
@@ -39,9 +39,9 @@
\return mapset name
\return NULL if mapset not found
*/
-const char *G__mapset_name(int n)
+const char *G_get_mapset_name(int n)
{
- G_get_list_of_mapsets();
+ G__get_list_of_mapsets();
if (n < 0 || n >= st->path.count)
return NULL;
@@ -49,7 +49,10 @@
return st->path.names[n];
}
-void G_get_list_of_mapsets(void)
+/*!
+ \brief Fill list of mapsets from search path (internal use only)
+*/
+void G__get_list_of_mapsets(void)
{
FILE *fp;
const char *cur;
@@ -82,7 +85,7 @@
}
}
-static void new_mapset(const char *name)
+void new_mapset(const char *name)
{
if (st->path.count >= st->path.size) {
st->path.size += 10;
@@ -95,7 +98,7 @@
/*!
\brief Define alternative mapset search path
*/
-void G__create_alt_search_path(void)
+void G_create_alt_search_path(void)
{
st->path2.count = st->path.count;
st->path2.names = st->path.names;
@@ -106,7 +109,7 @@
/*!
\brief Switch mapset search path
*/
-void G__switch_search_path(void)
+void G_switch_search_path(void)
{
int count;
char **names;
@@ -132,11 +135,11 @@
/*!
\brief Get list of available mapsets for current location
- List is updated by each call to this function
+ List is updated by each call to this function.
- \return pointer to zero terminated array of available mapsets.
+ \return pointer to zero terminated array of available mapsets
*/
-char **G_available_mapsets(void)
+char **G_get_available_mapsets(void)
{
char **mapsets = NULL;
int alloc = 50;
@@ -180,12 +183,12 @@
}
/*!
- \brief Add mapset to the list of mapsets in search path.
+ \brief Add mapset to the list of mapsets in search path
Mapset is add in memory only, not to the SEARCH_PATH file!
List is check first if already exists.
- \param mapset mapset name
+ \param mapset mapset name to be added to the search path
*/
void G_add_mapset_to_search_path(const char *mapset)
{
Modified: grass/trunk/raster/r.in.gdal/main.c
===================================================================
--- grass/trunk/raster/r.in.gdal/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/raster/r.in.gdal/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -612,7 +612,7 @@
char target_mapset[GMAPSET_MAX];
/* does the target location exist? */
- G__create_alt_env();
+ G_create_alt_env();
G__setenv("LOCATION_NAME", parm.target->answer);
sprintf(target_mapset, "PERMANENT"); /* must exist */
@@ -620,7 +620,7 @@
/* create target location later */
create_target = 1;
}
- G__switch_env();
+ G_switch_env();
}
if (parm.target->answer && !create_target) {
@@ -693,14 +693,14 @@
G_adjust_Cell_head(&gcpcellhd, 1, 1);
- G__create_alt_env();
+ G_create_alt_env();
if (0 != G_make_location(parm.target->answer, &gcpcellhd,
proj_info, proj_units)) {
G_fatal_error(_("Unable to create new location <%s>"),
parm.target->answer);
}
/* switch back to import location */
- G__switch_env();
+ G_switch_env();
G_message(_("Location <%s> created"), parm.target->answer);
/* set the group's target */
@@ -785,7 +785,7 @@
/* -------------------------------------------------------------------- */
/* Change to user defined target location for GCPs transformation */
- G__create_alt_env();
+ G_create_alt_env();
G__setenv("LOCATION_NAME", (char *)pszDstLoc);
sprintf(target_mapset, "PERMANENT"); /* to find PROJ_INFO */
@@ -810,7 +810,7 @@
} /* permission check */
/* And switch back to original location */
- G__switch_env();
+ G_switch_env();
}
Modified: grass/trunk/raster/r.out.mpeg/main.c
===================================================================
--- grass/trunk/raster/r.out.mpeg/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/raster/r.out.mpeg/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -386,7 +386,7 @@
int n;
const char *mapset;
- for (n = 0; (mapset = G__mapset_name(n)); n++) {
+ for (n = 0; (mapset = G_get_mapset_name(n)); n++) {
char type_arg[GNAME_MAX];
char pattern_arg[GNAME_MAX];
char mapset_arg[GMAPSET_MAX];
Modified: grass/trunk/raster/r.proj/main.c
===================================================================
--- grass/trunk/raster/r.proj/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/raster/r.proj/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -275,7 +275,7 @@
G_fatal_error(_("Unable to get projection key values of output raster map"));
/* Change the location */
- G__create_alt_env();
+ G_create_alt_env();
G__setenv("GISDBASE", indbase->answer ? indbase->answer : G_gisdbase());
G__setenv("LOCATION_NAME", inlocation->answer);
@@ -413,7 +413,7 @@
/* And switch back to original location */
- G__switch_env();
+ G_switch_env();
/* Adjust borders of output map */
@@ -470,14 +470,14 @@
G_message(" ");
/* open and read the relevant parts of the input map and close it */
- G__switch_env();
+ G_switch_env();
Rast_set_input_window(&incellhd);
fdi = Rast_open_old(inmap->answer, setname);
cell_type = Rast_get_map_type(fdi);
ibuffer = readcell(fdi, memory->answer);
Rast_close(fdi);
- G__switch_env();
+ G_switch_env();
Rast_set_output_window(&outcellhd);
if (strcmp(interpol->answer, "nearest") == 0) {
Modified: grass/trunk/raster/r.proj/readcell.c
===================================================================
--- grass/trunk/raster/r.proj/readcell.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/raster/r.proj/readcell.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -49,9 +49,9 @@
if (nblocks < nx * ny) {
/* Temporary file must be created in output location */
- G__switch_env();
+ G_switch_env();
c->fname = G_tempfile();
- G__switch_env();
+ G_switch_env();
c->fd = open(c->fname, O_RDWR | O_CREAT | O_EXCL, 0600);
if (c->fd < 0)
G_fatal_error(_("Unable to open temporary file"));
Modified: grass/trunk/vector/v.in.lidar/main.c
===================================================================
--- grass/trunk/vector/v.in.lidar/main.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/vector/v.in.lidar/main.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -358,9 +358,9 @@
/* TODO: */
G_warning("Import into new location not yet implemented");
- /* at this point the module should be using G__create_alt_env()
+ /* at this point the module should be using G_create_alt_env()
to change context to the newly created location; once done
- it should switch back with G__switch_env(). See r.in.gdal */
+ it should switch back with G_switch_env(). See r.in.gdal */
}
else {
int err = 0;
Modified: grass/trunk/vector/v.proj/setenv.c
===================================================================
--- grass/trunk/vector/v.proj/setenv.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/vector/v.proj/setenv.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -4,11 +4,11 @@
int select_current_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 0;
}
if (which_env != 0) {
- G__switch_env();
+ G_switch_env();
which_env = 0;
}
@@ -18,11 +18,11 @@
int select_target_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 1;
}
if (which_env != 1) {
- G__switch_env();
+ G_switch_env();
which_env = 1;
}
Modified: grass/trunk/vector/v.rectify/env.c
===================================================================
--- grass/trunk/vector/v.rectify/env.c 2014-05-27 08:42:18 UTC (rev 60507)
+++ grass/trunk/vector/v.rectify/env.c 2014-05-27 09:17:02 UTC (rev 60508)
@@ -8,11 +8,11 @@
int select_current_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 0;
}
if (which_env != 0) {
- G__switch_env();
+ G_switch_env();
which_env = 0;
}
@@ -22,11 +22,11 @@
int select_target_env(void)
{
if (which_env < 0) {
- G__create_alt_env();
+ G_create_alt_env();
which_env = 1;
}
if (which_env != 1) {
- G__switch_env();
+ G_switch_env();
which_env = 1;
}
More information about the grass-commit
mailing list