Forráskód Böngészése

i.ortho.rectify: use time_t where needed, else int

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71274 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 éve
szülő
commit
17563fddac

+ 2 - 2
imagery/i.ortho.photo/i.ortho.rectify/exec.c

@@ -24,7 +24,7 @@ int exec_rectify(char *extension, char *interp_method, char *angle_map)
     struct Categories cats;
     struct History hist;
     int colr_ok, cats_ok;
-    long start_time, rectify_time;
+    time_t start_time, rectify_time;
     double aver_z;
     int elevfd;
     struct cache *ebuffer;
@@ -105,7 +105,7 @@ int exec_rectify(char *extension, char *interp_method, char *angle_map)
 	    report(rectify_time - start_time, 1);
 	}
 	else
-	    report((long)0, 0);
+	    report(0, 0);
 
 	G_free(result);
     }

+ 1 - 1
imagery/i.ortho.photo/i.ortho.rectify/local_proto.h

@@ -36,7 +36,7 @@ block *get_block(struct cache *, int);
 void release_cache(struct cache *);
 
 /* report.c */
-int report(long, int);
+int report(int, int);
 
 /* target.c */
 int get_target(char *);

+ 4 - 4
imagery/i.ortho.photo/i.ortho.rectify/report.c

@@ -1,10 +1,10 @@
 #include <grass/glocale.h>
 #include "global.h"
 
-int report(long rectify, int ok)
+int report(int rectify, int ok)
 {
     int minutes, hours;
-    long seconds;
+    int seconds;
     long ncells;
 
     G_message("%s", ok ? _("complete") : _("failed"));
@@ -20,9 +20,9 @@ int report(long rectify, int ok)
     G_verbose_message(_("%d rows, %d cols (%ld cells) completed in"),
 			target_window.rows, target_window.cols, ncells);
     if (hours)
-	G_verbose_message(_("%d:%02d:%02ld hours"), hours, minutes, seconds % 60);
+	G_verbose_message(_("%d:%02d:%02d hours"), hours, minutes, seconds % 60);
     else
-	G_verbose_message(_("%d:%02ld minutes"), minutes, seconds % 60);
+	G_verbose_message(_("%d:%02d minutes"), minutes, seconds % 60);
     if (seconds)
 	G_verbose_message(_("%.1f cells per minute"),
 			  (60.0 * ncells) / ((double)seconds));