[GRASS-SVN] r36664 -
grass/branches/releasebranch_6_4/imagery/i.atcorr
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 9 09:22:23 EDT 2009
Author: neteler
Date: 2009-04-09 09:22:23 -0400 (Thu, 09 Apr 2009)
New Revision: 36664
Modified:
grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp
Log:
write cmd line to history; const backported from 7.trunk
Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp 2009-04-09 13:21:54 UTC (rev 36663)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp 2009-04-09 13:22:23 UTC (rev 36664)
@@ -76,11 +76,11 @@
int mis = 0;
/* function prototypes */
-static void adjust_region (char *, char *);
+static void adjust_region (char *, const char *);
static CELL round_c (FCELL);
static void write_fp_to_cell (int, FCELL *);
static void process_raster (int, InputMask, ScaleRange, int, int, int, bool, ScaleRange, bool);
-static void copy_colors (char *, char *, char *);
+static void copy_colors (char *, const char *, char *);
static void define_module (void);
static struct Options define_options (void);
static void read_scale (Option *, ScaleRange &);
@@ -91,7 +91,7 @@
Atmospheric corrections should be done on the whole
satelite image, not just portions.
*/
-static void adjust_region (char *name, char *mapset)
+static void adjust_region (char *name, const char *mapset)
{
struct Cell_head iimg_head; /* the input image header file */
@@ -406,7 +406,7 @@
/* Copy the colors from map named iname to the map named oname */
-static void copy_colors (char *iname, char *imapset, char *oname)
+static void copy_colors (char *iname, const char *imapset, char *oname)
{
struct Colors colors;
@@ -560,7 +560,8 @@
int oimg_fd; /* output image's file descriptor */
int ialt_fd = -1; /* input elevation map's file descriptor */
int ivis_fd = -1; /* input visibility map's file descriptor */
- char *iimg_mapset, *ialt_mapset, *iviz_mapset;
+ const char *iimg_mapset, *ialt_mapset, *iviz_mapset;
+ struct History hist;
/* Define module */
define_module();
@@ -632,11 +633,15 @@
/* Close the input and output file descriptors */
+ G_short_history(opts.oimg->answer, "raster", &hist);
G_close_cell(iimg_fd);
if(opts.ialt->answer) G_close_cell(ialt_fd);
if(opts.ivis->answer) G_close_cell(ivis_fd);
G_close_cell(oimg_fd);
+ G_command_history(&hist);
+ G_write_history(opts.oimg->answer, &hist);
+
/* Copy the colors of the input raster to the output raster.
Scaling is ignored and color ranges might not be correct. */
copy_colors(opts.iimg->answer, iimg_mapset, opts.oimg->answer);
More information about the grass-commit
mailing list