[GRASS-SVN] r41957 - grass/branches/develbranch_6/raster/r.statistics

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 21 15:23:15 EDT 2010


Author: glynn
Date: 2010-04-21 15:23:14 -0400 (Wed, 21 Apr 2010)
New Revision: 41957

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


Modified: grass/branches/develbranch_6/raster/r.statistics/o_average.c
===================================================================
--- grass/branches/develbranch_6/raster/r.statistics/o_average.c	2010-04-21 16:53:40 UTC (rev 41956)
+++ grass/branches/develbranch_6/raster/r.statistics/o_average.c	2010-04-21 19:23:14 UTC (rev 41957)
@@ -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/develbranch_6/raster/r.statistics/o_distrib.c
===================================================================
--- grass/branches/develbranch_6/raster/r.statistics/o_distrib.c	2010-04-21 16:53:40 UTC (rev 41956)
+++ grass/branches/develbranch_6/raster/r.statistics/o_distrib.c	2010-04-21 19:23:14 UTC (rev 41957)
@@ -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/develbranch_6/raster/r.statistics/o_sum.c
===================================================================
--- grass/branches/develbranch_6/raster/r.statistics/o_sum.c	2010-04-21 16:53:40 UTC (rev 41956)
+++ grass/branches/develbranch_6/raster/r.statistics/o_sum.c	2010-04-21 19:23:14 UTC (rev 41957)
@@ -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