tweaks: rearrange a few if statements more symmetrically
parent
d4304ca88c
commit
0353a24400
|
@ -325,15 +325,18 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||||
else
|
else
|
||||||
return haystack + regmatches[0].rm_so;
|
return haystack + regmatches[0].rm_so;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ISSET(CASE_SENSITIVE)) {
|
if (ISSET(CASE_SENSITIVE)) {
|
||||||
if (ISSET(BACKWARDS_SEARCH))
|
if (ISSET(BACKWARDS_SEARCH))
|
||||||
return revstrstr(haystack, needle, start);
|
return revstrstr(haystack, needle, start);
|
||||||
else
|
else
|
||||||
return strstr(start, needle);
|
return strstr(start, needle);
|
||||||
} else if (ISSET(BACKWARDS_SEARCH))
|
}
|
||||||
return mbrevstrcasestr(haystack, needle, start);
|
|
||||||
|
|
||||||
return mbstrcasestr(start, needle);
|
if (ISSET(BACKWARDS_SEARCH))
|
||||||
|
return mbrevstrcasestr(haystack, needle, start);
|
||||||
|
else
|
||||||
|
return mbstrcasestr(start, needle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is a wrapper for the perror() function. The wrapper temporarily
|
/* This is a wrapper for the perror() function. The wrapper temporarily
|
||||||
|
|
Loading…
Reference in New Issue