Browse Source

libgis: G__mapset_permissions -> G_mapset_permissions
update modules
(merge r63837-8 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63840 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 years ago
parent
commit
fd7056837b

+ 1 - 1
general/g.list/main.c

@@ -300,7 +300,7 @@ int main(int argc, char *argv[])
 	    }
 	    else if (strcmp(mapset, ".") == 0)
 		mapset = G_mapset();
-	    else if (G__mapset_permissions(mapset) == -1)
+	    else if (G_mapset_permissions(mapset) == -1)
 		G_fatal_error(_("Mapset <%s> does not exist"), mapset);
 	    G_add_mapset_to_search_path(mapset);
 	}

+ 2 - 2
general/g.mapset/main.c

@@ -131,7 +131,7 @@ int main(int argc, char *argv[])
 	ms = G_get_available_mapsets();
 
 	for (nmapsets = 0; ms[nmapsets]; nmapsets++) {
-	    if (G__mapset_permissions(ms[nmapsets]) > 0) {
+	    if (G_mapset_permissions(ms[nmapsets]) > 0) {
 		fprintf(stdout, "%s ", ms[nmapsets]);
 	    }
 	}
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
     /* Check if the mapset exists and user is owner */
     G_debug(2, "check : %s", mapset_new_path);
 
-    ret = G__mapset_permissions2(gisdbase_new, location_new, mapset_new);
+    ret = G_mapset_permissions2(gisdbase_new, location_new, mapset_new);
     switch (ret) {
     case 0:
 	G_fatal_error(_("You don't have permission to use the mapset <%s>"),

+ 2 - 2
general/g.mapsets/main.c

@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
         cur_found = FALSE;
         for (ptr = opt.mapset->answers; *ptr != NULL; ptr++) {
             mapset = substitute_mapset(*ptr);
-            if (G__mapset_permissions(mapset) < 0)
+            if (G_mapset_permissions(mapset) < 0)
                 G_fatal_error(_("Mapset <%s> not found"), mapset);
             if (strcmp(mapset, cur_mapset) == 0)
                 cur_found = TRUE;
@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
                 continue;
             }
             
-            if (G__mapset_permissions(mapset) < 0)
+            if (G_mapset_permissions(mapset) < 0)
                 G_fatal_error(_("Mapset <%s> not found"), mapset);
             else
                 G_verbose_message(_("Mapset <%s> added to search path"),

+ 1 - 1
general/g.setproj/main.c

@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
 
     /* get the output projection parameters, if existing */
     /* Check for ownership here */
-    stat = G__mapset_permissions(set_name);
+    stat = G_mapset_permissions(set_name);
     if (stat == 0) {
 	G_fatal_error(_("PERMANENT: permission denied"));
     }

+ 1 - 1
imagery/i.ortho.photo/i.ortho.elev/main.c

@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
     G_create_alt_env();
     G_setenv_nogisrc("LOCATION_NAME", location);
 
-    stat = G__mapset_permissions(mapset);
+    stat = G_mapset_permissions(mapset);
     if (stat > 0) {
 	G_setenv_nogisrc("MAPSET", mapset);
 	G_create_alt_search_path();

+ 1 - 1
imagery/i.ortho.photo/i.ortho.rectify/target.c

@@ -21,7 +21,7 @@ int get_target(char *group)
     }
     select_target_env();
     G_setenv_nogisrc("LOCATION_NAME", location);
-    stat = G__mapset_permissions(mapset);
+    stat = G_mapset_permissions(mapset);
     if (stat > 0) {
 	G_setenv_nogisrc("MAPSET", mapset);
 	G_get_window(&target_window);

+ 1 - 1
imagery/i.rectify/target.c

@@ -22,7 +22,7 @@ int get_target(char *group)
     }
     select_target_env();
     G_setenv_nogisrc("LOCATION_NAME", location);
-    stat = G__mapset_permissions(mapset);
+    stat = G_mapset_permissions(mapset);
     if (stat > 0) {
 	G_setenv_nogisrc("MAPSET", mapset);
 	G_get_window(&target_window);

+ 2 - 2
include/defs/gis.h

@@ -446,8 +446,8 @@ char *G_mapset_path(void);
 /* mapset_msc.c */
 int G__make_mapset_element(const char *);
 int G__make_mapset_element_misc(const char *, const char *);
-int G__mapset_permissions(const char *);
-int G__mapset_permissions2(const char *, const char *, const char *);
+int G_mapset_permissions(const char *);
+int G_mapset_permissions2(const char *, const char *, const char *);
 
 /* mapset_nme.c */
 const char *G_get_mapset_name(int);

+ 1 - 1
lib/gis/gisinit.c

@@ -57,7 +57,7 @@ void G__gisinit(const char *version, const char *pgm)
     /* Make sure location and mapset are set */
     G_location_path();
     mapset = G_mapset();
-    switch (G__mapset_permissions(mapset)) {
+    switch (G_mapset_permissions(mapset)) {
     case 1:
 	break;
     case 0:

+ 2 - 2
lib/gis/mapset_msc.c

@@ -113,7 +113,7 @@ static int check_owner(const struct stat *info)
    \return 0 mapset exists, BUT user denied permission
    \return -1 mapset does not exist
  */
-int G__mapset_permissions(const char *mapset)
+int G_mapset_permissions(const char *mapset)
 {
     char path[GPATH_MAX];
     struct stat info;
@@ -142,7 +142,7 @@ int G__mapset_permissions(const char *mapset)
    \return 0 mapset exists, BUT user denied permission
    \return -1 mapset does not exist
  */
-int G__mapset_permissions2(const char *gisdbase, const char *location,
+int G_mapset_permissions2(const char *gisdbase, const char *location,
 			   const char *mapset)
 {
     char path[GPATH_MAX];

+ 2 - 2
lib/gis/mapset_nme.c

@@ -73,14 +73,14 @@ void G__get_list_of_mapsets(void)
 	while (fscanf(fp, "%s", name) == 1) {
 	    if (strcmp(name, cur) == 0)
 		continue;
-	    if (G__mapset_permissions(name) >= 0)
+	    if (G_mapset_permissions(name) >= 0)
 		new_mapset(name);
 	}
 	fclose(fp);
     }
     else {
 	static const char perm[] = "PERMANENT";
-	if (strcmp(perm, cur) != 0 && G__mapset_permissions(perm) >= 0)
+	if (strcmp(perm, cur) != 0 && G_mapset_permissions(perm) >= 0)
 	    new_mapset(perm);
     }
 }

+ 1 - 1
lib/temporal/lib/connect.c

@@ -95,7 +95,7 @@ static char *get_mapset_connection_name(const char *mapset, int contype)
     const char *location = G_getenv_nofatal("LOCATION_NAME");
     int ret;
 
-    ret = G__mapset_permissions2(gisdbase, location, mapset);
+    ret = G_mapset_permissions2(gisdbase, location, mapset);
     switch (ret) {
     case 0:
         G_warning(_("You don't have permission to access the mapset <%s>"),

+ 2 - 2
raster/r.in.gdal/main.c

@@ -652,7 +652,7 @@ int main(int argc, char *argv[])
 		G_setenv_nogisrc("LOCATION_NAME", parm.target->answer);
 		sprintf(target_mapset, "PERMANENT");	/* must exist */
 
-		if (G__mapset_permissions(target_mapset) == -1) {
+		if (G_mapset_permissions(target_mapset) == -1) {
 		    /* create target location later */
 		    create_target = 1;
 		}
@@ -825,7 +825,7 @@ static void SetupReprojector(const char *pszSrcWKT, const char *pszDstLoc,
     G_setenv_nogisrc("LOCATION_NAME", (char *)pszDstLoc);
     sprintf(target_mapset, "PERMANENT");	/* to find PROJ_INFO */
 
-    permissions = G__mapset_permissions(target_mapset);
+    permissions = G_mapset_permissions(target_mapset);
     if (permissions >= 0) {
 
 	/* Get projection info from target location */

+ 1 - 1
raster/r.proj/main.c

@@ -281,7 +281,7 @@ int main(int argc, char **argv)
     G_setenv_nogisrc("GISDBASE", indbase->answer ? indbase->answer : G_gisdbase());
     G_setenv_nogisrc("LOCATION_NAME", inlocation->answer);
 
-    permissions = G__mapset_permissions(setname);
+    permissions = G_mapset_permissions(setname);
     if (permissions < 0)	/* can't access mapset       */
 	G_fatal_error(_("Mapset <%s> in input location <%s> - %s"),
 		      setname, inlocation->answer,

+ 1 - 1
vector/v.proj/main.c

@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
     select_target_env();
     G_setenv_nogisrc("GISDBASE", gbase);
     G_setenv_nogisrc("LOCATION_NAME", iloc_name);
-    stat = G__mapset_permissions(iset_name);
+    stat = G_mapset_permissions(iset_name);
     
     if (stat >= 0) {		/* yes, we can access the mapset */
 	/* if requested, list the vector maps in source location - MN 5/2001 */

+ 1 - 1
vector/v.rectify/target.c

@@ -31,7 +31,7 @@ int get_target(char *group)
     }
     select_target_env();
     G_setenv_nogisrc("LOCATION_NAME", location);
-    stat = G__mapset_permissions(mapset);
+    stat = G_mapset_permissions(mapset);
     if (stat > 0) {
 	G_setenv_nogisrc("MAPSET", mapset);
 	select_current_env();