فهرست منبع

0 -> NULL; copy history if possible

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45171 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 سال پیش
والد
کامیت
1bc95e9701
2فایلهای تغییر یافته به همراه5 افزوده شده و 7 حذف شده
  1. 4 6
      imagery/i.rectify/exec.c
  2. 1 1
      imagery/i.rectify/main.c

+ 4 - 6
imagery/i.rectify/exec.c

@@ -55,7 +55,8 @@ int exec_rectify(int order, char *extension, char *interp_method)
 	    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 @@ int exec_rectify(int order, char *extension, char *interp_method)
 		    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();

+ 1 - 1
imagery/i.rectify/main.c

@@ -223,7 +223,7 @@ int main(int argc, char *argv[])
 	    }
 	    else {
 		name = ifile->answers[m];
-		mapset = 0;
+		mapset = NULL;
 	    }
 
 	    got_file = 0;