summarylogtreecommitdiffstats
path: root/time_unit.patch
blob: adc85202e9bc9616382aeb080740fb512fe263b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- src/gasdf.c	2012-07-26 20:08:34.000000000 +0200
+++ src/gasdf.c.new	2013-05-17 15:18:32.374475989 +0200
@@ -867,6 +867,7 @@
 	    gaprnt(0,"gadsdf: Memory Allocation Error for trunc_units\n");
 	    goto err2;
 	  }
+	  if ( time_units[trunc_point] == 's' ) trunc_point --;
 	  strncpy(trunc_units, time_units, trunc_point) ;
 	  trunc_units[trunc_point] = '\0' ;
 	  istart = 1 ;
@@ -965,7 +966,7 @@
 		}
 	      }
 	    } 
-	    else if (compare_units("seconds", trunc_units) == Success) {
+	    else if (compare_units("second", trunc_units) == Success) {
 	      if (incrfactor < 60.0) {
 		gaprnt(0, "gadsdf: Time unit has too small an increment (min. 1 minute).\n") ;
 		goto err2;