[GRASS-SVN] r34592 - in grass/branches/develbranch_6/vector: v.build.polylines v.category v.clean v.kcv v.net v.proj v.transform v.type

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 28 04:22:17 EST 2008


Author: marisn
Date: 2008-11-28 04:22:16 -0500 (Fri, 28 Nov 2008)
New Revision: 34592

Modified:
   grass/branches/develbranch_6/vector/v.build.polylines/main.c
   grass/branches/develbranch_6/vector/v.category/main.c
   grass/branches/develbranch_6/vector/v.clean/main.c
   grass/branches/develbranch_6/vector/v.kcv/main.c
   grass/branches/develbranch_6/vector/v.net/main.c
   grass/branches/develbranch_6/vector/v.proj/main.c
   grass/branches/develbranch_6/vector/v.transform/main.c
   grass/branches/develbranch_6/vector/v.type/main.c
Log:
Print warning if copying attribute table to new vector map fails

Modified: grass/branches/develbranch_6/vector/v.build.polylines/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.build.polylines/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.build.polylines/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -210,7 +210,8 @@
 
     /* Copy (all linked) tables if needed */
     if (write_cats != NO_CATS) {
-	Vect_copy_tables(&map, &Out, 0);
+        if (Vect_copy_tables(&map, &Out, 0))
+            G_warning(_("Failed to copy attribute table to output map"));
     }
 
     /* Tidy up */

Modified: grass/branches/develbranch_6/vector/v.category/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.category/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.category/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -486,7 +486,8 @@
 
     if (option == O_ADD || option == O_DEL || option == O_CHFIELD ||
 	option == O_SUM) {
-	Vect_copy_tables(&In, &Out, 0);
+        if (Vect_copy_tables(&In, &Out, 0))
+            G_warning(_("Failed to copy attribute table to output map"));
 	Vect_build(&Out);
 	Vect_close(&Out);
     }

Modified: grass/branches/develbranch_6/vector/v.clean/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.clean/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.clean/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -277,7 +277,8 @@
 
     /* This works for both level 1 and 2 */
     Vect_copy_map_lines(&In, &Out);
-    Vect_copy_tables(&In, &Out, 0);
+    if (Vect_copy_tables(&In, &Out, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
 
     Vect_set_release_support(&In);
     Vect_close(&In);

Modified: grass/branches/develbranch_6/vector/v.kcv/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.kcv/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.kcv/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -157,7 +157,8 @@
     Vect_copy_map_lines(&In, &Out);
 
     /* Copy tables */
-    Vect_copy_tables(&In, &Out, 0);
+    if (Vect_copy_tables(&In, &Out, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
 
     /* Add column */
     db_init_string(&sql);

Modified: grass/branches/develbranch_6/vector/v.net/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.net/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.net/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -191,7 +191,8 @@
 	    Vect_close(&Points);
 	}
 
-	Vect_copy_tables(&In, &Out, 0);
+        if (Vect_copy_tables(&In, &Out, 0))
+            G_warning(_("Failed to copy attribute table to output map"));
 
 	/* support */
 	Vect_build_partial(&Out, GV_BUILD_NONE);

Modified: grass/branches/develbranch_6/vector/v.proj/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.proj/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.proj/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -274,7 +274,8 @@
     fprintf(stderr, "\r");
 
     /* Copy tables */
-    Vect_copy_tables(&Map, &Out_Map, 0);
+    if (Vect_copy_tables(&Map, &Out_Map, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
 
     Vect_close(&Map);
 

Modified: grass/branches/develbranch_6/vector/v.transform/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.transform/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.transform/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -328,7 +328,8 @@
 			 ztozero, trans_params,
 			 table->answer, columns_name, atoi(field->answer));
 
-    Vect_copy_tables(&Old, &New, 0);
+    if (Vect_copy_tables(&Old, &New, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
     Vect_close(&Old);
     Vect_build(&New);
 

Modified: grass/branches/develbranch_6/vector/v.type/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.type/main.c	2008-11-28 09:00:56 UTC (rev 34591)
+++ grass/branches/develbranch_6/vector/v.type/main.c	2008-11-28 09:22:16 UTC (rev 34592)
@@ -230,7 +230,8 @@
 	Vect_write_line(&Out, type, Points, Cats);
     }
 
-    Vect_copy_tables(&In, &Out, 0);
+    if (Vect_copy_tables(&In, &Out, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
     Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&In);



More information about the grass-commit mailing list