This enables:
* Multiple filters in the main panel and strace etc. views
* Multiple search terms
The search terms are separated by "|" and are still fixed strings
matched case-insensitive.
Added a multi flag at request of BenBE.
The function strcasestr(3) is only available if _GNU_SOURCE is defined.
If any file includes <string.h> before declaring _GNU_SOURCE, e.g by
including "config.h", compilation fails with the following error:
In file included from ColumnsPanel.c:8:
In file included from ./ColumnsPanel.h:12:
In file included from ./Panel.h:13:
In file included from ./CRT.h:16:
In file included from ./Settings.h:17:
In file included from ./Process.h:15:
In file included from ./Object.h:17:
./XUtils.h:42:11: error: implicit declaration of function 'strcasestr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return strcasestr(s1, s2) != NULL;
^
./XUtils.h:42:11: note: did you mean 'strcasecmp'?
/usr/include/strings.h:116:12: note: 'strcasecmp' declared here
extern int strcasecmp (const char *__s1, const char *__s2)
^
Move the implementation to avoid unnecessary includes.
Since LTO is quite common and stable performance should not be impacted
if used.
- allow count out-parameter of String_split() to be NULL
- introduce xStrndup()
- do not allow NULL pointers passed to String_eq()
it is not used in any code
- implement String_startsWith(), String_contains_i() and String_eq()
as inline header functions
- adjust several conversion issues