Browse code

2.17.2: fno-common

ramon diaz-uriarte (at Phelsuma) authored on 17/12/2019 15:14:43
Showing 8 changed files

... ...
@@ -1,5 +1,6 @@
1 1
 Changes in version 2.17.2 (2019-12-17):
2 2
 	- Fixed error "length(x) = 5 > 1' in coercion to 'logical(1)'"
3
+	- Compiles with fno-common (for gcc 10).
3 4
 	
4 5
 Changes in version 2.17.1 (2019-11-24):
5 6
 	- rfitness: clarified log=TRUE and truncate_at_0 after log.
... ...
@@ -226,6 +226,7 @@ for the MAGELLAN code.
226 226
   \code{\link{evalAllGenotypes}}
227 227
   \code{\link{allFitnessEffects}}
228 228
   \code{\link{plotFitnessLandscape}}
229
+  \code{\link{Magellan_stats}}  
229 230
 
230 231
 }
231 232
 \examples{
... ...
@@ -14,7 +14,7 @@
14 14
 
15 15
 #define DEFAULT_FITNESS -99999999999
16 16
 
17
-char verbose;   /* if set to non-0 , become verbose */
17
+extern char verbose;   /* if set to non-0 , become verbose */
18 18
 
19 19
 
20 20
 /*
... ...
@@ -16,6 +16,7 @@
16 16
 
17 17
 
18 18
 
19
+
19 20
 void usage( char *prog ){
20 21
 
21 22
 	fprintf(stderr, "Version of Nov 18 2014\n");
... ...
@@ -93,8 +94,9 @@ int main( int argc, char ** argv ){
93 94
 	
94 95
 	int i;
95 96
 
96
-	extern char verbose;                /* level of verbosity */
97
-
97
+	/* extern char verbose; */                  /* level of verbosity */
98
+	char verbose;    
99
+	
98 100
 	int opt;
99 101
 	extern char *optarg;                /* external variables, see man 3 getopt */
100 102
 	extern int optind;
... ...
@@ -57,7 +57,8 @@ int main( int argc, char ** argv ){
57 57
 
58 58
 	char *outfile=NULL;
59 59
 
60
-	verbose=0;
60
+	/* prevent confusion with the other extern verbose */
61
+	char verbose_fl_stats=0;
61 62
 
62 63
 	/*
63 64
 		Parse Input
... ...
@@ -85,7 +86,7 @@ int main( int argc, char ** argv ){
85 86
 				break;
86 87
 				
87 88
 			case 'v':
88
-				verbose=1;
89
+				verbose_fl_stats=1;
89 90
 				break;
90 91
 				
91 92
 			case 's':
... ...
@@ -115,7 +116,7 @@ int main( int argc, char ** argv ){
115 116
 	
116 117
 	h = ReadFile( filename, opt_zero );
117 118
 	
118
-	if(verbose)
119
+	if(verbose_fl_stats)
119 120
 		print_landscape( &h );
120 121
 	
121 122
 	OutputSummaryStats( &h, FitnessRatio, opt_log, opt_short, "coco", outfile );
... ...
@@ -10,7 +10,7 @@
10 10
 #include "summary_statistics.h"
11 11
 #include "models.h"
12 12
 
13
-
13
+/* extern char verbose; */
14 14
 
15 15
 
16 16
 /*
... ...
@@ -21,7 +21,7 @@
21 21
 */
22 22
 
23 23
 void HouseOfCards( struct landscape *l, float sigma){
24
-
24
+  char verbose;
25 25
 	int i;
26 26
 	
27 27
 	if( sigma <= 0 )
... ...
@@ -55,7 +55,8 @@ void HouseOfCards( struct landscape *l, float sigma){
55 55
 */
56 56
 void Multiplicative( struct landscape *l , double s, double stdev, int  opt_single_fitness, float DimRet,  char opt_log )
57 57
 {
58
-	
58
+
59
+  char verbose;
59 60
 	int *genotype=NULL;
60 61
 	float *fa;  
61 62
 	
... ...
@@ -165,7 +166,8 @@ void Multiplicative( struct landscape *l , double s, double stdev, int  opt_sing
165 166
 
166 167
 void Optimum( struct landscape *l , double mean_p, double sigma_p, double mean_o, double sigma_o )
167 168
 {
168
-	
169
+
170
+  char verbose;
169 171
 	int *genotype=NULL;
170 172
 	float *fa;  
171 173
 	
... ...
@@ -266,7 +268,7 @@ void Optimum( struct landscape *l , double mean_p, double sigma_p, double mean_o
266 268
 void Kaufman_NK( struct landscape *l,  int K, short random ){
267 269
 
268 270
 
269
-	extern char verbose;
271
+	char verbose;
270 272
 
271 273
 	int i,j, g;
272 274
 	
... ...
@@ -426,12 +428,11 @@ void Kaufman_NK( struct landscape *l,  int K, short random ){
426 428
 */
427 429
 void Ising( struct landscape *l, float mu_c, float sigma_c, short opt_circ )
428 430
 {
429
-	
431
+  char verbose;
430 432
 	int i,g;
431 433
 	
432 434
 	float *costs;
433 435
 	
434
-	extern char verbose;
435 436
 	
436 437
 	costs = (float *) malloc( (size_t) l->ngenotypes*sizeof(float) );
437 438
 	if(!costs)fprintf(stderr, "Ising: cannot allocate the fitness of alleles, bye"), exit(3);
... ...
@@ -570,7 +571,7 @@ void MixedModel( struct landscape *fl, struct model_opt myoptions, int opt_log )
570 571
 
571 572
 
572 573
 	struct landscape fl_tmp;
573
-	extern char verbose;
574
+	char verbose;
574 575
 
575 576
 	
576 577
 	int g;
... ...
@@ -8,6 +8,12 @@
8 8
 #ifndef _MODELS_H_
9 9
 #define _MODELS_H_
10 10
 
11
+
12
+
13
+extern char verbose;
14
+
15
+
16
+
11 17
 struct model_opt {
12 18
 
13 19
 
... ...
@@ -1,15 +1,15 @@
1 1
 \usepackage[%
2
-		shash={8a06478},
3
-		lhash={8a064788fa0871be4bd6d6fe8be79c0b4f1cd3f7},
2
+		shash={a6c95a3},
3
+		lhash={a6c95a3f05c9d32bbdb27c5634bfc9d5dad7a776},
4 4
 		authname={ramon diaz-uriarte (at Phelsuma)},
5 5
 		authemail={rdiaz02@gmail.com},
6
-		authsdate={2019-11-28},
7
-		authidate={2019-11-28 20:43:07 +0100},
8
-		authudate={1574970187},
6
+		authsdate={2019-12-17},
7
+		authidate={2019-12-17 13:12:29 +0100},
8
+		authudate={1576584749},
9 9
 		commname={ramon diaz-uriarte (at Phelsuma)},
10 10
 		commemail={rdiaz02@gmail.com},
11
-		commsdate={2019-11-28},
12
-		commidate={2019-11-28 20:43:07 +0100},
13
-		commudate={1574970187},
14
-		refnames={ (HEAD -> master, origin/master, origin/HEAD)}
11
+		commsdate={2019-12-17},
12
+		commidate={2019-12-17 13:12:29 +0100},
13
+		commudate={1576584749},
14
+		refnames={ (HEAD -> master)}
15 15
 	]{gitsetinfo}
16 16
\ No newline at end of file