201 seqinfo->
code[0] =
'\0';
202 seqinfo->
name[0] =
'\0';
203 seqinfo->
source[0] =
'\0';
215 while((ch=fgetc(fp)) != EOF && ch !=
'>') ;
218 if(ch==EOF)
return(0);
222 while((ch=fgetc(fp)) != EOF && ch !=
'\n' && i<503)
223 buffer[i++] = (char)ch;
227 if(ch==EOF)
return(0);
233 if(buffer[2] ==
';' && buffer[0] ==
'F')
248 strncpy(seqinfo->
code, ptr, 16);
249 seqinfo->
code[15] =
'\0';
254 for(i=0; seqinfo->
code[i]; i++)
256 if(seqinfo->
code[i] ==
' ' || seqinfo->
code[i] ==
'\t')
258 seqinfo->
code[i] =
'\0';
265 if(!fgets(buffer,240,fp))
280 if((ptr = strstr(buffer,
" - ")) !=
NULL)
283 strncpy(seqinfo->
source, ptr+3, 160);
284 seqinfo->
source[159] =
'\0';
286 strncpy(seqinfo->
name, buffer, 160);
287 seqinfo->
name[159] =
'\0';
301 if((seqs[nseq] = (
char *)malloc(ArraySize *
sizeof(
char)))==
NULL)
312 while((ch = fgetc(fp)) != EOF && ch !=
'*' && ch !=
'>')
316 if(isalpha(ch) || (ch ==
'-' && DoInsert))
319 seqs[nseq][SeqPos++] = (isupper(ch) ? ch : toupper(ch));
322 if(SeqPos >= ArraySize)
325 seqs[nseq] = (
char *)realloc((
void *)(seqs[nseq]),
327 if(seqs[nseq] ==
NULL)
351 while((ch = fgetc(fp)) != EOF &&
352 (ch ==
' ' || ch ==
'\t' || ch ==
'\n')) ;
412 else if(ch ==
';' && chpos == 2)
420 while((ch = fgetc(fp))!=EOF && ch !=
'\n') ;
429 seqs[nseq][SeqPos] =
'\0';
431 if(++nseq >= maxchain)
454 seqs[nseq][SeqPos] =
'\0';
455 if(!strlen(seqs[nseq]))
#define KILLTRAILSPACES(x)
Header file for sequence handling.
int blReadPIR(FILE *fp, BOOL DoInsert, char **seqs, int maxchain, SEQINFO *seqinfo, BOOL *punct, BOOL *error)
#define KILLLEADSPACES(y, x)
System-type variable type definitions.