[GRASS-SVN] r31755 - grass/branches/develbranch_6/ps/ps.map

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 19 08:02:35 EDT 2008


Author: hamish
Date: 2008-06-19 08:02:35 -0400 (Thu, 19 Jun 2008)
New Revision: 31755

Modified:
   grass/branches/develbranch_6/ps/ps.map/main.c
Log:
remove tempfiles (trac #91)

Modified: grass/branches/develbranch_6/ps/ps.map/main.c
===================================================================
--- grass/branches/develbranch_6/ps/ps.map/main.c	2008-06-19 07:04:18 UTC (rev 31754)
+++ grass/branches/develbranch_6/ps/ps.map/main.c	2008-06-19 12:02:35 UTC (rev 31755)
@@ -5,11 +5,11 @@
  *               Radim Blazek <radim.blazek gmail.com>
  *               Bob Covill <bcovill tekmap.ns.ca>, Huidae Cho
  *               <grass4u gmail.com>, Glynn Clements <glynn
- *               gclements.plus.com>, Hamish Bowman <hamish_nospam
- *               yahoo.com>, Markus Neteler <neteler itc.it>,
+ *               gclements.plus.com>, Hamish Bowman <hamish_b yahoo.com>,
+ *               Markus Neteler <neteler itc.it>,
  *               Alessandro Frigeri <afrigeri unipg.it>
  * PURPOSE:      This is an enhanced PostScript version of the p.map program
- * COPYRIGHT:    (C) 2003-2006 by the GRASS Development Team
+ * COPYRIGHT:    (C) 2003-2008 by the GRASS Development Team
  *
  *               This program is free software under the GNU General Public
  *               License (>=v2). Read the file COPYING that comes with GRASS
@@ -467,7 +467,7 @@
 	   }
 	   continue;
 	}
-	
+
 	if (KEY("text"))
 	{
 	    double e, n;
@@ -756,7 +756,13 @@
     G_message (_("PostScript file [%s] successfully written."),
 		 output_file->answer);
 
-    unlink (ps_mask_file);
+    /* cleanup the tempfiles */
+    unlink(ps_mask_file);
+    if(PS.plfile) unlink(PS.plfile); 
+    if(PS.commentfile) unlink(PS.commentfile);
+/*    if(sessionfile) unlink(sessionfile);    created in session.c (how to remove?) */
+    if(labels.other) unlink(labels.other);
+
     exit(EXIT_SUCCESS);
 }
 



More information about the grass-commit mailing list