Prechádzať zdrojové kódy

gislib G__name_is_fully_qualified() renamed to
G_name_is_fully_qualified()


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38596 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 15 rokov pred
rodič
commit
69ac420b2f

+ 1 - 1
gui/wxpython/vdigit/line.cpp

@@ -891,7 +891,7 @@ struct Map_info** Digit::OpenBackgroundVectorMap(const char *bgmap)
     nbgmaps = 0;
     BgMap = NULL;
 
-    if (!G__name_is_fully_qualified(bgmap, name, mapset)) {
+    if (!G_name_is_fully_qualified(bgmap, name, mapset)) {
 	strncpy(name, bgmap, GNAME_MAX);
 	mapset[0] = '\0';
     }

+ 1 - 1
imagery/i.class/main.c

@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
        - abort if not,
        - remove @mapset part if it is
      */
-    if (G__name_is_fully_qualified(img_grp->answer, group, grp_mapset)) {
+    if (G_name_is_fully_qualified(img_grp->answer, group, grp_mapset)) {
 	if (strcmp(grp_mapset, G_mapset()))
 	    G_fatal_error(_("Group must exist in the current mapset"));
     }

+ 3 - 3
imagery/i.group/main.c

@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
        - abort if not,
        - remove @mapset part if it is
      */
-    if (G__name_is_fully_qualified(grp->answer, group, mapset)) {
+    if (G_name_is_fully_qualified(grp->answer, group, mapset)) {
 	if (strcmp(mapset, G_mapset()))
 	    G_fatal_error(_("Group must exist in the current mapset"));
     }
@@ -290,7 +290,7 @@ static int remove_group_files(char group[INAME_LEN], char **rasters, int k)
 	    mapset = G_mapset();
 
 	    /* Parse out mapset */
-	    if (G__name_is_fully_qualified(rasters[n], xname, xmapset)) {
+	    if (G_name_is_fully_qualified(rasters[n], xname, xmapset)) {
 		strcpy(tmp_name, xname);
 		mapset = xmapset;
 	    }
@@ -347,7 +347,7 @@ static int remove_subgroup_files(char group[INAME_LEN],
 	    mapset = G_mapset();
 
 	    /* Parse out mapset */
-	    if (G__name_is_fully_qualified(rasters[n], xname, xmapset)) {
+	    if (G_name_is_fully_qualified(rasters[n], xname, xmapset)) {
 		strcpy(tmp_name, xname);
 		mapset = xmapset;
 	    }

+ 1 - 1
imagery/i.points/main.c

@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
 
     /* parse group name */
     /* only enforce local-mapset-only due to I_get_group_ref() not liking "@mapset" */
-    if (G__name_is_fully_qualified(grp->answer, group.name, xmapset)) {
+    if (G_name_is_fully_qualified(grp->answer, group.name, xmapset)) {
 	if (0 != strcmp(G_mapset(), xmapset))
 	    G_fatal_error(_("[%s] Only local groups may be used"),
 			  grp->answer);

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

@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
        - abort if not,
        - remove @mapset part if it is
      */
-    if (G__name_is_fully_qualified(group->answer, group_name, mapset_name)) {
+    if (G_name_is_fully_qualified(group->answer, group_name, mapset_name)) {
 	if (strcmp(mapset_name, G_mapset()))
 	    G_fatal_error(_("Group must exist in the current mapset"));
     }

+ 1 - 1
imagery/i.vpoints/main.c

@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
 
     /* parse group name */
     /* only enforce local-mapset-only due to I_get_group_ref() not liking "@mapset" */
-    if (G__name_is_fully_qualified(grp->answer, group.name, xmapset)) {
+    if (G_name_is_fully_qualified(grp->answer, group.name, xmapset)) {
 	if (0 != strcmp(G_mapset(), xmapset))
 	    G_fatal_error(_("[%s] Only local groups may be used"),
 			  grp->answer);

+ 1 - 1
include/gisdefs.h

@@ -411,7 +411,7 @@ const char *G_color_name(int);
 void G_newlines_to_spaces(char *);
 
 /* nme_in_mps.c */
-int G__name_is_fully_qualified(const char *, char *, char *);
+int G_name_is_fully_qualified(const char *, char *, char *);
 char *G_fully_qualified_name(const char *, const char *);
 int G_unqualified_name(const char *, const char *, char *, char *);
 

+ 1 - 1
lib/g3d/g3dregion.c

@@ -277,7 +277,7 @@ G3d_readRegionMap(const char *name, const char *mapset, G3D_Region * region)
     char fullName[GPATH_MAX];
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
 
-    if (G__name_is_fully_qualified(name, xname, xmapset))
+    if (G_name_is_fully_qualified(name, xname, xmapset))
 	G3d_filename(fullName, G3D_HEADER_ELEMENT, xname, xmapset);
     else {
 	if (!mapset || !*mapset)

+ 2 - 2
lib/g3d/g3dwindowio.c

@@ -75,7 +75,7 @@ static void G3d_getFullWindowPath(char *path, const char *windowName)
 	return;
     }
 
-    if (G__name_is_fully_qualified(windowName, xname, xmapset)) {
+    if (G_name_is_fully_qualified(windowName, xname, xmapset)) {
 	G__file_name(path, G3D_WINDOW_DATABASE, xname, xmapset);
 	return;
     }
@@ -103,7 +103,7 @@ static void G3d_getFullWindowPath(char *path, const char *windowName)
    while (*windowName == ' ') windowName++;
 
    if ((*windowName != '/') && (*windowName != '.')) {
-   if (G__name_is_fully_qualified (windowName, xname, xmapset)) 
+   if (G_name_is_fully_qualified (windowName, xname, xmapset)) 
    G__file_name (path, G3D_WINDOW_DATABASE, xname, xmapset);
    else
    G__file_name (path, G3D_WINDOW_DATABASE, windowName, G_mapset ());

+ 2 - 2
lib/gis/file_name.c

@@ -43,7 +43,7 @@ char *G__file_name(char *path,
      * must split the name into name, mapset if it is
      * in the name@mapset format
      */
-    if (name && *name && G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (name && *name && G_name_is_fully_qualified(name, xname, xmapset)) {
 	pname = xname;
 	sprintf(path, "%s/%s", location, xmapset);
     }
@@ -82,7 +82,7 @@ char *G__file_name_misc(char *path,
      * must split the name into name, mapset if it is
      * in the name@mapset format
      */
-    if (name && *name && G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (name && *name && G_name_is_fully_qualified(name, xname, xmapset)) {
 	pname = xname;
 	sprintf(path, "%s/%s", location, xmapset);
     }

+ 2 - 2
lib/gis/find_file.c

@@ -37,7 +37,7 @@ static const char *find_file(
      * if name is in the fully qualified format, split it into
      * name, mapset (overrides what was in mapset)
      */
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	pname = xname;
 	pmapset = xmapset;
     }
@@ -116,7 +116,7 @@ static const char *find_file1(
     const char *pname, *pmapset;
     const char *mp;
 
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	pname = xname;
 	pmapset = xmapset;
     }

+ 1 - 1
lib/gis/find_vect.c

@@ -81,7 +81,7 @@ const char *find_ogr(const char *name, const char *mapset)
     const char *pname, *pmapset;
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
     
-    if(G__name_is_fully_qualified(name, xname, xmapset)) {
+    if(G_name_is_fully_qualified(name, xname, xmapset)) {
 	pname = xname;
 	pmapset = xmapset;
     }

+ 1 - 1
lib/gis/legal_name.c

@@ -103,7 +103,7 @@ int G_check_input_output_name(const char *input, const char *output,
 	char nm[1000], ms[1000];
 	const char *in;
 
-	if (G__name_is_fully_qualified(input, nm, ms)) {
+	if (G_name_is_fully_qualified(input, nm, ms)) {
 	    in = nm;
 	}
 	else {

+ 2 - 2
lib/gis/nme_in_mps.c

@@ -33,7 +33,7 @@
   \return 1 if input map name is fully qualified
   \return 0 if input map name is not fully qualified
  */
-int G__name_is_fully_qualified(const char *fullname, char *name, char *mapset)
+int G_name_is_fully_qualified(const char *fullname, char *name, char *mapset)
 {
     const char *p;
     char *q;
@@ -128,7 +128,7 @@ char *G_fully_qualified_name(const char *name, const char *mapset)
 int G_unqualified_name(const char *name, const char *mapset,
 		       char *xname, char *xmapset)
 {
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (mapset && *mapset && strcmp(mapset, xmapset) != 0)
 	    return -1;
 	return 1;

+ 2 - 2
lib/gis/open.c

@@ -57,7 +57,7 @@ static int G__open(const char *element,
 
     /* READ */
     if (mode == 0) {
-	if (G__name_is_fully_qualified(name, xname, xmapset)) {
+	if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	    if (*mapset && strcmp(xmapset, mapset) != 0) {
 		G_warning(_("G__open(read): mapset <%s> doesn't match xmapset <%s>"),
 			  mapset, xmapset);
@@ -79,7 +79,7 @@ static int G__open(const char *element,
     /* WRITE */
     if (mode == 1 || mode == 2) {
 	mapset = G_mapset();
-	if (G__name_is_fully_qualified(name, xname, xmapset)) {
+	if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	    if (strcmp(xmapset, mapset) != 0) {
 		G_warning(_("G__open(write): xmapset <%s> != G_mapset() <%s>"),
 			  xmapset, mapset);

+ 2 - 2
lib/gis/open_misc.c

@@ -40,7 +40,7 @@ static int G__open_misc(const char *dir,
 
     /* READ */
     if (mode == 0) {
-	if (G__name_is_fully_qualified(name, xname, xmapset)) {
+	if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	    if (*mapset && strcmp(xmapset, mapset) != 0) {
  		G_warning(_("G__open_misc(read): mapset <%s> doesn't match xmapset <%s>"),
  			  mapset, xmapset);
@@ -62,7 +62,7 @@ static int G__open_misc(const char *dir,
     /* WRITE */
     if (mode == 1 || mode == 2) {
 	mapset = G_mapset();
-	if (G__name_is_fully_qualified(name, xname, xmapset)) {
+	if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	    if (strcmp(xmapset, mapset) != 0) {
  		G_warning(_("G__open_misc(write): xmapset <%s> != G_mapset() <%s>"),
 			  xmapset, mapset);

+ 1 - 1
lib/gis/remove.c

@@ -77,7 +77,7 @@ static int G__remove(int misc, const char *dir, const char *element,
 
     /* name in mapset legal only if mapset is current mapset */
     mapset = G_mapset();
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (strcmp(mapset, xmapset) != 0)
 	    return -1;
 	name = xname;

+ 2 - 2
lib/gis/rename.c

@@ -64,10 +64,10 @@ int G_rename(const char *element, const char *oldname, const char *newname)
 
     /* name in mapset legal only if mapset is current mapset */
     mapset = G_mapset();
-    if (G__name_is_fully_qualified(oldname, xname, xmapset)
+    if (G_name_is_fully_qualified(oldname, xname, xmapset)
 	&& strcmp(mapset, xmapset))
 	return -1;
-    if (G__name_is_fully_qualified(newname, xname, xmapset)
+    if (G_name_is_fully_qualified(newname, xname, xmapset)
 	&& strcmp(mapset, xmapset))
 	return -1;
 

+ 2 - 2
lib/imagery/sigfile.c

@@ -31,7 +31,7 @@ FILE *I_fopen_signature_file_new(const char *group,
     char group_name[GNAME_MAX], group_mapset[GMAPSET_MAX];
     FILE *fd;
 
-    if (!G__name_is_fully_qualified(group, group_name, group_mapset)) {
+    if (!G_name_is_fully_qualified(group, group_name, group_mapset)) {
 	strcpy(group_name, group);
     }
 
@@ -63,7 +63,7 @@ FILE *I_fopen_signature_file_old(const char *group,
     char group_name[GNAME_MAX], group_mapset[GMAPSET_MAX];
     FILE *fd;
 
-    if (!G__name_is_fully_qualified(group, group_name, group_mapset)) {
+    if (!G_name_is_fully_qualified(group, group_name, group_mapset)) {
 	strcpy(group_name, group);
     }
     

+ 1 - 1
lib/manage/do_remove.c

@@ -25,7 +25,7 @@ int do_remove(int n, const char *old)
 
     hold_signals(1);
 
-    if (G__name_is_fully_qualified(old, xname, xmapset)) {
+    if (G_name_is_fully_qualified(old, xname, xmapset)) {
 	if (strcmp(xmapset, G_mapset()) != 0)
 	    G_fatal_error("%s is not in the current mapset (%s)", old,
 			  G_mapset());

+ 1 - 1
lib/raster/color_remove.c

@@ -27,7 +27,7 @@ int Rast_remove_colors(const char *name, const char *mapset)
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
     int stat;
 
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (strcmp(xmapset, mapset) != 0)
 	    return -1;
 	name = xname;

+ 1 - 1
lib/raster/color_write.c

@@ -80,7 +80,7 @@ int Rast_write_colors(const char *name, const char *mapset,
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
     FILE *fd;
 
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (strcmp(xmapset, mapset) != 0)
 	    return -1;
 	name = xname;

+ 4 - 4
lib/raster/quant_io.c

@@ -14,7 +14,7 @@
  *  mapset.
  *  
  *  returns: -2 if raster map is of type integer.
- *           -1 if (! G__name_is_fully_qualified ()).
+ *           -1 if (! G_name_is_fully_qualified ()).
  *            0 if quantization file does not exist, or the file is empty, 
  *            1 if non-empty quantization file exists.
  *                 read.
@@ -48,7 +48,7 @@
  *  The rules are written in decreasing order
  *  of priority (i.e. rules added earlier are written later).
  *
- *  returns: -1 if (! G__name_is_fully_qualified) or file could not be
+ *  returns: -1 if (! G_name_is_fully_qualified) or file could not be
  *                 opened.
  *            1 otherwise.
  *
@@ -128,7 +128,7 @@ int Rast__quant_import(const char *name, const char *mapset,
 	return -2;
     }
 
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (strcmp(xmapset, mapset) != 0)
 	    return -1;
 	name = xname;
@@ -284,7 +284,7 @@ Rast__quant_export(const char *name, const char *mapset,
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
     FILE *fd;
 
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (strcmp(xmapset, mapset) != 0)
 	    return -1;
 	name = xname;

+ 1 - 1
lib/raster/quant_rw.c

@@ -213,7 +213,7 @@ int Rast_write_quant(const char *name, const char *mapset,
  *  \param q
  *
  * \return -2 if raster map is of type integer
- * \return -1 if (!G__name_is_fully_qualified())
+ * \return -1 if (!G_name_is_fully_qualified())
  * \return 0 if quantization file does not exist, or the file is empty or has wrong format
  * \return 1 if non-empty quantization file exists
  *

+ 1 - 1
lib/vector/Vlib/legal_vname.c

@@ -127,7 +127,7 @@ int Vect_check_input_output_name(const char *input, const char *output,
 	const char *in;
 	char nm[GNAME_MAX], ms[GMAPSET_MAX];
 
-	if (G__name_is_fully_qualified(input, nm, ms)) {
+	if (G_name_is_fully_qualified(input, nm, ms)) {
 	    in = nm;
 	}
 	else {

+ 3 - 3
lib/vector/Vlib/map.c

@@ -184,7 +184,7 @@ Vect_copy(const char *in, const char *mapset, const char *out)
     mapset = inmapset;
 
     /* remove mapset from fully qualified name, confuses G__file_name() */
-    if (G__name_is_fully_qualified(in, xname, xmapset)) {
+    if (G_name_is_fully_qualified(in, xname, xmapset)) {
 	in = xname;
     }
 
@@ -326,7 +326,7 @@ int Vect_rename(const char *in, const char *out)
     }
 
     /* remove mapset from fully qualified name */
-    if (G__name_is_fully_qualified(in, xname, xmapset)) {
+    if (G_name_is_fully_qualified(in, xname, xmapset)) {
 	in = xname;
     }
 
@@ -452,7 +452,7 @@ int Vect_delete(const char *map)
     G_debug(3, "Delete vector '%s'", map);
 
     /* remove mapset from fully qualified name */
-    if (G__name_is_fully_qualified(map, xname, xmapset)) {
+    if (G_name_is_fully_qualified(map, xname, xmapset)) {
 	map = xname;
     }
 

+ 2 - 2
lib/vector/Vlib/open.c

@@ -150,7 +150,7 @@ Vect__open_old(struct Map_info *Map, const char *name, const char *mapset,
     dig_init_plus(&(Map->plus));
 
     ogr_mapset = 0;
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (strcmp(xmapset, "OGR") == 0) {
 	    /* unique OGR mapset detected */
 	    G_debug(1, "OGR mapset detected");
@@ -557,7 +557,7 @@ int Vect_open_new(struct Map_info *Map, const char *name, int with_z)
     ferror = Vect_get_fatal_error();
     Vect_set_fatal_error(GV_FATAL_EXIT);
 
-    if (G__name_is_fully_qualified(name, xname, xmapset)) {
+    if (G_name_is_fully_qualified(name, xname, xmapset)) {
 	if (strcmp(xmapset, G_mapset()) != 0) {
 	    sprintf(errmsg, _("%s is not in the current mapset (%s)"), name,
 		    G_mapset());

+ 1 - 1
raster3d/r3.mkdspf/r3_find.c

@@ -18,7 +18,7 @@ int g3_find_dsp_file(const char *cell, const char *file, const char *mset)
 
     strcpy(tofind, file);
 
-    if (G__name_is_fully_qualified(cell, name, mapset))
+    if (G_name_is_fully_qualified(cell, name, mapset))
 	sprintf(element, "grid3/%s/dsp", name);
     else
 	sprintf(element, "grid3/%s/dsp", cell);

+ 1 - 1
raster3d/r3.showdspf/r3_find.c

@@ -19,7 +19,7 @@ int g3_find_dsp_file(cell, file, mset)
 
     strcpy(tofind, file);
 
-    if (G__name_is_fully_qualified(cell, name, mapset))
+    if (G_name_is_fully_qualified(cell, name, mapset))
 	sprintf(element, "grid3/%s/dsp", name);
     else
 	sprintf(element, "grid3/%s/dsp", cell);

+ 1 - 1
vector/lidar/v.lidar.growing/main.c

@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
     /* Open input vector */
     Vect_check_input_output_name(in_opt->answer, out_opt->answer,
 				 GV_FATAL_EXIT);
-    if(G__name_is_fully_qualified(in_opt->answer, xname, xmapset) < 0 ) /* strip off mapset from input for SQL*/
+    if(G_name_is_fully_qualified(in_opt->answer, xname, xmapset) < 0 ) /* strip off mapset from input for SQL*/
 	G_fatal_error(_("Vector map <%s> not found"), xname);
     if ((mapset = G_find_vector2(in_opt->answer, "")) == NULL) {
 	G_fatal_error(_("Vector map <%s> not found"), in_opt->answer);

+ 1 - 1
vector/v.out.ogr/main.c

@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
     if (!layer_opt->answer) {
 	char xname[GNAME_MAX],	xmapset[GMAPSET_MAX];
 	
-	if (G__name_is_fully_qualified(in_opt->answer, xname, xmapset))
+	if (G_name_is_fully_qualified(in_opt->answer, xname, xmapset))
 	    layer_opt->answer = G_store(xname);
 	else
 	    layer_opt->answer = G_store(in_opt->answer);