#include "rxn.h"
#include "simplex.h"
extern int inlist();
extern void setfiles();
extern char *strtok();
extern int strlen();
splist(fpdata,l) FILE *fpdata; int *l;
{
int i, k ;
char line[4000];
char dummy[10];
char *word;
char *tokens=" $ ,+;:(){}[]";
altlist = (char *)malloc(strlen(SPECIES)+1);
line[0] = '\0';
for (i=0; i< NSF; i++)
{
fscanf(fpdata,"%s",dummy);
strcat(line," ");
strcat(line,dummy);
}
word = strtok(line,tokens);
k = 1;
while(word) {
i= inlist(SPECIES,word);
if (i> 0) l[k++] = i;
word = strtok(NULL,tokens);
}
k--;
/* free(altlist); */
return (k);
}
|