[GRASS-SVN] r50431 - grass/trunk/vector/v.to.rast

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 25 02:08:25 EST 2012


Author: hamish
Date: 2012-01-24 23:08:25 -0800 (Tue, 24 Jan 2012)
New Revision: 50431

Modified:
   grass/trunk/vector/v.to.rast/main.c
   grass/trunk/vector/v.to.rast/vect2rast.c
Log:
only print convert stats when interesting; move done_msg to main fn level

Modified: grass/trunk/vector/v.to.rast/main.c
===================================================================
--- grass/trunk/vector/v.to.rast/main.c	2012-01-25 07:02:47 UTC (rev 50430)
+++ grass/trunk/vector/v.to.rast/main.c	2012-01-25 07:08:25 UTC (rev 50431)
@@ -141,8 +141,10 @@
 
     if (vect_to_rast(input->answer, output->answer, field_opt->answer,
 		     col->answer, nrows, use, value, value_type,
-		     rgbcol_opt->answer, label_opt->answer, type))
-      exit(EXIT_FAILURE);
-   
+		     rgbcol_opt->answer, label_opt->answer, type)) {
+	exit(EXIT_FAILURE);
+    }
+
+    G_done_msg("");
     exit(EXIT_SUCCESS);
 }

Modified: grass/trunk/vector/v.to.rast/vect2rast.c
===================================================================
--- grass/trunk/vector/v.to.rast/vect2rast.c	2012-01-25 07:02:47 UTC (rev 50430)
+++ grass/trunk/vector/v.to.rast/vect2rast.c	2012-01-25 07:08:25 UTC (rev 50431)
@@ -216,10 +216,10 @@
     update_labels(raster_map, vector_map, field, labelcolumn, use, value,
 		  column);
 
-    G_message(_("Converted areas: %d of %d"), nareas, nareas_all);
-    G_message(_("Converted points/lines: %d of %d"), nlines, nplines_all);
-    
-    G_done_msg(" ");
-    
+    if (nareas_all > 0)
+	G_message(_("Converted areas: %d of %d"), nareas, nareas_all);
+    if (nplines_all > 0)
+	G_message(_("Converted points/lines: %d of %d"), nlines, nplines_all);
+
     return 0;
 }



More information about the grass-commit mailing list