130 buffer = (
char *)malloc((maxres+1) *
sizeof(char));
131 if(!buffer)
return(0);
134 fgets(buffer,maxres-1,fp);
135 fgets(buffer,maxres-1,fp);
138 while(rescount<maxres && !feof(fp))
145 buffer[rescount] = ch;
147 if(isalpha(buffer[rescount]))
152 buffer[rescount] = (isupper(buffer[rescount]) ?
154 toupper(buffer[rescount]));
157 else if(buffer[rescount] ==
'*')
162 buffer[rescount] =
'\0';
163 seqs[chain] = (
char *)malloc((rescount+2)*
sizeof(char));
164 if(!seqs[chain])
return(-1);
165 strcpy(seqs[chain],buffer);
174 buffer[rescount] =
'\0';
175 seqs[chain] = (
char *)malloc((rescount+2)*
sizeof(char));
179 for(i=0; i<=chain; i++)
181 if(seqs[i]) free(seqs[i]);
185 strcpy(seqs[chain],buffer);
int blReadSimplePIR(FILE *fp, int maxres, char **seqs)