Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-biology/readseq/files: 19930201-getline.patch 19930201-ldflags.patch 19930201-buffer.patch 19930201-impl-dec.patch
Date: Sun, 28 Nov 2010 08:57:08
Message-Id: 20101128085648.3B8A320051@flycatcher.gentoo.org
1 jlec 10/11/28 08:56:48
2
3 Added: 19930201-getline.patch 19930201-ldflags.patch
4 19930201-buffer.patch 19930201-impl-dec.patch
5 Log:
6 Fixes fo various problems, #346883
7
8 (Portage version: 2.2.0_alpha5/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 sci-biology/readseq/files/19930201-getline.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-getline.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-getline.patch?rev=1.1&content-type=text/plain
15
16 Index: 19930201-getline.patch
17 ===================================================================
18 diff --git a/ureadseq.c b/ureadseq.c
19 index b11115d..337b16f 100644
20 --- a/ureadseq.c
21 +++ b/ureadseq.c
22 @@ -136,7 +136,7 @@ Local void readline(FILE *f, char *s, long *linestart)
23 }
24 }
25
26 -Local void getline(struct ReadSeqVars *V)
27 +Local void ghettoline(struct ReadSeqVars *V)
28 {
29 readline(V->f, V->s, &V->linestart);
30 }
31 @@ -215,7 +215,7 @@ Local void readLoop(short margin, boolean addfirst,
32
33 if (addfirst) addseq(V->s, V);
34 do {
35 - getline(V);
36 + ghettoline(V);
37 V->done = feof(V->f);
38 V->done |= (*endTest)( &addend, &ungetend, V);
39 if (V->addit && (addend || !V->done) && (strlen(V->s) > margin)) {
40 @@ -246,7 +246,7 @@ Local void readIG(struct ReadSeqVars *V)
41
42 while (!V->allDone) {
43 do {
44 - getline(V);
45 + ghettoline(V);
46 for (si= V->s; *si != 0 && *si < ' '; si++) *si= ' '; /* drop controls */
47 if (*si == 0) *V->s= 0; /* chop line to empty */
48 } while (! (feof(V->f) || ((*V->s != 0) && (*V->s != ';') ) ));
49 @@ -272,13 +272,13 @@ Local void readStrider(struct ReadSeqVars *V)
50 { /* ? only 1 seq/file ? */
51
52 while (!V->allDone) {
53 - getline(V);
54 + ghettoline(V);
55 if (strstr(V->s,"; DNA sequence ") == V->s)
56 strcpy(V->seqid, (V->s)+16);
57 else
58 strcpy(V->seqid, (V->s)+1);
59 while ((!feof(V->f)) && (*V->s == ';')) {
60 - getline(V);
61 + ghettoline(V);
62 }
63 if (feof(V->f)) V->allDone = true;
64 else readLoop(0, true, endStrider, V);
65 @@ -298,16 +298,16 @@ Local void readPIR(struct ReadSeqVars *V)
66
67 while (!V->allDone) {
68 while (! (feof(V->f) || strstr(V->s,"ENTRY") || strstr(V->s,"SEQUENCE")) )
69 - getline(V);
70 + ghettoline(V);
71 strcpy(V->seqid, (V->s)+16);
72 while (! (feof(V->f) || strstr(V->s,"SEQUENCE") == V->s))
73 - getline(V);
74 + ghettoline(V);
75 readLoop(0, false, endPIR, V);
76
77 if (!V->allDone) {
78 while (! (feof(V->f) || ((*V->s != 0)
79 && (strstr( V->s,"ENTRY") == V->s))))
80 - getline(V);
81 + ghettoline(V);
82 }
83 if (feof(V->f)) V->allDone = true;
84 }
85 @@ -327,13 +327,13 @@ Local void readGenBank(struct ReadSeqVars *V)
86 while (!V->allDone) {
87 strcpy(V->seqid, (V->s)+12);
88 while (! (feof(V->f) || strstr(V->s,"ORIGIN") == V->s))
89 - getline(V);
90 + ghettoline(V);
91 readLoop(0, false, endGB, V);
92
93 if (!V->allDone) {
94 while (! (feof(V->f) || ((*V->s != 0)
95 && (strstr( V->s,"LOCUS") == V->s))))
96 - getline(V);
97 + ghettoline(V);
98 }
99 if (feof(V->f)) V->allDone = true;
100 }
101 @@ -364,11 +364,11 @@ Local void readNBRF(struct ReadSeqVars *V)
102 {
103 while (!V->allDone) {
104 strcpy(V->seqid, (V->s)+4);
105 - getline(V); /*skip title-junk line*/
106 + ghettoline(V); /*skip title-junk line*/
107 readLoop(0, false, endNBRF, V);
108 if (!V->allDone) {
109 while (!(feof(V->f) || (*V->s != 0 && *V->s == '>')))
110 - getline(V);
111 + ghettoline(V);
112 }
113 if (feof(V->f)) V->allDone = true;
114 }
115 @@ -390,7 +390,7 @@ Local void readPearson(struct ReadSeqVars *V)
116 readLoop(0, false, endPearson, V);
117 if (!V->allDone) {
118 while (!(feof(V->f) || ((*V->s != 0) && (*V->s == '>'))))
119 - getline(V);
120 + ghettoline(V);
121 }
122 if (feof(V->f)) V->allDone = true;
123 }
124 @@ -410,14 +410,14 @@ Local void readEMBL(struct ReadSeqVars *V)
125 while (!V->allDone) {
126 strcpy(V->seqid, (V->s)+5);
127 do {
128 - getline(V);
129 + ghettoline(V);
130 } while (!(feof(V->f) | (strstr(V->s,"SQ ") == V->s)));
131
132 readLoop(0, false, endEMBL, V);
133 if (!V->allDone) {
134 while (!(feof(V->f) |
135 ((*V->s != '\0') & (strstr(V->s,"ID ") == V->s))))
136 - getline(V);
137 + ghettoline(V);
138 }
139 if (feof(V->f)) V->allDone = true;
140 }
141 @@ -437,13 +437,13 @@ Local void readZuker(struct ReadSeqVars *V)
142 /*! 1st string is Zuker's Fortran format */
143
144 while (!V->allDone) {
145 - getline(V); /*s == "seqLen seqid string..."*/
146 + ghettoline(V); /*s == "seqLen seqid string..."*/
147 strcpy(V->seqid, (V->s)+6);
148 readLoop(0, false, endZuker, V);
149 if (!V->allDone) {
150 while (!(feof(V->f) |
151 ((*V->s != '\0') & (*V->s == '('))))
152 - getline(V);
153 + ghettoline(V);
154 }
155 if (feof(V->f)) V->allDone = true;
156 }
157 @@ -486,7 +486,7 @@ Local void readPlain(struct ReadSeqVars *V)
158 do {
159 addseq(V->s, V);
160 V->done = feof(V->f);
161 - getline(V);
162 + ghettoline(V);
163 } while (!V->done);
164 if (V->choice == kListSequences) addinfo(V->seqid, V);
165 V->allDone = true;
166 @@ -498,7 +498,7 @@ Local void readUWGCG(struct ReadSeqVars *V)
167 /*
168 10nov91: Reading GCG files casued duplication of last line when
169 EOF followed that line !!!
170 - fix: getline now sets *V->s = 0
171 + fix: ghettoline now sets *V->s = 0
172 */
173 char *si;
174
175 @@ -512,7 +512,7 @@ Local void readUWGCG(struct ReadSeqVars *V)
176 else if (si = strstr(V->seqid,"..")) *si = 0;
177 do {
178 V->done = feof(V->f);
179 - getline(V);
180 + ghettoline(V);
181 if (!V->done) addseq((V->s), V);
182 } while (!V->done);
183 if (V->choice == kListSequences) addinfo(V->seqid, V);
184 @@ -531,7 +531,7 @@ Local void readOlsen(struct ReadSeqVars *V)
185 if (V->addit) V->seqlen = 0;
186 rewind(V->f); V->nseq= 0;
187 do {
188 - getline(V);
189 + ghettoline(V);
190 V->done = feof(V->f);
191
192 if (V->done && !(*V->s)) break;
193 @@ -614,7 +614,7 @@ Local void readMSF(struct ReadSeqVars *V)
194 if (V->addit) V->seqlen = 0;
195 rewind(V->f); V->nseq= 0;
196 do {
197 - getline(V);
198 + ghettoline(V);
199 V->done = feof(V->f);
200
201 if (V->done && !(*V->s)) break;
202 @@ -685,7 +685,7 @@ Local void readPAUPinterleaved(struct ReadSeqVars *V)
203 domatch= (V->matchchar > 0);
204
205 do {
206 - getline(V);
207 + ghettoline(V);
208 V->done = feof(V->f);
209
210 if (V->done && !(*V->s)) break;
211 @@ -766,7 +766,7 @@ Local void readPAUPsequential(struct ReadSeqVars *V)
212 /* rewind(V->f); V->nseq= 0; << do in caller !*/
213 indata= true; /* call here after we find "matrix" */
214 do {
215 - getline(V);
216 + ghettoline(V);
217 V->done = feof(V->f);
218
219 if (V->done && !(*V->s)) break;
220 @@ -851,7 +851,7 @@ Local void readPhylipInterleaved(struct ReadSeqVars *V)
221 /* fprintf(stderr,"Phylip-ileaf: topnseq=%d topseqlen=%d\n",V->topnseq, V->topseqlen); */
222
223 do {
224 - getline(V);
225 + ghettoline(V);
226 V->done = feof(V->f);
227
228 if (V->done && !(*V->s)) break;
229 @@ -904,7 +904,7 @@ Local void readPhylipSequential(struct ReadSeqVars *V)
230 while (isdigit(*si)) si++;
231 skipwhitespace(si);
232 V->topseqlen= atol(si);
233 - getline(V);
234 + ghettoline(V);
235 while (!V->allDone) {
236 V->seqlencount= 0;
237 strncpy(V->seqid, (V->s), 10);
238 @@ -935,10 +935,10 @@ Local void readSeqMain(
239 V->err = eFileNotFound;
240 else {
241
242 - for (l = skiplines_; l > 0; l--) getline( V);
243 + for (l = skiplines_; l > 0; l--) ghettoline( V);
244
245 do {
246 - getline( V);
247 + ghettoline( V);
248 for (l= strlen(V->s); (l > 0) && (V->s[l] == ' '); l--) ;
249 } while ((l == 0) && !feof(V->f));
250
251 @@ -963,7 +963,7 @@ Local void readSeqMain(
252 char *cp;
253 /* rewind(V->f); V->nseq= 0; ?? assume it is at top ?? skiplines ... */
254 while (!done) {
255 - getline( V);
256 + ghettoline( V);
257 tolowerstr( V->s);
258 if (strstr( V->s, "matrix")) done= true;
259 if (strstr( V->s, "interleav")) interleaved= true;
260 @@ -995,7 +995,7 @@ Local void readSeqMain(
261 break;
262
263 case kFitch :
264 - strcpy(V->seqid, V->s); getline(V);
265 + strcpy(V->seqid, V->s); ghettoline(V);
266 readFitch(V);
267 break;
268
269 @@ -1003,7 +1003,7 @@ Local void readSeqMain(
270 do {
271 gotuw = (strstr(V->s,"..") != NULL);
272 if (gotuw) readUWGCG(V);
273 - getline(V);
274 + ghettoline(V);
275 } while (!(feof(V->f) || V->allDone));
276 break;
277 }
278
279
280
281 1.1 sci-biology/readseq/files/19930201-ldflags.patch
282
283 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-ldflags.patch?rev=1.1&view=markup
284 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-ldflags.patch?rev=1.1&content-type=text/plain
285
286 Index: 19930201-ldflags.patch
287 ===================================================================
288 diff --git a/Makefile b/Makefile
289 index 40a5a92..f073aaa 100644
290 --- a/Makefile
291 +++ b/Makefile
292 @@ -40,7 +40,7 @@ all: build test
293
294 build: $(SOURCES)
295 @echo "Compiling readseq..."
296 - $(CC) $(CFLAGS) -o readseq readseq.c ureadseq.c
297 + $(CC) $(LDFLAGS) $(CFLAGS) -o readseq readseq.c ureadseq.c
298
299 # if using NCBI, uncomment these lines in place of build: above
300 #build: $(SOURCES)
301
302
303
304 1.1 sci-biology/readseq/files/19930201-buffer.patch
305
306 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-buffer.patch?rev=1.1&view=markup
307 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-buffer.patch?rev=1.1&content-type=text/plain
308
309 Index: 19930201-buffer.patch
310 ===================================================================
311 diff --git a/ureadseq.c b/ureadseq.c
312 index 337b16f..3f8e7f6 100644
313 --- a/ureadseq.c
314 +++ b/ureadseq.c
315 @@ -1578,7 +1578,7 @@ short writeSeq(FILE *outf, const char *seq, const long seqlen,
316
317 short linesout = 0, seqtype = kNucleic;
318 long i, j, l, l1, ibase;
319 - char idword[31], endstr[10];
320 + char idword[31], endstr[32];
321 char seqnamestore[128], *seqname = seqnamestore;
322 char s[kMaxseqwidth], *cp;
323 char nameform[10], numform[10], nocountsymbols[10];
324
325
326
327 1.1 sci-biology/readseq/files/19930201-impl-dec.patch
328
329 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-impl-dec.patch?rev=1.1&view=markup
330 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/readseq/files/19930201-impl-dec.patch?rev=1.1&content-type=text/plain
331
332 Index: 19930201-impl-dec.patch
333 ===================================================================
334 diff --git a/readseq.c b/readseq.c
335 index 305d23a..9b02a17 100644
336 --- a/readseq.c
337 +++ b/readseq.c
338 @@ -171,6 +171,7 @@ link -w -o readseq -t MPST -c 'MPS ' 
339 #include <stdio.h>
340 #include <string.h>
341 #include <ctype.h>
342 +#include <stdlib.h>
343
344 #include "ureadseq.h"
345
346 diff --git a/ureadseq.c b/ureadseq.c
347 index 3f8e7f6..799b315 100644
348 --- a/ureadseq.c
349 +++ b/ureadseq.c
350 @@ -20,6 +20,7 @@
351 #include <stdio.h>
352 #include <ctype.h>
353 #include <string.h>
354 +#include <stdlib.h>
355
356 #define UREADSEQ_G
357 #include "ureadseq.h"