[GRASS-SVN] r46433 - grass/trunk/raster/r.resamp.rst

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 28 12:04:53 EDT 2011


Author: mmetz
Date: 2011-05-28 09:04:53 -0700 (Sat, 28 May 2011)
New Revision: 46433

Modified:
   grass/trunk/raster/r.resamp.rst/main.c
Log:
fix messages

Modified: grass/trunk/raster/r.resamp.rst/main.c
===================================================================
--- grass/trunk/raster/r.resamp.rst/main.c	2011-05-28 15:45:33 UTC (rev 46432)
+++ grass/trunk/raster/r.resamp.rst/main.c	2011-05-28 16:04:53 UTC (rev 46433)
@@ -405,7 +405,19 @@
 	sdisk += disk;
 
     G_message(_("Processing all selected output files will require"));
-    G_message(_("%d bytes of disk space for temp files."), sdisk);
+    if (sdisk > 1024) {
+	if (sdisk > 1024 * 1024) {
+	    if (sdisk > 1024 * 1024 * 1024) {
+		G_message(_("%.2f GB of disk space for temp files."), sdisk / (1024. * 1024. * 1024.));
+	    }
+	    else
+		G_message(_("%.2f MB of disk space for temp files."), sdisk / (1024. * 1024.));
+	}
+	else
+	    G_message(_("%.2f KB of disk space for temp files."), sdisk / 1024.);
+    }
+    else
+	G_message(_("%d bytes of disk space for temp files."), sdisk);
 
 
     fstar2 = fi * fi / 4.;
@@ -522,7 +534,7 @@
     if (smooth != NULL)
 	Rast_close(fdsmooth);
 
-    G_done_msg("");
+    G_done_msg(" ");
     exit(EXIT_SUCCESS);
 }
 
@@ -538,12 +550,12 @@
     *tmpname = tmp = G_tempfile();
     fp = fopen(tmp, "w+");
     if (!fp)
-	G_fatal_error(_("Unable to open temporary file <%s>"), tmpname);
+	G_fatal_error(_("Unable to open temporary file <%s>"), *tmpname);
 
     for (i = 0; i < nsizr; i++) {
 	if (fwrite(zero_array_cell, sizeof(FCELL), nsizc, fp) != nsizc) {
 	    clean();
-	    G_fatal_error(_("Error writing temporary file <%s>"), tmpname);
+	    G_fatal_error(_("Error writing temporary file <%s>"), *tmpname);
 	}
     }
 



More information about the grass-commit mailing list