From: Ivan Skytte Jørgensen Date: Thu, 8 Jun 2017 12:14:50 +0000 (+0200) Subject: Use wide columns for r/b too in wide mode X-Git-Tag: v4.0.0~378 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=236b956c692d35571f61c9df0aa36e0b390f6a5c;p=procps-ng Use wide columns for r/b too in wide mode 2 digits are not enough for number of runnable/blocked processes on modern systems. Changed to 4 digits with given the -w option. References: procps-ng/procps!48 --- diff --git a/vmstat.c b/vmstat.c index 27d2b26a..0551a994 100644 --- a/vmstat.c +++ b/vmstat.c @@ -241,7 +241,7 @@ static void new_header(void) const char *header = _("procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----"); const char *wide_header = - _("procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------"); + _("--procs-- -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------"); const char *timestamp_header = _(" -----timestamp-----"); const char format[] = @@ -260,9 +260,9 @@ static void new_header(void) printf( w_option ? wide_format : format, - /* Translation Hint: max 2 chars */ + /* Translation Hint: max 4 chars */ _("r"), - /* Translation Hint: max 2 chars */ + /* Translation Hint: max 4 chars */ _("b"), /* Translation Hint: max 6 chars */ _("swpd"), @@ -334,7 +334,7 @@ static void new_format(void) const char format[] = "%2lu %2lu %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u"; const char wide_format[] = - "%2lu %2lu %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u"; + "%4lu %4lu %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 i;