[GRASS-SVN] r64540 - grass/trunk/display/d.mon

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 10 14:24:08 PST 2015


Author: martinl
Date: 2015-02-10 14:24:08 -0800 (Tue, 10 Feb 2015)
New Revision: 64540

Modified:
   grass/trunk/display/d.mon/start.c
Log:
d.mon: replace setenv() by putenv() - fix compilation on Windows


Modified: grass/trunk/display/d.mon/start.c
===================================================================
--- grass/trunk/display/d.mon/start.c	2015-02-10 22:06:57 UTC (rev 64539)
+++ grass/trunk/display/d.mon/start.c	2015-02-10 22:24:08 UTC (rev 64540)
@@ -25,7 +25,9 @@
     output_path[0] = '\0';
     
     if (!output) {
-        setenv("GRASS_RENDER_IMMEDIATE", name, 1);
+        char buff[512];
+        sprintf(buff, "GRASS_RENDER_IMMEDIATE=%s", name);
+        putenv(G_store(buff));
         D_open_driver();
         
         output_name = D_get_file();
@@ -45,7 +47,7 @@
         }
         D_close_driver(); /* must be called after check because this
                            * function produces default map file */
-        unsetenv("GRASS_RENDER_IMMEDIATE");
+        putenv("GRASS_RENDER_IMMEDIATE=");
     }
     else {
         output_name = output;



More information about the grass-commit mailing list