[GRASS-SVN] r41960 - grass/branches/releasebranch_6_4/raster/r.statistics

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 22 02:28:23 EDT 2010


Author: neteler
Date: 2010-04-22 02:28:14 -0400 (Thu, 22 Apr 2010)
New Revision: 41960

Modified:
   grass/branches/releasebranch_6_4/raster/r.statistics/o_average.c
   grass/branches/releasebranch_6_4/raster/r.statistics/o_distrib.c
   grass/branches/releasebranch_6_4/raster/r.statistics/o_sum.c
Log:
glynn: Quote temporary filename (bug #1042)

Modified: grass/branches/releasebranch_6_4/raster/r.statistics/o_average.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.statistics/o_average.c	2010-04-21 21:08:00 UTC (rev 41959)
+++ grass/branches/releasebranch_6_4/raster/r.statistics/o_average.c	2010-04-22 06:28:14 UTC (rev 41960)
@@ -26,7 +26,7 @@
     tempfile1 = G_tempfile();
     tempfile2 = G_tempfile();
 
-    sprintf(command, "%s -an input=\"%s,%s\" fs=space > %s",
+    sprintf(command, "%s -an input=\"%s,%s\" fs=space > \"%s\"",
 	    STATS, basemap, covermap, tempfile1);
     if (stat = system(command)) {
 	unlink(tempfile1);
@@ -62,7 +62,7 @@
     out(fd2, basecat, sum1, sum2);
     fclose(fd1);
     fclose(fd2);
-    sprintf(command, "%s input=\"%s\" output=\"%s\" < %s",
+    sprintf(command, "%s input=\"%s\" output=\"%s\" < \"%s\"",
 	    RECLASS, basemap, outputmap, tempfile2);
     stat = system(command);
     unlink(tempfile1);

Modified: grass/branches/releasebranch_6_4/raster/r.statistics/o_distrib.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.statistics/o_distrib.c	2010-04-21 21:08:00 UTC (rev 41959)
+++ grass/branches/releasebranch_6_4/raster/r.statistics/o_distrib.c	2010-04-22 06:28:14 UTC (rev 41960)
@@ -23,7 +23,7 @@
     tempfile1 = G_tempfile();
     tempfile2 = G_tempfile();
 
-    sprintf(command, "%s -cn input=\"%s,%s\" fs=space > %s", STATS, basemap,
+    sprintf(command, "%s -cn input=\"%s,%s\" fs=space > \"%s\"", STATS, basemap,
 	    covermap, tempfile1);
 
     if (stat = system(command)) {

Modified: grass/branches/releasebranch_6_4/raster/r.statistics/o_sum.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.statistics/o_sum.c	2010-04-21 21:08:00 UTC (rev 41959)
+++ grass/branches/releasebranch_6_4/raster/r.statistics/o_sum.c	2010-04-22 06:28:14 UTC (rev 41960)
@@ -27,7 +27,7 @@
     tempfile1 = G_tempfile();
     tempfile2 = G_tempfile();
 
-    sprintf(command, "%s -cn input=\"%s,%s\" fs=space > %s", STATS, basemap,
+    sprintf(command, "%s -cn input=\"%s,%s\" fs=space > \"%s\"", STATS, basemap,
 	    covermap, tempfile1);
 
     if (stat = system(command)) {
@@ -65,7 +65,7 @@
     sum_out(fd2, basecat, sum1);
     fclose(fd1);
     fclose(fd2);
-    sprintf(command, "%s input=\"%s\" output=\"%s\" < %s",
+    sprintf(command, "%s input=\"%s\" output=\"%s\" < \"%s\"",
 	    RECLASS, basemap, outputmap, tempfile2);
     stat = system(command);
     unlink(tempfile1);



More information about the grass-commit mailing list