Commit f08f2137 authored by rswindell's avatar rswindell
Browse files

findstr_in_list() improvement - if each search string/expression in the list

is a negative search (i.e. begins with '!'), then every string must match
for the function to return TRUE.
parent 104299dc
......@@ -196,12 +196,18 @@ BOOL DLLCALL findstr_in_list(const char* insearchof, str_list_t list)
{
size_t index;
BOOL found=FALSE;
char* p;
if(list==NULL || insearchof==NULL)
return(FALSE);
for(index=0;list[index]!=NULL && !found; index++)
found=findstr_in_string(insearchof, list[index]);
for(index=0; list[index]!=NULL; index++) {
p=list[index];
SKIP_WHITESPACE(p);
found=findstr_in_string(insearchof,p);
if(found!=(*p=='!'))
break;
}
return(found);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment