diff --git a/top/top.c b/top/top.c index 3dd43cbd..e685699f 100644 --- a/top/top.c +++ b/top/top.c @@ -761,7 +761,8 @@ static void show_special (int interact, const char *glob) { case 0: // no end delim, captab makes normal *(sub_end + 1) = '\0'; // extend str end, then fall through *(sub_end + 2) = '\0'; // ( +1 optimization for usual path ) - case 1 ... 8: + case 1: case 2: case 3: case 4: + case 5: case 6: case 7: case 8: *sub_end = '\0'; snprintf(tmp, sizeof(tmp), "%s%.*s%s", Curwin->captab[ch], room, sub_beg, Caps_off); rp = scat(rp, tmp); @@ -2299,7 +2300,7 @@ static void configs_read (void) { # error Hey, fix the above fscanf 'PFLAGSSIZ' dependency ! #endif if (3 != fscanf(fp, "\twinflags=%d, sortindx=%d, maxtasks=%d\n" - , &w->rc.winflags, (int*)&w->rc.sortindx, &w->rc.maxtasks)) + , &w->rc.winflags, &w->rc.sortindx, &w->rc.maxtasks)) goto default_or_error; if (4 != fscanf(fp, "\tsummclr=%d, msgsclr=%d, headclr=%d, taskclr=%d\n" , &w->rc.summclr, &w->rc.msgsclr @@ -2569,7 +2570,7 @@ static WIN_t *win_select (char ch) { case 'w': // (however those letters work via w = w->prev; // the pmt too but gee, end-loser break; // should just press the darn key) - case '1' ... '4': + case '1': case '2' : case '3': case '4': w = &Winstk[ch - '1']; break; default: // keep gcc happy @@ -2664,7 +2665,8 @@ static void wins_colors (void) { clr = *pclr; tgt = ch; break; - case '0' ... '7': + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': clr = ch - '0'; *pclr = clr; break; diff --git a/top/top.h b/top/top.h index a9444272..46e97daf 100644 --- a/top/top.h +++ b/top/top.h @@ -291,8 +291,8 @@ enum warn_enum { /* This type helps support both a window AND the rcfile */ typedef struct RCW_t { // the 'window' portion of an rcfile - FLG_t sortindx; // sort field, represented as a procflag - int winflags, // 'view', 'show' and 'sort' mode flags + int sortindx, // sort field, represented as a procflag + winflags, // 'view', 'show' and 'sort' mode flags maxtasks, // user requested maximum, 0 equals all summclr, // color num used in summ info msgsclr, // " in msgs/pmts