topzFix2-3.0.3.patch

This commit is contained in:
albert 2002-10-13 18:23:22 +00:00
parent 52171277d8
commit 1f954c1e44

16
top.c
View File

@ -1756,7 +1756,7 @@ static void frame_states (proc_t **ppt, int show)
// reuse memory each time around // reuse memory each time around
hist_tmp = hist_sav; hist_tmp = hist_sav;
hist_sav = hist_new; hist_sav = hist_new;
hist_new = tmp; hist_new = hist_tmp;
total = running = sleeping = stopped = zombie = 0; total = running = sleeping = stopped = zombie = 0;
@ -2412,18 +2412,20 @@ static void do_key (unsigned c)
case '<': case '<':
if (VIZCHKc) { if (VIZCHKc) {
PFLG_t *p = PFLG_t *p = Curwin->procflags + Curwin->maxpflgs - 1;
memchr(Curwin->procflags, Curwin->sortindx, Curwin->maxpflgs); while (*p != Curwin->sortindx)
if (p && --p >= Curwin->procflags) --p;
if (--p >= Curwin->procflags)
Curwin->sortindx = *p; Curwin->sortindx = *p;
} }
break; break;
case '>': case '>':
if (VIZCHKc) { if (VIZCHKc) {
PFLG_t *p = PFLG_t *p = Curwin->procflags;
memchr(Curwin->procflags, Curwin->sortindx, Curwin->maxpflgs); while (*p != Curwin->sortindx)
if (p && ++p < Curwin->procflags + Curwin->maxpflgs) ++p;
if (++p < Curwin->procflags + Curwin->maxpflgs)
Curwin->sortindx = *p; Curwin->sortindx = *p;
} }
break; break;