[GRASS-SVN] r34006 - in grass/branches/develbranch_6: include
lib/ogsf visualization/nviz/src
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 26 07:33:51 EDT 2008
Author: marisn
Date: 2008-10-26 07:33:51 -0400 (Sun, 26 Oct 2008)
New Revision: 34006
Modified:
grass/branches/develbranch_6/include/ogsf_proto.h
grass/branches/develbranch_6/lib/ogsf/GP2.c
grass/branches/develbranch_6/lib/ogsf/GV2.c
grass/branches/develbranch_6/visualization/nviz/src/map_obj.c
Log:
Show readable vector layer name instead of garbage introduced by r32202
Modified: grass/branches/develbranch_6/include/ogsf_proto.h
===================================================================
--- grass/branches/develbranch_6/include/ogsf_proto.h 2008-10-24 21:39:23 UTC (rev 34005)
+++ grass/branches/develbranch_6/include/ogsf_proto.h 2008-10-26 11:33:51 UTC (rev 34006)
@@ -60,7 +60,7 @@
int *GP_get_site_list(int *);
int GP_delete_site(int);
int GP_load_site(int, const char *);
-int GP_get_sitename(int, char *);
+int GP_get_sitename(int, char **);
int GP_get_sitemode(int, int *, int *, int *, float *, int *);
int GP_set_sitemode(int, int, int, int, float, int);
int GP_attmode_color(int, const char *);
@@ -233,7 +233,7 @@
int *GV_get_vect_list(int *);
int GV_delete_vector(int);
int GV_load_vector(int, const char *);
-int GV_get_vectname(int, char *);
+int GV_get_vectname(int, char **);
int GV_set_vectmode(int, int, int, int, int);
int GV_get_vectmode(int, int *, int *, int *, int *);
void GV_set_trans(int, float, float, float);
Modified: grass/branches/develbranch_6/lib/ogsf/GP2.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/GP2.c 2008-10-24 21:39:23 UTC (rev 34005)
+++ grass/branches/develbranch_6/lib/ogsf/GP2.c 2008-10-26 11:33:51 UTC (rev 34006)
@@ -200,12 +200,12 @@
Note: char array is allocated by G_store()
\param id point set id
- \param[out] filename point set filename
+ \param[out] &filename point set filename
\return -1 on error (point set not found)
\return 1 on success
*/
-int GP_get_sitename(int id, char *filename)
+int GP_get_sitename(int id, char **filename)
{
geosite *gp;
@@ -213,7 +213,7 @@
return (-1);
}
- filename = G_store(gp->filename);
+ *filename = G_store(gp->filename);
return (1);
}
Modified: grass/branches/develbranch_6/lib/ogsf/GV2.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/GV2.c 2008-10-24 21:39:23 UTC (rev 34005)
+++ grass/branches/develbranch_6/lib/ogsf/GV2.c 2008-10-26 11:33:51 UTC (rev 34006)
@@ -198,12 +198,12 @@
Note: char array is allocated by G_store()
\param id vector set id
- \param filename filename
+ \param filename &filename
\return -1 on error (invalid vector set id)
\return 1 on success
*/
-int GV_get_vectname(int id, char *filename)
+int GV_get_vectname(int id, char **filename)
{
geovect *gv;
@@ -211,7 +211,7 @@
return (-1);
}
- filename = G_store(gv->filename);
+ *filename = G_store(gv->filename);
return (1);
}
Modified: grass/branches/develbranch_6/visualization/nviz/src/map_obj.c
===================================================================
--- grass/branches/develbranch_6/visualization/nviz/src/map_obj.c 2008-10-24 21:39:23 UTC (rev 34005)
+++ grass/branches/develbranch_6/visualization/nviz/src/map_obj.c 2008-10-26 11:33:51 UTC (rev 34006)
@@ -1584,7 +1584,7 @@
case VECT:{
int mem, color, width, flat;
- char temp[128];
+ char temp[128], *tempname;
GV_get_vectmode(id, &mem, &color, &width, &flat);
switch (sv_att_atoi(argv[2])) {
@@ -1600,8 +1600,8 @@
Tcl_SetResult(interp, temp, TCL_VOLATILE);
break;
case SV_ATT_MAP:
- GV_get_vectname(id, temp);
- Tcl_SetResult(interp, temp, TCL_VOLATILE);
+ GV_get_vectname(id, &tempname);
+ Tcl_SetResult(interp, tempname, TCL_VOLATILE);
break;
}
}
@@ -1610,7 +1610,7 @@
case SITE:{
int atmod, color, width, marker, use_z;
float size;
- char temp[128];
+ char temp[128], *tempname;
GP_get_sitemode(id, &atmod, &color, &width, &size, &marker);
GP_get_zmode(id, &use_z);
@@ -1669,8 +1669,8 @@
break;
case SV_ATT_MAP:
- GP_get_sitename(id, temp);
- Tcl_SetResult(interp, temp, TCL_VOLATILE);
+ GP_get_sitename(id, &tempname);
+ Tcl_SetResult(interp, tempname, TCL_VOLATILE);
break;
}
}
More information about the grass-commit
mailing list