summarylogtreecommitdiffstats
path: root/drc.diff
blob: 66e76bf6102152b8fd57e2ab8e255057299e440f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
diff --git source/glsweep.c source/glsweep.c
index 342aad6..188e3c1 100644
--- source/glsweep.c
+++ source/glsweep.c
@@ -32,9 +32,8 @@
 #include <stdlib.h>
 #include <math.h>
 
-/* Decommentare per abilitare la compilazione in doppia precisione */
-/* Uncomment to enable double precision computation */
-#define UseDouble
+/* For the UseDouble option */
+#include <drc.h>
 
 #ifdef UseDouble
 	/* Tipo floating point usato per le elaborazioni */
diff --git source/lsconv.c source/lsconv.c
index 299fe55..5554f04 100644
--- source/lsconv.c
+++ source/lsconv.c
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include "fftsg_h.h"
+#include "drc.h"
 
 /* Output stringhe con sync output e parametro */
 int sputsp(const char * s, const char * p)
@@ -216,7 +217,7 @@ int main(int argc, char * argv[])
 			}
 		for(I = 0;I < IS;I++)
 			{
-				if (fread(&RF,sizeof(float),1,IOF) < sizeof(float))
+				if (fread(&RF,sizeof(float),1,IOF) != 1)
 					{
 						perror("Error while reading the inverse file");
 						return 1;
@@ -244,7 +245,7 @@ int main(int argc, char * argv[])
 					Sweep[I] = (DLReal) 0.0;
 				for(I = CS - IS,J = 0;J < RS;I++,J++)
 					{
-						if (fread(&RF,sizeof(float),1,IOF) < sizeof(float))
+						if (fread(&RF,sizeof(float),1,IOF) != 1)
 							{
 								perror("Error while reading the reference file");
 								return 1;
@@ -373,7 +374,7 @@ int main(int argc, char * argv[])
 			}
 		for(I = 0;I < SS;I++)
 			{
-				if (fread(&RF,sizeof(float),1,IOF) < sizeof(float))
+				if (fread(&RF,sizeof(float),1,IOF) != 1)
 					{
 						perror("Error while reading the sweep file");
 						return 1;