[GRASS-SVN] r71197 - grass/trunk/vector/v.net.alloc

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 21 02:16:46 PDT 2017


Author: mmetz
Date: 2017-06-21 02:16:46 -0700 (Wed, 21 Jun 2017)
New Revision: 71197

Modified:
   grass/trunk/vector/v.net.alloc/main.c
Log:
v.net.alloc: allocate cats, fix attributes

Modified: grass/trunk/vector/v.net.alloc/main.c
===================================================================
--- grass/trunk/vector/v.net.alloc/main.c	2017-06-20 21:08:00 UTC (rev 71196)
+++ grass/trunk/vector/v.net.alloc/main.c	2017-06-21 09:16:46 UTC (rev 71197)
@@ -170,6 +170,7 @@
     Vect_check_input_output_name(map->answer, output->answer, G_FATAL_EXIT);
 
     Cats = Vect_new_cats_struct();
+    ICats = Vect_new_cats_struct();
     OCats = Vect_new_cats_struct();
     Points = Vect_new_line_struct();
     SPoints = Vect_new_line_struct();
@@ -408,7 +409,7 @@
 		    Vect_cat_get(ICats, afield, &ocat);
 
 		    sprintf(buf,
-			    "insert into %s values ( %d, %d, %d')",
+			    "insert into %s values ( %d, %d, %d )",
 			    Fi->table, ucat, ocat, cat);
 		    db_set_string(&sql, buf);
 		    G_debug(3, "%s", db_get_string(&sql));
@@ -440,7 +441,7 @@
 			Vect_cat_get(ICats, afield, &ocat);
 
 			sprintf(buf,
-				"insert into %s values ( %d, %d, %d')",
+				"insert into %s values ( %d, %d, %d )",
 				Fi->table, ucat, ocat, cat);
 			db_set_string(&sql, buf);
 			G_debug(3, "%s", db_get_string(&sql));
@@ -471,7 +472,7 @@
 			Vect_cat_get(ICats, afield, &ocat);
 
 			sprintf(buf,
-				"insert into %s values ( %d, %d, %d')",
+				"insert into %s values ( %d, %d, %d )",
 				Fi->table, ucat, ocat, cat);
 			db_set_string(&sql, buf);
 			G_debug(3, "%s", db_get_string(&sql));
@@ -509,7 +510,7 @@
 			Vect_cat_get(ICats, afield, &ocat);
 
 			sprintf(buf,
-				"insert into %s values ( %d, %d, %d')",
+				"insert into %s values ( %d, %d, %d )",
 				Fi->table, ucat, ocat, cat);
 			db_set_string(&sql, buf);
 			G_debug(3, "%s", db_get_string(&sql));
@@ -537,7 +538,7 @@
 			Vect_cat_get(ICats, afield, &ocat);
 
 			sprintf(buf,
-				"insert into %s values ( %d, %d, %d')",
+				"insert into %s values ( %d, %d, %d )",
 				Fi->table, ucat, ocat, cat);
 			db_set_string(&sql, buf);
 			G_debug(3, "%s", db_get_string(&sql));
@@ -588,7 +589,7 @@
 			    Vect_cat_get(ICats, afield, &ocat);
 
 			    sprintf(buf,
-				    "insert into %s values ( %d, %d, %d')",
+				    "insert into %s values ( %d, %d, %d )",
 				    Fi->table, ucat, ocat, cat);
 			    db_set_string(&sql, buf);
 			    G_debug(3, "%s", db_get_string(&sql));
@@ -624,7 +625,7 @@
 			    Vect_cat_get(ICats, afield, &ocat);
 
 			    sprintf(buf,
-				    "insert into %s values ( %d, %d, %d')",
+				    "insert into %s values ( %d, %d, %d )",
 				    Fi->table, ucat, ocat, cat);
 			    db_set_string(&sql, buf);
 			    G_debug(3, "%s", db_get_string(&sql));
@@ -655,7 +656,7 @@
 		Vect_cat_get(ICats, afield, &ocat);
 
 		sprintf(buf,
-			"insert into %s values ( %d, %d, %d)",
+			"insert into %s values ( %d, %d, %d )",
 			Fi->table, ucat, ocat, -1);
 		db_set_string(&sql, buf);
 		G_debug(3, "%s", db_get_string(&sql));



More information about the grass-commit mailing list