[GRASS-SVN] r45171 - grass/trunk/imagery/i.rectify
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 24 04:21:47 EST 2011
Author: mmetz
Date: 2011-01-24 01:21:47 -0800 (Mon, 24 Jan 2011)
New Revision: 45171
Modified:
grass/trunk/imagery/i.rectify/exec.c
grass/trunk/imagery/i.rectify/main.c
Log:
0 -> NULL; copy history if possible
Modified: grass/trunk/imagery/i.rectify/exec.c
===================================================================
--- grass/trunk/imagery/i.rectify/exec.c 2011-01-24 09:21:32 UTC (rev 45170)
+++ grass/trunk/imagery/i.rectify/exec.c 2011-01-24 09:21:47 UTC (rev 45171)
@@ -55,7 +55,8 @@
colr_ok = Rast_read_colors(name, mapset, &colr) > 0;
/* Initialze History */
- Rast_short_history(name, type, &hist);
+ if (Rast_read_history(name, mapset, &hist) < 0)
+ Rast_short_history(result, type, &hist);
time(&start_time);
@@ -71,11 +72,8 @@
Rast_free_colors(&colr);
}
- /* Write out History Structure History */
- Rast_set_history(&hist, HIST_TITLE, result);
- Rast_set_history(&hist, HIST_DATSRC_1, name);
- Rast_append_history(&hist, "Created from: i.rectify");
- Rast_append_format_history(&hist, "Transformation order = %d", order);
+ /* Write out History */
+ Rast_command_history(&hist);
Rast_write_history(result, &hist);
select_current_env();
Modified: grass/trunk/imagery/i.rectify/main.c
===================================================================
--- grass/trunk/imagery/i.rectify/main.c 2011-01-24 09:21:32 UTC (rev 45170)
+++ grass/trunk/imagery/i.rectify/main.c 2011-01-24 09:21:47 UTC (rev 45171)
@@ -223,7 +223,7 @@
}
else {
name = ifile->answers[m];
- mapset = 0;
+ mapset = NULL;
}
got_file = 0;
More information about the grass-commit
mailing list