[GRASS-SVN] r39404 - grass/branches/develbranch_6/imagery/i.rgb.his

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 5 03:41:07 EDT 2009


Author: hamish
Date: 2009-10-05 03:41:04 -0400 (Mon, 05 Oct 2009)
New Revision: 39404

Modified:
   grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c
Log:
minor clean (merge from trunk)

Modified: grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c	2009-10-05 07:38:41 UTC (rev 39403)
+++ grass/branches/develbranch_6/imagery/i.rgb.his/r2hmain.c	2009-10-05 07:41:04 UTC (rev 39404)
@@ -75,6 +75,7 @@
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
+
     /* get dimension of the image */
     rows = G_window_rows();
     cols = G_window_cols();
@@ -89,7 +90,7 @@
 
 	for (band = 0; band < 3; band++)
 	    if (G_get_map_row(fd_input[band], rowbuffer[band], i) < 0)
-		G_fatal_error(_("Unable to read raster map row %d"), i);
+		G_fatal_error(_("Unable to read raster map row %ld"), i);
 
 	/* process this row of the map */
 	rgb2his(rowbuffer, cols);
@@ -98,11 +99,13 @@
 	for (band = 0; band < 3; band++)
 	    if (G_put_raster_row(fd_output[band], rowbuffer[band], CELL_TYPE)
 		< 0)
-		G_fatal_error(_("Failed writing raster map row %d"), i);
+		G_fatal_error(_("Failed writing raster map row %ld"), i);
     }
+    G_percent(i, rows, 2);
 
     closefiles(opt_hue->answer, opt_inten->answer, opt_sat->answer,
 	       fd_output, rowbuffer);
 
-    exit(EXIT_SUCCESS);
+
+exit(EXIT_SUCCESS);
 }



More information about the grass-commit mailing list