long SearchFileStr(const char *file,const char *str)
{
FILE *fp;
char s[MAXSTRLEN];
long l=-1;
if((fp=fopen(file,"rt")) == NULL)
return -1;
while(fscanf(fp,"%s",s) != -1)
{
if(strstr(s,str))
{
l=ftell(fp)-strlen(s);
break;
}
}
fclose(fp);
return l;
}