nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 0353a24400c9f5903af510e59c5e831a846a51f5
parent d4304ca88c5b8e3810f4e23c49dc48614922a13d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 13 Apr 2018 20:43:08 +0200

tweaks: rearrange a few if statements more symmetrically

Diffstat:
Msrc/utils.c | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/utils.c b/src/utils.c @@ -325,15 +325,18 @@ const char *strstrwrapper(const char *haystack, const char *needle, else return haystack + regmatches[0].rm_so; } + if (ISSET(CASE_SENSITIVE)) { if (ISSET(BACKWARDS_SEARCH)) return revstrstr(haystack, needle, start); else 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