top: extend case-insensitive option to include 'Locate'
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
ce82c3ea37
commit
0c874637ee
@ -2850,7 +2850,7 @@ static void find_string (int ch) {
|
|||||||
if (str[0]) {
|
if (str[0]) {
|
||||||
for (i = Curwin->begtask; i < Frame_maxtask; i++) {
|
for (i = Curwin->begtask; i < Frame_maxtask; i++) {
|
||||||
task_show(Curwin, Curwin->ppt[i], buf);
|
task_show(Curwin, Curwin->ppt[i], buf);
|
||||||
if (strstr(buf, str)) {
|
if (STRSTR(buf, str)) {
|
||||||
found = 1;
|
found = 1;
|
||||||
if (i == Curwin->begtask) continue;
|
if (i == Curwin->begtask) continue;
|
||||||
Curwin->begtask = i;
|
Curwin->begtask = i;
|
||||||
|
18
top/top.h
18
top/top.h
@ -39,7 +39,7 @@
|
|||||||
//#define PRETENDNOCAP /* use a terminal without essential caps */
|
//#define PRETENDNOCAP /* use a terminal without essential caps */
|
||||||
//#define RCFILE_NOERR /* rcfile errs silently default, vs. fatal */
|
//#define RCFILE_NOERR /* rcfile errs silently default, vs. fatal */
|
||||||
//#define RMAN_IGNORED /* don't consider auto right margin glitch */
|
//#define RMAN_IGNORED /* don't consider auto right margin glitch */
|
||||||
//#define STRCMPNOCASE /* use strcasecmp vs. strcmp when sorting */
|
//#define STRINGCASENO /* case insenstive compare/locate versions */
|
||||||
//#define TERMIO_PROXY /* true line editing, beyond native input */
|
//#define TERMIO_PROXY /* true line editing, beyond native input */
|
||||||
//#define TREE_NORESET /* sort keys do NOT force forest view OFF */
|
//#define TREE_NORESET /* sort keys do NOT force forest view OFF */
|
||||||
//#define TREE_ONEPASS /* for speed, tolerate dangling children */
|
//#define TREE_ONEPASS /* for speed, tolerate dangling children */
|
||||||
@ -73,10 +73,14 @@
|
|||||||
#define linux_version_code LINUX_VERSION(2,5,43)
|
#define linux_version_code LINUX_VERSION(2,5,43)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STRCMPNOCASE
|
#ifdef STRINGCASENO
|
||||||
#define STRSORTCMP strcasecmp
|
// pretend as if #define _GNU_SOURCE
|
||||||
|
char *strcasestr(const char *haystack, const char *needle);
|
||||||
|
#define STRSTR strcasestr
|
||||||
|
#define STRCMP strcasecmp
|
||||||
#else
|
#else
|
||||||
#define STRSORTCMP strcmp
|
#define STRSTR strstr
|
||||||
|
#define STRCMP strcmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -412,13 +416,13 @@ typedef struct WIN_t {
|
|||||||
#define SCB_STRS(f,s) \
|
#define SCB_STRS(f,s) \
|
||||||
static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
|
static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
|
||||||
if (!(*P)->s || !(*Q)->s) return SORT_eq; \
|
if (!(*P)->s || !(*Q)->s) return SORT_eq; \
|
||||||
return Frame_srtflg * STRSORTCMP((*Q)->s, (*P)->s); }
|
return Frame_srtflg * STRCMP((*Q)->s, (*P)->s); }
|
||||||
#define SCB_STRV(f,b,v,s) \
|
#define SCB_STRV(f,b,v,s) \
|
||||||
static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
|
static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
|
||||||
if (b) { \
|
if (b) { \
|
||||||
if (!(*P)->v || !(*Q)->v) return SORT_eq; \
|
if (!(*P)->v || !(*Q)->v) return SORT_eq; \
|
||||||
return Frame_srtflg * STRSORTCMP((*Q)->v[0], (*P)->v[0]); } \
|
return Frame_srtflg * STRCMP((*Q)->v[0], (*P)->v[0]); } \
|
||||||
return Frame_srtflg * STRSORTCMP((*Q)->s, (*P)->s); }
|
return Frame_srtflg * STRCMP((*Q)->s, (*P)->s); }
|
||||||
#define SCB_STRX(f,s) \
|
#define SCB_STRX(f,s) \
|
||||||
int strverscmp(const char *s1, const char *s2); \
|
int strverscmp(const char *s1, const char *s2); \
|
||||||
static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
|
static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user