summaryrefslogtreecommitdiff
path: root/sci-biology/tree-puzzle/files/tree-puzzle-5.2-C99-decls.patch
blob: 98456c0dacc147d73e910b7ad06bb55d2ea6e924 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
--- a/src/consensus.c
+++ b/src/consensus.c
@@ -32,7 +32,7 @@
 /******************************************************************************/
 
 /* prepare for consensus tree analysis */
-void initconsensus()
+void initconsensus(void)
 {
 #	if ! PARALLEL
 		biparts = new_cmatrix(Maxspc-3, Maxspc);
--- a/src/consensus.h
+++ b/src/consensus.h
@@ -65,7 +65,7 @@
 /******************************************************************************/
 
 /* prepare for consensus tree analysis */
-void initconsensus();
+void initconsensus(void);
 
 /* recursive function to get bipartitions */
 /* traversal should be optimazable (HAS) */
--- a/src/ml1.c
+++ b/src/ml1.c
@@ -244,7 +244,7 @@
 /***************************** exported functions *****************************/
 
 
-void evaluateseqs()
+void evaluateseqs(void)
 {	
 	ivector ali;
 
@@ -1018,7 +1018,7 @@
 
 
 /* compute 1 PAM rate matrix, its eigensystem, and the inverse matrix thereof */
-void tranprobmat()
+void tranprobmat(void)
 {
 	eigensystem(Eval, Evec); /* eigensystem of 1 PAM rate matrix */
 	luinverse(Evec, Ievc, tpmradix); /* inverse eigenvectors are in Ievc */
@@ -1324,7 +1324,7 @@
 
 
 /* initialize distance matrix */
-void initdistan()
+void initdistan(void)
 {
 	int i, j, k, diff, x, y;
 	double obs, temp;
@@ -1478,7 +1478,7 @@
 
 #else /* not PARALLEL */
 
-void computedistan()
+void computedistan(void)
 {
 	int i, j;
 
--- a/src/ml2.c
+++ b/src/ml2.c
@@ -1036,7 +1036,7 @@
 
 
 /* preparation for ML analysis */
-void mlstart()
+void mlstart(void)
 {
 	/* number of states and code length */
 	tpmradix = gettpmradix();
@@ -1098,7 +1098,7 @@
 
 
 /* cleanup after ML analysis */
-void mlfinish()
+void mlfinish(void)
 {
 	if (Ctree != NULL)
 		free_tree(Ctree, Numspc);
@@ -1566,7 +1566,7 @@
                              int bestratefound,
                              int ncats)    /* numcats */
 #endif
-void findbestratecombination()
+void findbestratecombination(void)
 {
 	int k, u;
 	double bestvalue, fv2;
@@ -2147,7 +2147,7 @@
 } /* clock_lklhd */
 
 /* find out the edge containing the root */
-int findrootedge()
+int findrootedge(void)
 {
 	int e, ebest;
 	double logbest, logtest;
--- a/src/mlparam.c
+++ b/src/mlparam.c
@@ -70,7 +70,7 @@
 }
 
 /* compute rates of each category when rates are Gamma-distributed */
-void updaterates()
+void updaterates(void)
 {
 	int i;
 	double alpha;
@@ -190,7 +190,7 @@
 }
 
 /* estimate substitution process parameters - random quartets */
-void optimseqevolparamsquart()
+void optimseqevolparamsquart(void)
 {
 	double tsmeanold, yrmeanold;
 	dvector tslist, yrlist;
@@ -320,7 +320,7 @@
 
 
 /* optimize substitution process parameters - tree */
-void optimseqevolparamstree()
+void optimseqevolparamstree(void)
 {
 	twodimenmin(EPSILON_SUBSTPARAM,
 		(SH_optn || nuc_optn) && optim_optn && (data_optn == 0),
@@ -379,7 +379,7 @@
 
 
 /* optimize rate heterogeneity parameters */
-void optimrateparams()
+void optimrateparams(void)
 {	
 	twodimenmin(EPSILON_RATEPARAM,
 		fracinv_optim,
@@ -396,7 +396,7 @@
 
 /* estimate parameters of substitution process and rate heterogeneity - no tree
    n-taxon tree is not needed because of quartet method or NJ tree topology */
-void estimateparametersnotree()
+void estimateparametersnotree(void)
 {
 	int it, nump, change;
 	double TSold, YRold, FIold, GEold;
@@ -495,7 +495,7 @@
 
 /* estimate parameters of substitution process and rate heterogeneity - tree
    same as above but here the n-taxon tree is already in memory */
-void estimateparameterstree()
+void estimateparameterstree(void)
 {
 	int it, nump, change;
 	double TSold, YRold, FIold, GEold;
--- a/src/model1.c
+++ b/src/model1.c
@@ -31,7 +31,7 @@
 #include "ml.h"
 
 /* number of states of the selected model */ 
-int gettpmradix()
+int gettpmradix(void)
 {
 	if (data_optn == 0) { /* nucleotides */
 		if (nuc_optn) return 4;
--- a/src/puzzle1.c
+++ b/src/puzzle1.c
@@ -345,7 +345,7 @@
 /******************************************************************************/
 
 /* compute TN parameters according to F84 Ts/Tv ratio */
-void makeF84model()
+void makeF84model(void)
 {
 	double rho, piA, piC, piG, piT, piR, piY, ts, yr;
 	
@@ -390,7 +390,7 @@
 } /* makeF84model */
 
 /* compute number of quartets used in LM analysis */
-void compnumqts()
+void compnumqts(void)
 {
 	if (lmqts == 0) {
 		if (numclust == 4)
@@ -407,7 +407,7 @@
 } /* compnumqts */
 
 /* set options interactively */
-void setoptions()
+void setoptions(void)
 {	
 	int i, valid;
 	double sumfreq;
@@ -1718,7 +1718,7 @@
 } /* closefile */
 
 /* symmetrize doublet frequencies */
-void symdoublets()
+void symdoublets(void)
 {
 	int i, imean;
 	double mean;
@@ -1769,7 +1769,7 @@
 } /* symdoublets */
 
 /* show Ts/Tv ratio and Ts Y/R ratio */
-void computeexpectations()
+void computeexpectations(void)
 {
 	double AlphaYBeta, AlphaRBeta, piR, piY, num, denom, pyr, pur;
 	
@@ -4604,7 +4604,7 @@
 /* Reconstruct a tree with QP */
 /* (parameter estimation already done) */
 
-void recon_tree()
+void recon_tree(void)
 {
 	int i;
 	unsigned char tmpweight;
@@ -4848,7 +4848,7 @@
 
 /***************************************************************/ 
 
-void map_lklhd()
+void map_lklhd(void)
 {	
 	int i, a, a1, a2, b, b1, b2, c, c1, c2, d;
 	uli nq;
@@ -5101,7 +5101,7 @@
 
 /***************************************************************/ 
 
-void setdefaults() {
+void setdefaults(void) {
 
   strcpy(INFILE,     INFILEDEFAULT);
   strcpy(OUTFILE,    OUTFILEDEFAULT);
@@ -6027,7 +6027,7 @@
 
 /***************************************************************/ 
 
-void memcleanup() { 
+void memcleanup(void) { 
 	if (puzzlemode == QUARTPUZ && typ_optn == TREERECON_OPTN) {
 		free(splitfreqs);
 		free(splitpatterns);
--- a/src/puzzle2.c
+++ b/src/puzzle2.c
@@ -860,7 +860,7 @@
 
 
 /* estimate mean base frequencies from translated data set */
-void estimatebasefreqs()
+void estimatebasefreqs(void)
 {
 	int tpmradix, i, j;
 	uli all, *gene;
@@ -903,7 +903,7 @@
 
 
 /* guess model of substitution */
-void guessmodel()
+void guessmodel(void)
 {
 	double c1, c2, c3, c4, c5, c6;
 	dvector f;
@@ -1160,7 +1160,7 @@
 } /* callocquartets */
 
 /* free quartet memory */
-void freequartets()
+void freequartets(void)
 {	
 	free(quartetinfo);
 } /* freequartets */
@@ -1357,7 +1357,7 @@
 /*************************/
 
 /* checks out all possible quartets */
-void computeallquartets()
+void computeallquartets(void)
 {	
 	double onethird;
 	uli nq;
--- a/src/sprng/makeseed.c
+++ b/src/sprng/makeseed.c
@@ -1,10 +1,6 @@
 #include <time.h>
 
-#ifdef __STDC__
-int make_new_seed()
-#else
-int make_new_seed()
-#endif
+int make_new_seed(void)
 {
   time_t tp;
   struct tm *temp;
--- a/src/sprng/primes-lcg64.c
+++ b/src/sprng/primes-lcg64.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include "primes-lcg64.h"
 #include "primelist-lcg64.h"
 
--- a/src/treesort.c
+++ b/src/treesort.c
@@ -487,7 +487,7 @@
 /**********/
 
 /* malloc new tree list item */
-treelistitemtype *gettreelistitem()
+treelistitemtype *gettreelistitem(void)
 {
 	treelistitemtype *tmpptr;
 	tmpptr = (treelistitemtype *)calloc((size_t) 1, sizeof(treelistitemtype));
--- a/src/treesort.h
+++ b/src/treesort.h
@@ -84,7 +84,7 @@
 /**********/
 
 /* allocate memory for ctree 3 ints pointer plus 1 check byte */
-int *initctree();
+int *initctree(void);
 
 /**********/
 
@@ -174,7 +174,7 @@
 /**********/
 
 /* malloc new tree list item */
-treelistitemtype *gettreelistitem();
+treelistitemtype *gettreelistitem(void);
 
 /**********/
 
--- a/src/util.c
+++ b/src/util.c
@@ -507,7 +507,7 @@
 #define EPS 1.2e-7
 #define RNMX (1.0-EPS)
 
-double randomunitintervall()
+double randomunitintervall(void)
 /* Long period (> 2e18) random number generator. Returns a uniform random
    deviate between 0.0 and 1.0 (exclusive of endpoint values).
 
@@ -734,7 +734,7 @@
 /* Reads characters from stdin until a newline character or EOF
    is received.  The newline is not made part of the string.
    If an error occurs a null string \0 is returned */
-cvector mygets()
+cvector mygets(void)
 {
 	int c, n;
 	cvector str;