[GRASS-SVN] r38597 - grass/trunk/vector/v.in.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 3 10:53:31 EDT 2009


Author: martinl
Date: 2009-08-03 10:53:30 -0400 (Mon, 03 Aug 2009)
New Revision: 38597

Modified:
   grass/trunk/vector/v.in.ogr/main.c
Log:
there is no G_strdup in GRASS 7


Modified: grass/trunk/vector/v.in.ogr/main.c
===================================================================
--- grass/trunk/vector/v.in.ogr/main.c	2009-08-03 13:14:03 UTC (rev 38596)
+++ grass/trunk/vector/v.in.ogr/main.c	2009-08-03 14:53:30 UTC (rev 38597)
@@ -663,7 +663,7 @@
 		G_debug(3, "Ogr_ftype: %i", Ogr_ftype);	/* look up below */
 
 		if (i < ncnames - 1) {
-		    Ogr_fieldname = G_strdup(cnames_opt->answers[i + 1]);
+		    Ogr_fieldname = strdup(cnames_opt->answers[i + 1]);
 		}
 		else {
 		    /* Change column names to [A-Za-z][A-Za-z0-9_]* */
@@ -679,7 +679,7 @@
 		/* avoid that we get the 'cat' column twice */
 		if (strcmp(Ogr_fieldname, "cat") == 0) {
 		    sprintf(namebuf, "%s_", Ogr_fieldname);
-		    Ogr_fieldname = G_strdup(namebuf);
+		    Ogr_fieldname = strdup(namebuf);
 		}
 
 		/* captial column names are a pain in SQL */



More information about the grass-commit mailing list