if(strstr(bufferLine,pattern)){// go line by line and check if pattern is in line
break;// line found
}
}
// pattern not found
if(!strstr(bufferLine,pattern)){
return-1;
}
char*linePtr=strstr(bufferLine,pattern);// set pointer to beginning of pattern, so that correct number will be read. Needed when several numbers are in one line
if(strstr(bufferLine,pattern)){// go line by line and check if pattern is in line
break;// line found
}
}
// pattern not found
if(!strstr(bufferLine,pattern)){
return-1;
}
char*linePtr=strstr(bufferLine,pattern);// set pointer to beginning of pattern, so that correct number will be read. Needed when several numbers are in one line