[GRASS-SVN] r50432 - grass/branches/develbranch_6/vector/v.to.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 25 02:12:04 EST 2012
Author: hamish
Date: 2012-01-24 23:12:04 -0800 (Tue, 24 Jan 2012)
New Revision: 50432
Modified:
grass/branches/develbranch_6/vector/v.to.rast/main.c
grass/branches/develbranch_6/vector/v.to.rast/vect2rast.c
Log:
only print convert stats when interesting; move done_msg to main fn level (merge from trunk)
Modified: grass/branches/develbranch_6/vector/v.to.rast/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.to.rast/main.c 2012-01-25 07:08:25 UTC (rev 50431)
+++ grass/branches/develbranch_6/vector/v.to.rast/main.c 2012-01-25 07:12:04 UTC (rev 50432)
@@ -139,8 +139,10 @@
if (vect_to_rast(input->answer, output->answer, field,
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/branches/develbranch_6/vector/v.to.rast/vect2rast.c
===================================================================
--- grass/branches/develbranch_6/vector/v.to.rast/vect2rast.c 2012-01-25 07:08:25 UTC (rev 50431)
+++ grass/branches/develbranch_6/vector/v.to.rast/vect2rast.c 2012-01-25 07:12:04 UTC (rev 50432)
@@ -223,10 +223,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