Merge branch 'isj4/procps-mode_wide_columns'

References:
 procps-ng/procps!48
This commit is contained in:
Craig Small
2020-05-12 18:52:03 +10:00

View File

@@ -194,13 +194,13 @@ static void new_header(void)
const char *header = const char *header =
_("procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----"); _("procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----");
const char *wide_header = const char *wide_header =
_("procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------"); _("--procs-- -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------");
const char *timestamp_header = _(" -----timestamp-----"); const char *timestamp_header = _(" -----timestamp-----");
const char format[] = const char format[] =
"%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s"; "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s";
const char wide_format[] = const char wide_format[] =
"%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s"; "%4s %4s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s";
printf("%s", w_option ? wide_header : header); printf("%s", w_option ? wide_header : header);
@@ -213,9 +213,9 @@ static void new_header(void)
printf( printf(
w_option ? wide_format : format, w_option ? wide_format : format,
/* Translation Hint: max 2 chars */ /* Translation Hint: max 4 chars */
_("r"), _("r"),
/* Translation Hint: max 2 chars */ /* Translation Hint: max 4 chars */
_("b"), _("b"),
/* Translation Hint: max 6 chars */ /* Translation Hint: max 6 chars */
_("swpd"), _("swpd"),
@@ -281,7 +281,7 @@ static void new_format(void)
const char format[] = const char format[] =
"%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u"; "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u";
const char wide_format[] = const char wide_format[] =
"%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u"; "%4u %4u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u";
unsigned int tog = 0; /* toggle switch for cleaner code */ unsigned int tog = 0; /* toggle switch for cleaner code */
unsigned int i; unsigned int i;