rem: wins_resize(0);
add: wins_resize();
context: static void do_key (unsigned c){   // standardized 'secure mode' errors   static const char err_secure[] = "\aUnavailable in secure mode";#ifdef WARN_NOT_SMP   // standardized 'smp' errors   static const char err_smp[] = "\aSorry, only 1 cpu detected";#endif   switch (c) {      case '1':#ifdef WARN_NOT_SMP         if (Cpu_tot > 1) TOGw(Curwin, View_CPUSUM);         else show_msg(err_smp);#else         TOGw(Curwin, View_CPUSUM);#endif         break;      case 'a':         if (Rc.mode_altscr) Curwin = Curwin->next;         break;      case 'A':         Rc.mode_altscr = !Rc.mode_altscr;         wins_resize(0);         break;      case 'b':         if (VIZCHKc) {            if (!CHKw(Curwin, Show_HICOLS | Show_HIROWS))               show_msg("\aNothing to highlight!");            else {               TOGw(Curwin, Show_HIBOLD);               capsmk(Curwin);            }         }         break;      case 'B':         TOGw(Curwin, View_NOBOLD);         capsmk(Curwin);         break;      case 'c':         VIZTOGc(Show_CMDLIN);         break;      case 'd':      case 's':         if (Secure_mode)            show_msg(err_secure);         else {            float tmp =               get_float(fmtmk("Change delay from %.1f to", Rc.delay_time));            if (tmp > -1) Rc.delay_time = tmp;         }         break;      case 'f':         if (VIZCHKc) fields_toggle();         break;      case 'F':      case 'O':         if (VIZCHKc) fields_sort();         break;      case 'g':         if (Rc.mode_altscr) {            char tmp[GETBUFSIZ];            strcpy(tmp, ask4str(fmtmk("Rename window '%s' to (1-3 chars)", Curwin->rc.winname)));            if (tmp[0]) win_names(Curwin, tmp);         }         break;      case 'G':         win_select(0);         break;      case 'H':         if (VIZCHKc) {            TOGw(Curwin, Show_THREADS);            show_msg(fmtmk("Show threads %s"               , CHKw(Curwin, Show_THREADS) ? "On" : "Off"));         }         break;      case 'h':      case '?':      {  char ch;         putp(Cap_clr_scr);         putp(Cap_curs_huge);            /* this string is well above ISO C89's minimum requirements! */         show_special(            1,            fmtmk(               KEYS_help,               procps_version,               Curwin->grpname,               CHKw(Curwin, Show_CTIMES) ? "On" : "Off",               Rc.delay_time,               Secure_mode ? "On" : "Off",               Secure_mode ? "" : KEYS_help_unsecured            )         );         chin(0, &ch, 1);         if ('?' == ch || 'h' == ch) {            do {               putp(Cap_clr_scr);               show_special(1, fmtmk(WINDOWS_help                  , Curwin->grpname                  , Winstk[0].rc.winname                  , Winstk[1].rc.winname                  , Winstk[2].rc.winname                  , Winstk[3].rc.winname));               chin(0, &ch, 1);               win_select(ch);            } while ('\n' != ch);         }         putp(Cap_curs_norm);      }         break;      case 'i':         VIZTOGc(Show_IDLEPS);         break;      case 'I':#ifdef WARN_NOT_SMP         if (Cpu_tot > 1) {            Rc.mode_irixps = !Rc.mode_irixps;            show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));         } else            show_msg(err_smp);#else         Rc.mode_irixps = !Rc.mode_irixps;         show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));#endif         break;      case 'k':         if (Secure_mode) {            show_msg(err_secure);         } else {            int sig, pid = get_int("PID to kill");            if (pid > 0) {               sig = signal_name_to_number(                  ask4str(fmtmk("Kill PID %d with signal [%i]", pid, DEF_SIGNAL)));               if (sig == -1) sig = DEF_SIGNAL;               if (sig && kill(pid, sig))                  show_msg(fmtmk("\aKill of PID '%d' with '%d' failed: %s", pid, sig, strerror(errno)));            }         }         break;      case 'l':         TOGw(Curwin, View_LOADAV);         break;      case 'm':         TOGw(Curwin, View_MEMORY);         break;      case 'n':      case '#':         if (VIZCHKc) {            int num =               get_int(fmtmk("Maximum tasks = %d, change to (0 is unlimited)", Curwin->rc.maxtasks));            if (num > -1) Curwin->rc.maxtasks = num;         }         break;      case 'o':         if (VIZCHKc) fields_reorder();         break;      case 'q':         end_pgm(0);      case 'r':         if (Secure_mode)            show_msg(err_secure);         else {            int val, pid = get_int("PID to renice");            if (pid > 0) {               val = get_int(fmtmk("Renice PID %d to value", pid));               if (setpriority(PRIO_PROCESS, (unsigned)pid, val))                  show_msg(fmtmk("\aRenice of PID %d to %d failed: %s", pid, val, strerror(errno)));            }         }         break;      case 'R':         VIZTOGc(Qsrt_NORMAL);         break;      case 'S':         if (VIZCHKc) {            TOGw(Curwin, Show_CTIMES);            show_msg(fmtmk("Cumulative time %s", CHKw(Curwin, Show_CTIMES) ? "On" : "Off"));         }         break;      case 't':         TOGw(Curwin, View_STATES);         break;//    case 'u'://       if (VIZCHKc)//          strcpy(Curwin->colusrnam, ask4str("Which user (blank for all)"));//       break;      case 'u'://       if (!VIZCHKc) break;         do {            const char *errmsg;            const char *answer;            answer = ask4str("Which user (blank for all)");            // FIXME: do this better:            if (!answer || *answer=='\0' || *answer=='\n' || *answer=='\r' || *answer=='\t' || *answer==' ') {               selection_type = 0;               selection_uid = -1;               break;            }            errmsg = parse_uid(answer, &selection_uid);            if (errmsg) {               show_msg(errmsg);               // Change settings here? I guess not.               break;            }            selection_type = 'u';         } while(0);         break;      case 'U'://       if (!VIZCHKc) break;         do {            const char *errmsg;            const char *answer;            answer = ask4str("Which user (blank for all)");            // FIXME: do this better:            if (!answer || *answer=='\0' || *answer=='\n' || *answer=='\r' || *answer=='\t' || *answer==' ') {               selection_type = 0;               selection_uid = -1;               break;            }            errmsg = parse_uid(answer, &selection_uid);            if (errmsg) {               show_msg(errmsg);               // Change settings here? I guess not.               break;            }            selection_type = 'U';         } while(0);         break;      case 'w':         if (Rc.mode_altscr) Curwin = Curwin->prev;         break;      case 'W':      {  const char *err = rc_write_whatever();         if (err)            show_msg(fmtmk("\aFailed '%s' open: %s", Rc_name, err));         else            show_msg(fmtmk("Wrote configuration to '%s'", Rc_name));      }         break;      case 'x':         if (VIZCHKc) {            TOGw(Curwin, Show_HICOLS);            capsmk(Curwin);         }         break;      case 'y':         if (VIZCHKc) {            TOGw(Curwin, Show_HIROWS);            capsmk(Curwin);         }         break;      case 'z':         if (VIZCHKc) {            TOGw(Curwin, Show_COLORS);            capsmk(Curwin);         }         break;      case 'Z':         wins_colors();         break;      case '-':         if (Rc.mode_altscr) TOGw(Curwin, VISIBLE_tsk);         break;      case '_':         if (Rc.mode_altscr) wins_reflag(Flags_TOG, VISIBLE_tsk);         break;      case '=':         Curwin->rc.maxtasks = 0;         SETw(Curwin, Show_IDLEPS | VISIBLE_tsk);         Monpidsidx = 0;         selection_type = '\0';         break;      case '+':         if (Rc.mode_altscr) SETw(Curwin, EQUWINS_cwo);         break;      case '<':         if (VIZCHKc) {            FLG_t *p = Curwin->procflags + Curwin->maxpflgs - 1;            while (*p != Curwin->rc.sortindx) --p;            if (--p >= Curwin->procflags)               Curwin->rc.sortindx = *p;         }         break;      case '>':         if (VIZCHKc) {            FLG_t *p = Curwin->procflags;            while (*p != Curwin->rc.sortindx) ++p;            if (++p < Curwin->procflags + Curwin->maxpflgs)               Curwin->rc.sortindx = *p;         }         break;      case 'M':         // these keys represent old-top compatability      case 'N':         // -- grouped here so that if users could ever      case 'P':         // be weaned, we would just whack this part...      case 'T':      {  static struct {            const char     *xmsg;            const unsigned  xkey;            const FLG_t     sort;         } xtab[] = {            { "Memory", 'M', P_MEM, }, { "Numerical", 'N', P_PID, },            { "CPU",    'P', P_CPU, }, { "Time",      'T', P_TM2  }, };         int i;         for (i = 0; i < MAXTBL(xtab); ++i)            if (c == xtab[i].xkey) {               Curwin->rc.sortindx = xtab[i].sort;//               show_msg(fmtmk("%s sort compatibility key honored", xtab[i].xmsg));               break;            }      }         break;      case '\n':        // just ignore these, they'll have the effect      case ' ':         // of refreshing display after waking us up !         break;      default:         show_msg("\aUnknown command - try 'h' for help");   }   // The following assignment will force a rebuild of all column headers and   // the PROC_FILLxxx flags.  It's NOT simply lazy programming.  Here are   // some keys that COULD require new column headers and/or libproc flags:   //    'A' - likely   //    'c' - likely when !Mode_altscr, maybe when Mode_altscr   //    'F' - maybe, if new field forced on   //    'f' - likely   //    'G' - likely   //    'O' - maybe, if new field forced on   //    'o' - maybe, if new field brought into view   //    'Z' - likely, if 'Curwin' changed when !Mode_altscr   //    '-' - likely (restricted to Mode_altscr)   //    '_' - likely (restricted to Mode_altscr)   //    '=' - maybe, but only when Mode_altscr   //    '+' - likely (restricted to Mode_altscr)   // ( At this point we have a human being involved and so have all the time )   // ( in the world.  We can afford a few extra cpu cycles every now & then! )   Frames_libflags = 0;}