rem: strcat(rbuf, cbuf);
add: rp = scat(rp, cbuf);
context: static void task_show (WIN_t *q, proc_t *task){   /* the following macro is our means to 'inline' emitting a column -- that's      far and away the most frequent and costly part of top's entire job! */#define MKCOL(q,a,c,p,b,f,v...) do{ \           if (!c) \              snprintf(b, sizeof(b), f, ## v); \           else taskhlp(q, a, c, p, b, f, ## v); } while(0)   char rbuf[ROWBUFSIZ];   int j, x, pad;   /* since win_colsheads adds a number to the window's column header,      we must begin a row with that in mind... */   if ((pad = Mode_altscr)) strcpy(rbuf, " "); else rbuf[0] = '\0';   for (x = 0; x < q->maxpflgs; x++) {      char cbuf[COLBUFSIZ];      char        a = task->state;              // we'll use local var's so      PFLG_t      i = q->procflags[x];          // gcc doesn't reinvent the      const char *f = Fieldstab[i].fmts;        // wheel - yields a cryptic      unsigned    s = Fieldstab[i].scale;       // call, but saves a bunch      unsigned    w = Fieldstab[i].width;       // of generated code...      int         c = (CHKw(q, Show_HICOLS) && q->sortindx == i);      cbuf[0] = '\0';      switch (i) {         case P_CMD:         {  char *cmdptr, cmdnam[ROWBUFSIZ];            if (!CHKw(q, Show_CMDLIN))               cmdptr = task->cmd;            else {               cmdnam[0] = '\0';               if (task->cmdline) {                  j = 0;                  do {                     /* during a kernel build, parts of the make will create                        cmdlines in excess of 3000 bytes but *without* the                        intervening nulls -- so we must limit our strcat... */                     strcat(cmdnam                        , fmtmk("%.*s ", q->maxcmdln, task->cmdline[j++]));                     if (q->maxcmdln < (int)strlen(cmdnam)) break;                  } while (task->cmdline[j]);                  /* whoa, gnome's xscreensaver had a ^I in his cmdline                     creating a line wrap when the window was maximized &                     the tab came into view -- so whack those suckers... */                  strim(1, cmdnam);               } else {                  /* if cmdline is absent, consider it a kernel thread and                     display it uniquely (need sort callback's complicity) */                  strcpy(cmdnam, fmtmk(CMDLINE_FMTS, task->cmd));               }               cmdptr = cmdnam;            }            MKCOL(q, a, c, &pad, cbuf, f, q->maxcmdln, q->maxcmdln, cmdptr);         }            break;         case P_COD:            MKCOL(q, a, c, &pad, cbuf, f, scale_num(PAGES_2K(task->trs), w, s));            break;         case P_CPN:            MKCOL(q, a, c, &pad, cbuf, f, (unsigned)task->processor);            break;         case P_CPU:         {  float u = (float)task->pcpu * Frame_tscale;            if (99.9 < u) u = 99.9;            MKCOL(q, a, c, &pad, cbuf, f, u);         }            break;         case P_DAT:            MKCOL(q, a, c, &pad, cbuf, f, scale_num(PAGES_2K(task->drs), w, s));            break;         case P_DRT:            MKCOL(q, a, c, &pad, cbuf, f, scale_num((unsigned)task->dt, w, s));            break;         case P_FLG:            MKCOL(q, a, c, &pad, cbuf, f, (long)task->flags);            for (j = 0; cbuf[j]; j++) if ('0' == cbuf[j]) cbuf[j] = '.';            break;         case P_FLT:            MKCOL(q, a, c, &pad, cbuf, f, scale_num(task->maj_flt, w, s));            break;         case P_GRP:            MKCOL(q, a, c, &pad, cbuf, f, task->egroup);            break;         case P_MEM:            MKCOL(q, a, c, &pad, cbuf, f               , (float)PAGES_2K(task->resident) * 100 / kb_main_total);            break;         case P_NCE:            MKCOL(q, a, c, &pad, cbuf, f, (int)task->nice);            break;         case P_PGD:            MKCOL(q, a, c, &pad, cbuf, f, (unsigned)task->pgrp);            break;         case P_PID:            MKCOL(q, a, c, &pad, cbuf, f, (unsigned)task->pid);            break;         case P_PPD:            MKCOL(q, a, c, &pad, cbuf, f, (unsigned)task->ppid);            break;         case P_PRI:            if (-99 > task->priority || +99 < task->priority)               MKCOL(q, a, c, &pad, cbuf, " RT ");            else               MKCOL(q, a, c, &pad, cbuf, f, (int)task->priority);            break;         case P_RES:            MKCOL(q, a, c, &pad, cbuf, f, scale_num(PAGES_2K(task->resident), w, s));            break;         case P_SHR:            MKCOL(q, a, c, &pad, cbuf, f, scale_num(PAGES_2K(task->share), w, s));            break;         case P_STA:#ifdef USE_LIB_STA3            MKCOL(q, a, c, &pad, cbuf, f, status(task));#else            MKCOL(q, a, c, &pad, cbuf, f, task->state);#endif            break;         case P_SWP:            MKCOL(q, a, c, &pad, cbuf, f               , scale_num(PAGES_2K(task->size - task->resident), w, s));            break;         case P_TME:         case P_TM2:         {  TICS_t t;            t = task->utime + task->stime;            if (CHKw(q, Show_CTIMES))               t += (task->cutime + task->cstime);            MKCOL(q, a, c, &pad, cbuf, f, scale_tics(t, w));         }            break;         case P_TTY:         {  char tmp[TNYBUFSIZ];            dev_to_tty(tmp, (int)w, task->tty, task->pid, ABBREV_DEV);            MKCOL(q, a, c, &pad, cbuf, f, tmp);         }            break;         case P_UID:            MKCOL(q, a, c, &pad, cbuf, f, (unsigned)task->euid);            break;         case P_USR:            MKCOL(q, a, c, &pad, cbuf, f, task->euser);            break;         case P_VRT:            MKCOL(q, a, c, &pad, cbuf, f, scale_num(PAGES_2K(task->size), w, s));            break;         case P_WCH:            if (No_ksyms) {#ifdef CASEUP_HEXES               MKCOL(q, a, c, &pad, cbuf, "%08lX  ", (long)task->wchan);#else               MKCOL(q, a, c, &pad, cbuf, "%08lx  ", (long)task->wchan);#endif            } else {               MKCOL(q, a, c, &pad, cbuf, f, wchan(task->wchan));            }            break;        } /* end: switch 'procflag' */        strcat(rbuf, cbuf);   } /* end: for 'maxpflgs' */   // This row buffer could be stuffed with parameterized strings...   PUTP("\n%s%.*s%s%s", (CHKw(q, Show_HIROWS) && 'R' == task->state)      ? q->capclr_rowhigh : q->capclr_rownorm      , Screen_cols + pad      , rbuf      , Caps_off      , Cap_clr_eol);#undef MKCOL}