[GRASS-SVN] r45169 - grass/branches/develbranch_6/imagery/i.ortho.photo/i.photo.rectify

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 24 04:20:57 EST 2011


Author: mmetz
Date: 2011-01-24 01:20:57 -0800 (Mon, 24 Jan 2011)
New Revision: 45169

Modified:
   grass/branches/develbranch_6/imagery/i.ortho.photo/i.photo.rectify/exec.c
Log:
copy history if possible

Modified: grass/branches/develbranch_6/imagery/i.ortho.photo/i.photo.rectify/exec.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.ortho.photo/i.photo.rectify/exec.c	2011-01-23 14:49:42 UTC (rev 45168)
+++ grass/branches/develbranch_6/imagery/i.ortho.photo/i.photo.rectify/exec.c	2011-01-24 09:20:57 UTC (rev 45169)
@@ -23,7 +23,7 @@
     struct Colors colr;
     struct Categories cats;
     struct History hist;
-    int colr_ok, hist_ok, cats_ok;
+    int colr_ok, cats_ok;
     long start_time, rectify_time;
     double aver_z;
     int elevfd;
@@ -75,7 +75,10 @@
 
 	cats_ok = G_read_cats(name, mapset, &cats) >= 0;
 	colr_ok = G_read_colors(name, mapset, &colr) > 0;
-	hist_ok = G_read_history(name, mapset, &hist) >= 0;
+
+	/* Initialze History */
+	if (G_read_history(name, mapset, &hist) < 0)
+	    G_short_history(result, type, &hist);
 	G_debug(2, "reading was fine...");
 
 	time(&start_time);
@@ -93,11 +96,7 @@
 		G_write_colors(result, G_mapset(), &colr);
 		G_free_colors(&colr);
 	    }
-	    if (hist_ok)
-		G_write_history(result, &hist);
-
-	    /* Initialze History */
-	    G_short_history(name, type, &hist);
+	    /* Write out History */
 	    G_command_history(&hist);
 	    G_write_history(result, &hist);
 



More information about the grass-commit mailing list