[GRASS-SVN] r45071 - in grass/trunk: db/drivers/dbf
general/g.access general/g.filename general/g.findfile
general/g.mlist general/g.mremove general/g.proj
general/g.remove general/g.setproj imagery/i.find
imagery/i.ortho.photo/lib include lib/g3d lib/gis lib/init
lib/manage lib/raster lib/vector/Vlib raster/r.null
raster/r.support vector/v.proj
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 17 14:02:52 EST 2011
Author: martinl
Date: 2011-01-17 11:02:52 -0800 (Mon, 17 Jan 2011)
New Revision: 45071
Modified:
grass/trunk/db/drivers/dbf/table.c
grass/trunk/general/g.access/main.c
grass/trunk/general/g.filename/main.c
grass/trunk/general/g.findfile/main.c
grass/trunk/general/g.mlist/main.c
grass/trunk/general/g.mremove/check_reclass.c
grass/trunk/general/g.mremove/main.c
grass/trunk/general/g.proj/output.c
grass/trunk/general/g.remove/main.c
grass/trunk/general/g.setproj/main.c
grass/trunk/imagery/i.find/main.c
grass/trunk/imagery/i.ortho.photo/lib/ls_cameras.c
grass/trunk/imagery/i.ortho.photo/lib/ls_elev.c
grass/trunk/include/gisdefs.h
grass/trunk/lib/g3d/filename.c
grass/trunk/lib/g3d/g3dwindowio.c
grass/trunk/lib/gis/file_name.c
grass/trunk/lib/gis/find_file.c
grass/trunk/lib/gis/get_ellipse.c
grass/trunk/lib/gis/get_projinfo.c
grass/trunk/lib/gis/list.c
grass/trunk/lib/gis/make_loc.c
grass/trunk/lib/gis/mapset_msc.c
grass/trunk/lib/gis/myname.c
grass/trunk/lib/gis/open.c
grass/trunk/lib/gis/open_misc.c
grass/trunk/lib/gis/remove.c
grass/trunk/lib/gis/rename.c
grass/trunk/lib/gis/tempfile.c
grass/trunk/lib/init/clean_temp.c
grass/trunk/lib/manage/do_copy.c
grass/trunk/lib/manage/empty.c
grass/trunk/lib/raster/close.c
grass/trunk/lib/raster/gdal.c
grass/trunk/lib/raster/open.c
grass/trunk/lib/raster/reclass.c
grass/trunk/lib/vector/Vlib/build.c
grass/trunk/lib/vector/Vlib/cindex.c
grass/trunk/lib/vector/Vlib/close.c
grass/trunk/lib/vector/Vlib/close_ogr.c
grass/trunk/lib/vector/Vlib/header.c
grass/trunk/lib/vector/Vlib/map.c
grass/trunk/lib/vector/Vlib/open.c
grass/trunk/lib/vector/Vlib/open_nat.c
grass/trunk/raster/r.null/main.c
grass/trunk/raster/r.support/main.c
grass/trunk/vector/v.proj/main.c
Log:
G__find_name* renamed to G_find_file* (used outside of the library)
Modified: grass/trunk/db/drivers/dbf/table.c
===================================================================
--- grass/trunk/db/drivers/dbf/table.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/db/drivers/dbf/table.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -232,7 +232,7 @@
/* Construct our temp name because shapelib doesn't like '.' in name */
G__temp_element(element);
sprintf(fname, "%d.dbf", getpid());
- G__file_name(name, element, fname, G_mapset());
+ G_file_name(name, element, fname, G_mapset());
G_debug(2, "Write table to tempfile: '%s'", name);
dbf = DBFCreate(name);
Modified: grass/trunk/general/g.access/main.c
===================================================================
--- grass/trunk/general/g.access/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.access/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -60,7 +60,7 @@
#endif
/* get the unix file name for the mapset directory */
- G__file_name(path, "", "", G_mapset());
+ G_file_name(path, "", "", G_mapset());
/* this part is until PERMANENT no longer holds DEFAULT_WIND and MYNAME */
if (strcmp(G_mapset(), "PERMANENT") == 0)
Modified: grass/trunk/general/g.filename/main.c
===================================================================
--- grass/trunk/general/g.filename/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.filename/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -75,7 +75,7 @@
mapset = G_mapset();
G__make_mapset_element(element);
- G__file_name(path, element, name, mapset);
+ G_file_name(path, element, name, mapset);
fprintf(stdout, "file='%s'\n", path);
exit(EXIT_SUCCESS);
Modified: grass/trunk/general/g.findfile/main.c
===================================================================
--- grass/trunk/general/g.findfile/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.findfile/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -99,7 +99,7 @@
const char *qchar = n_flag->answer ? "" : "'";
const char *qual = G_fully_qualified_name(name, mapset);
G_unqualified_name(name, mapset, xname, xmapset);
- G__file_name(file, elem_opt->answer, name, mapset);
+ G_file_name(file, elem_opt->answer, name, mapset);
fprintf(stdout, "name=%s%s%s\n", qchar, xname, qchar);
fprintf(stdout, "mapset=%s%s%s\n", qchar, xmapset, qchar);
fprintf(stdout, "fullname=%s%s%s\n", qchar, qual, qchar);
Modified: grass/trunk/general/g.mlist/main.c
===================================================================
--- grass/trunk/general/g.mlist/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.mlist/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -259,7 +259,7 @@
return;
}
- G__file_name(path, element, "", mapset);
+ G_file_name(path, element, "", mapset);
if (access(path, 0) != 0)
return;
Modified: grass/trunk/general/g.mremove/check_reclass.c
===================================================================
--- grass/trunk/general/g.mremove/check_reclass.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.mremove/check_reclass.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -36,7 +36,7 @@
if (p)
*p = '\0';
- G__file_name_misc(path, "cell_misc", "reclassed_to", rname, rmapset);
+ G_file_name_misc(path, "cell_misc", "reclassed_to", rname, rmapset);
if (nrmaps == 1 && !G_strcasecmp(rmaps[0], qname)) {
Modified: grass/trunk/general/g.mremove/main.c
===================================================================
--- grass/trunk/general/g.mremove/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.mremove/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -119,7 +119,7 @@
for (n = 0; n < nlist; n++) {
if (opt[n]->answers) {
- G__file_name(path, list[n].element[0], "", mapset);
+ G_file_name(path, list[n].element[0], "", mapset);
if (access(path, 0) != 0)
continue;
rast = !G_strcasecmp(list[n].alias, "rast");
Modified: grass/trunk/general/g.proj/output.c
===================================================================
--- grass/trunk/general/g.proj/output.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.proj/output.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -197,12 +197,12 @@
/* Write out the PROJ_INFO, and PROJ_UNITS if available. */
if (projinfo != NULL) {
- G__file_name(path, "", "PROJ_INFO", "PERMANENT");
+ G_file_name(path, "", "PROJ_INFO", "PERMANENT");
G_write_key_value_file(path, projinfo);
}
if (projunits != NULL) {
- G__file_name(path, "", "PROJ_UNITS", "PERMANENT");
+ G_file_name(path, "", "PROJ_UNITS", "PERMANENT");
G_write_key_value_file(path, projunits);
}
Modified: grass/trunk/general/g.remove/main.c
===================================================================
--- grass/trunk/general/g.remove/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.remove/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -55,7 +55,7 @@
if (p)
*p = '\0';
- G__file_name_misc(path, "cell_misc", "reclassed_to", rname, rmapset);
+ G_file_name_misc(path, "cell_misc", "reclassed_to", rname, rmapset);
if (nrmaps == 1 && !G_strcasecmp(rmaps[0], qname)) {
Modified: grass/trunk/general/g.setproj/main.c
===================================================================
--- grass/trunk/general/g.setproj/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/general/g.setproj/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -92,7 +92,7 @@
* init_unit_table();
***/
sprintf(set_name, "PERMANENT");
- G__file_name(path, "", PROJECTION_FILE, set_name);
+ G_file_name(path, "", PROJECTION_FILE, set_name);
/* get the output projection parameters, if existing */
/* Check for ownership here */
@@ -502,7 +502,7 @@
G_free_key_value(old_proj_keys);
write_units:
- G__file_name(path, "", UNIT_FILE, set_name);
+ G_file_name(path, "", UNIT_FILE, set_name);
/* if we got this far, the user
** already affirmed to write over old info
Modified: grass/trunk/imagery/i.find/main.c
===================================================================
--- grass/trunk/imagery/i.find/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/imagery/i.find/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -117,7 +117,7 @@
struct dirent *dp;
DIR *dfd;
- G__file_name(dir, element, "", mapset);
+ G_file_name(dir, element, "", mapset);
if ((dfd = opendir(dir)) == NULL)
continue;
Modified: grass/trunk/imagery/i.ortho.photo/lib/ls_cameras.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/lib/ls_cameras.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/imagery/i.ortho.photo/lib/ls_cameras.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -32,7 +32,7 @@
any = 0;
strcpy(buf, "cd ");
- G__file_name(buf + strlen(buf), element, "", G_mapset());
+ G_file_name(buf + strlen(buf), element, "", G_mapset());
strcat(buf, ";ls");
if (!full)
strcat(buf, " -C");
Modified: grass/trunk/imagery/i.ortho.photo/lib/ls_elev.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/lib/ls_elev.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/imagery/i.ortho.photo/lib/ls_elev.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -30,7 +30,7 @@
any = 0;
strcpy(buf, "cd ");
- G__file_name(buf + strlen(buf), element, " ", " ");
+ G_file_name(buf + strlen(buf), element, " ", " ");
strcat(buf, ";ls");
strcat(buf, " -C");
if (ls = popen(buf, "r")) {
Modified: grass/trunk/include/gisdefs.h
===================================================================
--- grass/trunk/include/gisdefs.h 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/include/gisdefs.h 2011-01-17 19:02:52 UTC (rev 45071)
@@ -213,9 +213,9 @@
void G_init_logging(void);
/* file_name.c */
-char *G__file_name(char *, const char *, const char *, const char *);
-char *G__file_name_misc(char *, const char *, const char *, const char *,
- const char *);
+char *G_file_name(char *, const char *, const char *, const char *);
+char *G_file_name_misc(char *, const char *, const char *, const char *,
+ const char *);
/* find_cell.c */
const char *G_find_raster(char *, const char *);
Modified: grass/trunk/lib/g3d/filename.c
===================================================================
--- grass/trunk/lib/g3d/filename.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/g3d/filename.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -10,5 +10,5 @@
G3d_filename(char *path, const char *elementName, const char *mapName,
const char *mapset)
{
- G__file_name_misc(path, G3D_DIRECTORY, elementName, mapName, mapset);
+ G_file_name_misc(path, G3D_DIRECTORY, elementName, mapName, mapset);
}
Modified: grass/trunk/lib/g3d/g3dwindowio.c
===================================================================
--- grass/trunk/lib/g3d/g3dwindowio.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/g3d/g3dwindowio.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -63,7 +63,7 @@
char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
if (windowName == NULL) {
- G__file_name(path, "", G3D_WINDOW_ELEMENT, G_mapset());
+ G_file_name(path, "", G3D_WINDOW_ELEMENT, G_mapset());
return;
}
@@ -76,11 +76,11 @@
}
if (G_name_is_fully_qualified(windowName, xname, xmapset)) {
- G__file_name(path, G3D_WINDOW_DATABASE, xname, xmapset);
+ G_file_name(path, G3D_WINDOW_DATABASE, xname, xmapset);
return;
}
- G__file_name(path, G3D_WINDOW_DATABASE, windowName, G_mapset());
+ G_file_name(path, G3D_WINDOW_DATABASE, windowName, G_mapset());
}
/*---------------------------------------------------------------------------*/
@@ -96,7 +96,7 @@
char *p, *slash;
if (windowName == NULL) {
- G__file_name (path, "", "", G_mapset ());
+ G_file_name (path, "", "", G_mapset ());
return;
}
@@ -104,9 +104,9 @@
if ((*windowName != '/') && (*windowName != '.')) {
if (G_name_is_fully_qualified (windowName, xname, xmapset))
- G__file_name (path, G3D_WINDOW_DATABASE, xname, xmapset);
+ G_file_name (path, G3D_WINDOW_DATABASE, xname, xmapset);
else
- G__file_name (path, G3D_WINDOW_DATABASE, windowName, G_mapset ());
+ G_file_name (path, G3D_WINDOW_DATABASE, windowName, G_mapset ());
} else
sprintf (path, windowName);
p = path;
Modified: grass/trunk/lib/gis/file_name.c
===================================================================
--- grass/trunk/lib/gis/file_name.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/file_name.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -30,7 +30,7 @@
\return pointer to <i>path</i>
*/
-char *G__file_name(char *path,
+char *G_file_name(char *path,
const char *element, const char *name, const char *mapset)
{
char xname[GNAME_MAX];
@@ -67,7 +67,7 @@
return path;
}
-char *G__file_name_misc(char *path,
+char *G_file_name_misc(char *path,
const char *dir,
const char *element,
const char *name, const char *mapset)
Modified: grass/trunk/lib/gis/find_file.c
===================================================================
--- grass/trunk/lib/gis/find_file.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/find_file.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -70,9 +70,9 @@
for (n = 0; (pmapset = G__mapset_name(n)); n++) {
if (misc)
- G__file_name_misc(path, dir, element, pname, pmapset);
+ G_file_name_misc(path, dir, element, pname, pmapset);
else
- G__file_name(path, element, pname, pmapset);
+ G_file_name(path, element, pname, pmapset);
if (access(path, 0) == 0) {
if (!pselmapset)
pselmapset = pmapset;
@@ -99,9 +99,9 @@
*/
else {
if (misc)
- G__file_name_misc(path, dir, element, pname, pmapset);
+ G_file_name_misc(path, dir, element, pname, pmapset);
else
- G__file_name(path, element, pname, pmapset);
+ G_file_name(path, element, pname, pmapset);
if (access(path, 0) == 0)
return G_store(pmapset);
Modified: grass/trunk/lib/gis/get_ellipse.c
===================================================================
--- grass/trunk/lib/gis/get_ellipse.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/get_ellipse.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -72,7 +72,7 @@
proj_keys = NULL;
- G__file_name(ipath, "", PROJECTION_FILE, PERMANENT);
+ G_file_name(ipath, "", PROJECTION_FILE, PERMANENT);
if (access(ipath, 0) != 0) {
*a = 6378137.0;
Modified: grass/trunk/lib/gis/get_projinfo.c
===================================================================
--- grass/trunk/lib/gis/get_projinfo.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/get_projinfo.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -27,7 +27,7 @@
struct Key_Value *in_units_keys;
char path[GPATH_MAX];
- G__file_name(path, "", UNIT_FILE, PERMANENT);
+ G_file_name(path, "", UNIT_FILE, PERMANENT);
if (access(path, 0) != 0) {
if (G_projection() != PROJECTION_XY) {
G_warning(_("<%s> file not found for location <%s>"),
@@ -50,7 +50,7 @@
struct Key_Value *in_proj_keys;
char path[GPATH_MAX];
- G__file_name(path, "", PROJECTION_FILE, PERMANENT);
+ G_file_name(path, "", PROJECTION_FILE, PERMANENT);
if (access(path, 0) != 0) {
if (G_projection() != PROJECTION_XY) {
G_warning(_("<%s> file not found for location <%s>"),
Modified: grass/trunk/lib/gis/list.c
===================================================================
--- grass/trunk/lib/gis/list.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/list.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -115,7 +115,7 @@
*
* if lister() routine is given, the ls command must give 1 name
*/
- G__file_name(path, element, "", mapset);
+ G_file_name(path, element, "", mapset);
if (access(path, 0) != 0) {
fprintf(out, "\n");
return count;
Modified: grass/trunk/lib/gis/make_loc.c
===================================================================
--- grass/trunk/lib/gis/make_loc.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/make_loc.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -68,12 +68,12 @@
/* Write out the PROJ_INFO, and PROJ_UNITS if available. */
if (proj_info != NULL) {
- G__file_name(path, "", "PROJ_INFO", "PERMANENT");
+ G_file_name(path, "", "PROJ_INFO", "PERMANENT");
G_write_key_value_file(path, proj_info);
}
if (proj_units != NULL) {
- G__file_name(path, "", "PROJ_UNITS", "PERMANENT");
+ G_file_name(path, "", "PROJ_UNITS", "PERMANENT");
G_write_key_value_file(path, proj_units);
}
Modified: grass/trunk/lib/gis/mapset_msc.c
===================================================================
--- grass/trunk/lib/gis/mapset_msc.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/mapset_msc.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -42,7 +42,7 @@
if (*element == 0)
return 0;
- G__file_name(p = path, "", "", G_mapset());
+ G_file_name(p = path, "", "", G_mapset());
while (*p)
p++;
/* add trailing slash if missing */
@@ -102,7 +102,7 @@
char path[GPATH_MAX];
STRUCT_STAT info;
- G__file_name(path, "", "", mapset);
+ G_file_name(path, "", "", mapset);
if (G_stat(path, &info) != 0)
return -1;
Modified: grass/trunk/lib/gis/myname.c
===================================================================
--- grass/trunk/lib/gis/myname.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/myname.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -37,7 +37,7 @@
ok = 0;
- G__file_name(path, "", "MYNAME", "PERMANENT");
+ G_file_name(path, "", "MYNAME", "PERMANENT");
if ((fd = fopen(path, "r"))) {
ok = G_getl(name, sizeof name, fd);
fclose(fd);
Modified: grass/trunk/lib/gis/open.c
===================================================================
--- grass/trunk/lib/gis/open.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/open.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -72,7 +72,7 @@
if (!mapset)
return -1;
- G__file_name(path, element, name, mapset);
+ G_file_name(path, element, name, mapset);
return open(path, 0);
}
@@ -91,7 +91,7 @@
if (G_legal_filename(name) == -1)
return -1;
- G__file_name(path, element, name, mapset);
+ G_file_name(path, element, name, mapset);
if (mode == 1 || access(path, 0) != 0) {
G__make_mapset_element(element);
Modified: grass/trunk/lib/gis/open_misc.c
===================================================================
--- grass/trunk/lib/gis/open_misc.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/open_misc.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -55,7 +55,7 @@
if (!mapset)
return -1;
- G__file_name_misc(path, dir, element, name, mapset);
+ G_file_name_misc(path, dir, element, name, mapset);
return open(path, 0);
}
@@ -74,7 +74,7 @@
if (G_legal_filename(name) == -1)
return -1;
- G__file_name_misc(path, dir, element, name, mapset);
+ G_file_name_misc(path, dir, element, name, mapset);
if (mode == 1 || access(path, 0) != 0) {
G__make_mapset_element_misc(dir, name);
close(creat(path, 0666));
Modified: grass/trunk/lib/gis/remove.c
===================================================================
--- grass/trunk/lib/gis/remove.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/remove.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -87,9 +87,9 @@
return -1;
if (misc)
- G__file_name_misc(path, dir, element, name, mapset);
+ G_file_name_misc(path, dir, element, name, mapset);
else
- G__file_name(path, element, name, mapset);
+ G_file_name(path, element, name, mapset);
/* if file does not exist, return 0 */
if (access(path, 0) != 0)
Modified: grass/trunk/lib/gis/rename.c
===================================================================
--- grass/trunk/lib/gis/rename.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/rename.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -72,10 +72,10 @@
return -1;
/* if file does not exist return 0 */
- if (access(G__file_name(from, element, oldname, mapset), 0) != 0)
+ if (access(G_file_name(from, element, oldname, mapset), 0) != 0)
return 0;
- G__file_name(to, element, newname, mapset);
+ G_file_name(to, element, newname, mapset);
/* return result of rename */
return G_rename_file(from, to) == 0 ? 1 : -1;
Modified: grass/trunk/lib/gis/tempfile.c
===================================================================
--- grass/trunk/lib/gis/tempfile.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/gis/tempfile.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -81,7 +81,7 @@
do {
int uniq = G_counter_next(&unique);
sprintf(name, "%d.%d", pid, uniq);
- G__file_name(path, element, name, G_mapset());
+ G_file_name(path, element, name, G_mapset());
}
while (access(path, F_OK) == 0);
Modified: grass/trunk/lib/init/clean_temp.c
===================================================================
--- grass/trunk/lib/init/clean_temp.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/init/clean_temp.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -137,7 +137,7 @@
/* Get the mapset temp directory */
G__temp_element(element);
- G__file_name(tmppath, element, "", mapset = G_mapset());
+ G_file_name(tmppath, element, "", mapset = G_mapset());
/* get user id and current time in seconds */
#ifdef __MINGW32__
Modified: grass/trunk/lib/manage/do_copy.c
===================================================================
--- grass/trunk/lib/manage/do_copy.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/manage/do_copy.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -34,7 +34,7 @@
else {
for (i = 0; i < list[n].nelem; i++) {
G__make_mapset_element(list[n].element[i]);
- G__file_name(path, list[n].element[i], old, mapset);
+ G_file_name(path, list[n].element[i], old, mapset);
if (access(path, 0) != 0) {
G_remove(list[n].element[i], new);
if (G_verbose() == G_verbose_max())
@@ -42,7 +42,7 @@
continue;
}
- G__file_name(path2, list[n].element[i], new, G_mapset());
+ G_file_name(path2, list[n].element[i], new, G_mapset());
if (G_recursive_copy(path, path2) == 1) {
result = 1;
}
Modified: grass/trunk/lib/manage/empty.c
===================================================================
--- grass/trunk/lib/manage/empty.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/manage/empty.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -10,7 +10,7 @@
char dir[1024];
int any;
- G__file_name(dir, elem, "", G_mapset());
+ G_file_name(dir, elem, "", G_mapset());
any = 0;
if ((dirp = opendir(dir)) != NULL) {
Modified: grass/trunk/lib/raster/close.c
===================================================================
--- grass/trunk/lib/raster/close.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/raster/close.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -227,7 +227,7 @@
}
else {
/* remove cell_misc/name/f_quant */
- G__file_name_misc(path, "cell_misc", QUANT_FILE, fcb->name,
+ G_file_name_misc(path, "cell_misc", QUANT_FILE, fcb->name,
fcb->mapset);
remove(path);
}
@@ -275,13 +275,13 @@
/* create path : full null file name */
G__make_mapset_element_misc("cell_misc", fcb->name);
- G__file_name_misc(path, "cell_misc", NULL_FILE, fcb->name,
+ G_file_name_misc(path, "cell_misc", NULL_FILE, fcb->name,
G_mapset());
remove(path);
/* write 0-length cell file */
G__make_mapset_element("cell");
- G__file_name(path, "cell", fcb->name, fcb->mapset);
+ G_file_name(path, "cell", fcb->name, fcb->mapset);
cell_fd = creat(path, 0666);
close(cell_fd);
@@ -290,16 +290,16 @@
/* write 0-length fcell file */
G__make_mapset_element("fcell");
- G__file_name(path, "fcell", fcb->name, fcb->mapset);
+ G_file_name(path, "fcell", fcb->name, fcb->mapset);
cell_fd = creat(path, 0666);
close(cell_fd);
}
else {
/* remove fcell/name file */
- G__file_name(path, "fcell", fcb->name, fcb->mapset);
+ G_file_name(path, "fcell", fcb->name, fcb->mapset);
remove(path);
/* remove cell_misc/name/f_format */
- G__file_name_misc(path, "cell_misc", FORMAT_FILE, fcb->name,
+ G_file_name_misc(path, "cell_misc", FORMAT_FILE, fcb->name,
fcb->mapset);
remove(path);
}
@@ -366,7 +366,7 @@
/* create path : full null file name */
G__make_mapset_element_misc("cell_misc", fcb->name);
- G__file_name_misc(path, "cell_misc", NULL_FILE, fcb->name,
+ G_file_name_misc(path, "cell_misc", NULL_FILE, fcb->name,
G_mapset());
remove(path);
@@ -399,17 +399,17 @@
/* now write 0-length cell file */
G__make_mapset_element("cell");
cell_fd =
- creat(G__file_name(path, "cell", fcb->name, fcb->mapset),
+ creat(G_file_name(path, "cell", fcb->name, fcb->mapset),
0666);
close(cell_fd);
CELL_DIR = "fcell";
}
else {
/* remove fcell/name file */
- G__file_name(path, "fcell", fcb->name, fcb->mapset);
+ G_file_name(path, "fcell", fcb->name, fcb->mapset);
remove(path);
/* remove cell_misc/name/f_format */
- G__file_name_misc(path, "cell_misc", FORMAT_FILE, fcb->name,
+ G_file_name_misc(path, "cell_misc", FORMAT_FILE, fcb->name,
fcb->mapset);
remove(path);
CELL_DIR = "cell";
@@ -436,7 +436,7 @@
*/
stat = 1;
if (ok && (fcb->temp_name != NULL)) {
- G__file_name(path, CELL_DIR, fcb->name, fcb->mapset);
+ G_file_name(path, CELL_DIR, fcb->name, fcb->mapset);
remove(path);
if (rename(fcb->temp_name, path)) {
G_warning(_("Unable to rename cell file '%s'"),
@@ -489,7 +489,7 @@
G_set_key_value("lzw_compression_bits", "-1", format_kv);
G__make_mapset_element_misc("cell_misc", fcb->name);
- G__file_name_misc(path, "cell_misc", FORMAT_FILE, fcb->name, fcb->mapset);
+ G_file_name_misc(path, "cell_misc", FORMAT_FILE, fcb->name, fcb->mapset);
G_write_key_value_file(path, format_kv);
G_free_key_value(format_kv);
Modified: grass/trunk/lib/raster/gdal.c
===================================================================
--- grass/trunk/lib/raster/gdal.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/raster/gdal.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -372,7 +372,7 @@
else {
char path[GPATH_MAX];
- G__file_name(path, p, "", G_mapset());
+ G_file_name(path, p, "", G_mapset());
st->opts.dir = G_store(path);
if (access(path, 0) != 0)
G__make_mapset_element(p);
Modified: grass/trunk/lib/raster/open.c
===================================================================
--- grass/trunk/lib/raster/open.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/raster/open.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -742,11 +742,11 @@
G_fatal_error(_("Raster map <%s> not found"),
G_fully_qualified_name(name, mapset));
- G__file_name(path, "fcell", name, xmapset);
+ G_file_name(path, "fcell", name, xmapset);
if (access(path, 0) == 0)
return 1;
- G__file_name(path, "g3dcell", name, xmapset);
+ G_file_name(path, "g3dcell", name, xmapset);
if (access(path, 0) == 0)
return 1;
@@ -779,12 +779,12 @@
G_fatal_error(_("Raster map <%s> not found"), name);
}
- G__file_name(path, "fcell", name, xmapset);
+ G_file_name(path, "fcell", name, xmapset);
if (access(path, 0) == 0)
return Rast__check_fp_type(name, xmapset);
- G__file_name(path, "g3dcell", name, xmapset);
+ G_file_name(path, "g3dcell", name, xmapset);
if (access(path, 0) == 0)
return DCELL_TYPE;
@@ -831,7 +831,7 @@
G_fatal_error(_("Raster map <%s> not found"),
G_fully_qualified_name(name, mapset));
- G__file_name_misc(path, "cell_misc", FORMAT_FILE, name, xmapset);
+ G_file_name_misc(path, "cell_misc", FORMAT_FILE, name, xmapset);
if (access(path, 0) != 0)
G_fatal_error(_("Unable to find '%s'"), path);
Modified: grass/trunk/lib/raster/reclass.c
===================================================================
--- grass/trunk/lib/raster/reclass.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/raster/reclass.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -320,7 +320,7 @@
if ((p = strchr(buf2, '@')))
*p = 0;
- G__file_name_misc(buf1, "cell_misc", "reclassed_to", reclass->name,
+ G_file_name_misc(buf1, "cell_misc", "reclassed_to", reclass->name,
reclass->mapset);
fd = fopen(buf1, "a+");
Modified: grass/trunk/lib/vector/Vlib/build.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/build.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -251,7 +251,7 @@
/* write out all the accumulated info to the plus file */
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(fname, buf, GV_TOPO_ELEMENT, Map->mapset);
+ G_file_name(fname, buf, GV_TOPO_ELEMENT, Map->mapset);
G_debug(1, "Open topo: %s", fname);
dig_file_init(&fp);
fp.file = fopen(fname, "w");
@@ -533,7 +533,7 @@
/* write out rtrees to sidx file */
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(fname, buf, GV_SIDX_ELEMENT, Map->mapset);
+ G_file_name(fname, buf, GV_SIDX_ELEMENT, Map->mapset);
G_debug(1, "Open sidx: %s", fname);
dig_file_init(&(plus->spidx_fp));
plus->spidx_fp.file = fopen(fname, "w+");
Modified: grass/trunk/lib/vector/Vlib/cindex.c
===================================================================
--- grass/trunk/lib/vector/Vlib/cindex.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/cindex.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -452,7 +452,7 @@
plus = &(Map->plus);
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(fname, buf, GV_CIDX_ELEMENT, Map->mapset);
+ G_file_name(fname, buf, GV_CIDX_ELEMENT, Map->mapset);
G_debug(2, "Open cidx: %s", fname);
dig_file_init(&fp);
fp.file = fopen(fname, "w");
@@ -497,7 +497,7 @@
Plus = &(Map->plus);
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(file_path, buf, GV_CIDX_ELEMENT, Map->mapset);
+ G_file_name(file_path, buf, GV_CIDX_ELEMENT, Map->mapset);
if (access(file_path, F_OK) != 0) /* does not exist */
return 1;
Modified: grass/trunk/lib/vector/Vlib/close.c
===================================================================
--- grass/trunk/lib/vector/Vlib/close.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/close.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -79,15 +79,15 @@
/* Delete old support files if available */
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(file_path, buf, GV_TOPO_ELEMENT, G_mapset());
+ G_file_name(file_path, buf, GV_TOPO_ELEMENT, G_mapset());
if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
- G__file_name(file_path, buf, GV_SIDX_ELEMENT, G_mapset());
+ G_file_name(file_path, buf, GV_SIDX_ELEMENT, G_mapset());
if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
- G__file_name(file_path, buf, GV_CIDX_ELEMENT, G_mapset());
+ G_file_name(file_path, buf, GV_CIDX_ELEMENT, G_mapset());
if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
Modified: grass/trunk/lib/vector/Vlib/close_ogr.c
===================================================================
--- grass/trunk/lib/vector/Vlib/close_ogr.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/close_ogr.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -86,7 +86,7 @@
if (strcmp(Map->mapset, G_mapset()) == 0 && Map->support_updated &&
Map->plus.built == GV_BUILD_ALL) {
sprintf(elem, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(fname, elem, "fidx", Map->mapset);
+ G_file_name(fname, elem, "fidx", Map->mapset);
G_debug(4, "Open fidx: %s", fname);
dig_file_init(&fp);
fp.file = fopen(fname, "w");
Modified: grass/trunk/lib/vector/Vlib/header.c
===================================================================
--- grass/trunk/lib/vector/Vlib/header.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/header.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -692,6 +692,6 @@
{
char path[GPATH_MAX];
- G__file_name(path, "", file, "PERMANENT");
+ G_file_name(path, "", file, "PERMANENT");
return G_lookup_key_value_from_file(path, key, value, (int) len) == 1;
}
Modified: grass/trunk/lib/vector/Vlib/map.c
===================================================================
--- grass/trunk/lib/vector/Vlib/map.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/map.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -247,7 +247,7 @@
}
mapset = inmapset;
- /* remove mapset from fully qualified name, confuses G__file_name() */
+ /* remove mapset from fully qualified name, confuses G_file_name() */
if (G_name_is_fully_qualified(in, xname, xmapset)) {
in = xname;
}
@@ -271,9 +271,9 @@
i = 0;
while (files[i]) {
sprintf(buf, "%s/%s", in, files[i]);
- G__file_name(old_path, GV_DIRECTORY, buf, mapset);
+ G_file_name(old_path, GV_DIRECTORY, buf, mapset);
sprintf(buf, "%s/%s", out, files[i]);
- G__file_name(new_path, GV_DIRECTORY, buf, G_mapset());
+ G_file_name(new_path, GV_DIRECTORY, buf, G_mapset());
if (access(old_path, F_OK) == 0) { /* file exists? */
G_debug(2, "copy %s to %s", old_path, new_path);
@@ -285,8 +285,8 @@
i++;
}
- G__file_name(old_path, GV_DIRECTORY, in, mapset);
- G__file_name(new_path, GV_DIRECTORY, out, G_mapset());
+ G_file_name(old_path, GV_DIRECTORY, in, mapset);
+ G_file_name(new_path, GV_DIRECTORY, out, G_mapset());
/* Open input */
Vect_set_open_level(1);
Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/open.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -480,15 +480,15 @@
sprintf(buf, "%s/%s", GV_DIRECTORY, name);
- G__file_name(file_path, buf, GV_TOPO_ELEMENT, G_mapset());
+ G_file_name(file_path, buf, GV_TOPO_ELEMENT, G_mapset());
if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
- G__file_name(file_path, buf, GV_SIDX_ELEMENT, G_mapset());
+ G_file_name(file_path, buf, GV_SIDX_ELEMENT, G_mapset());
if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
- G__file_name(file_path, buf, GV_CIDX_ELEMENT, G_mapset());
+ G_file_name(file_path, buf, GV_CIDX_ELEMENT, G_mapset());
if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
}
@@ -833,7 +833,7 @@
switch (Map->format) {
case GV_FORMAT_NATIVE:
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(path, buf, GV_COOR_ELEMENT, Map->mapset);
+ G_file_name(path, buf, GV_COOR_ELEMENT, Map->mapset);
G_debug(1, "get coor info: %s", path);
if (0 != stat(path, &stat_buf)) {
G_warning(_("Unable to stat file <%s>"), path);
@@ -943,7 +943,7 @@
Plus = &(Map->plus);
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(file_path, buf, GV_TOPO_ELEMENT, Map->mapset);
+ G_file_name(file_path, buf, GV_TOPO_ELEMENT, Map->mapset);
if (access(file_path, F_OK) != 0) /* does not exist */
return 1;
@@ -1032,7 +1032,7 @@
if (mode < 2) {
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
- G__file_name(file_path, buf, GV_SIDX_ELEMENT, Map->mapset);
+ G_file_name(file_path, buf, GV_SIDX_ELEMENT, Map->mapset);
if (access(file_path, F_OK) != 0) /* does not exist */
return 1;
Modified: grass/trunk/lib/vector/Vlib/open_nat.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open_nat.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/lib/vector/Vlib/open_nat.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -119,11 +119,11 @@
/* if overwrite OK, any existing files have already been deleted by
* Vect_open_new(): remove this check ? */
/* check to see if dig_plus file exists and if so, remove it */
- G__file_name(name_buf, buf, GV_TOPO_ELEMENT, G_mapset());
+ G_file_name(name_buf, buf, GV_TOPO_ELEMENT, G_mapset());
if (access(name_buf, F_OK) == 0) /* file exists? */
unlink(name_buf);
- G__file_name(name_buf, buf, GV_COOR_ELEMENT, G_mapset());
+ G_file_name(name_buf, buf, GV_COOR_ELEMENT, G_mapset());
Map->head.size = 0;
Map->head.head_size = GV_COOR_HEAD_SIZE + 4;
Modified: grass/trunk/raster/r.null/main.c
===================================================================
--- grass/trunk/raster/r.null/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/raster/r.null/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -186,7 +186,7 @@
G_verbose_message(_("Removing null file for raster map <%s>..."),
name);
null_fd = G_open_new_misc("cell_misc", "null", name);
- G__file_name_misc(path, "cell_misc", "null", name, mapset);
+ G_file_name_misc(path, "cell_misc", "null", name, mapset);
unlink(path);
G_done_msg(_("Raster map <%s> modified."), name);
Modified: grass/trunk/raster/r.support/main.c
===================================================================
--- grass/trunk/raster/r.support/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/raster/r.support/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -309,7 +309,7 @@
G_message(_("Removing null file for [%s]...\n"), raster->answer);
null_fd = G_open_new_misc("cell_misc", "null", raster->answer);
- G__file_name_misc(path, "cell_misc", "null", raster->answer, G_mapset());
+ G_file_name_misc(path, "cell_misc", "null", raster->answer, G_mapset());
unlink(path);
close(null_fd);
Modified: grass/trunk/vector/v.proj/main.c
===================================================================
--- grass/trunk/vector/v.proj/main.c 2011-01-17 18:06:24 UTC (rev 45070)
+++ grass/trunk/vector/v.proj/main.c 2011-01-17 19:02:52 UTC (rev 45071)
@@ -160,7 +160,7 @@
/*DEBUG*/ {
char path[256];
- G__file_name(path, "", "", iset_name);
+ G_file_name(path, "", "", iset_name);
}
if (stat >= 0) { /* yes, we can access the mapset */
More information about the grass-commit
mailing list