.
.\" Document /////////////////////////////////////////////////////////////
.\" ----------------------------------------------------------------------
-.TH TOP 1 "June 2022" "procps-ng" "User Commands"
+.TH TOP 1 "September 2022" "procps-ng" "User Commands"
.\" ----------------------------------------------------------------------
.nh
/* Support for adjoining display (if terminal is wide enough) */
#ifdef TOG4_OFF_SEP
-static char Adjoin_sp[] = " ";
+static char Adjoin_sp[] = " ";
#define ADJOIN_space (sizeof(Adjoin_sp) - 1)
#else
-static char Adjoin_sp[] = " ~1 ~6 ";
+static char Adjoin_sp[] = " ~6 ~1";
#define ADJOIN_space (sizeof(Adjoin_sp) - 5) // 1 for null, 4 unprintable
#endif
#define ADJOIN_limit 8
int num = (Curwin->rc.double_up + 1);
int pfx = (Curwin->rc.double_up < 2) ? GRAPH_prefix_std : GRAPH_prefix_abv;
Graph_len = (Screen_cols - (ADJOIN_space * Curwin->rc.double_up) - (num * (pfx + GRAPH_suffix))) / num;
- Graph_len += (Screen_cols % num) ? 0 : 1;
} else {
Graph_len = Screen_cols - (GRAPH_prefix_std + GRAPH_length_max + GRAPH_suffix);
if (Graph_len >= 0) Graph_len = GRAPH_length_max;
break;
case '4':
w->rc.double_up += 1;
- if (w->rc.double_up >= ADJOIN_limit) w->rc.double_up = 0;
+ if ((w->rc.double_up >= ADJOIN_limit)
+ || ((w->rc.double_up >= smp_num_cpus)))
+ w->rc.double_up = 0;
OFFw(w, (View_CPUSUM | View_CPUNOD));
break;
case 'C':
}
snprintf(buf3, sizeof(buf3), "%s%s", buf1, buf2);
// 'width' has accounted for any show_special directives embedded above
- snprintf(rx.graph, sizeof(rx.graph), "[~1%-*.*s]~1", width, width, buf3);
+ snprintf(rx.graph, sizeof(rx.graph), "[~1%-*.*s] ~1", width, width, buf3);
return ℞
} // end: sum_rx