mirror of https://github.com/xzeldon/htop.git
Print G in gigabyte color
When printing a size like 27.2G print the G like the 27 in the gigabyte color.
This commit is contained in:
parent
c1563337ae
commit
cd305b4325
|
@ -101,8 +101,9 @@ void Process_humanNumber(RichString* str, unsigned long long number, bool colori
|
||||||
len = xSnprintf(buffer, sizeof(buffer), "%2llu", number/10);
|
len = xSnprintf(buffer, sizeof(buffer), "%2llu", number/10);
|
||||||
RichString_appendn(str, processGigabytesColor, buffer, len);
|
RichString_appendn(str, processGigabytesColor, buffer, len);
|
||||||
number %= 10;
|
number %= 10;
|
||||||
len = xSnprintf(buffer, sizeof(buffer), ".%1lluG ", number);
|
len = xSnprintf(buffer, sizeof(buffer), ".%1llu", number);
|
||||||
RichString_appendn(str, processMegabytesColor, buffer, len);
|
RichString_appendn(str, processMegabytesColor, buffer, len);
|
||||||
|
RichString_append(str, processGigabytesColor, "G ");
|
||||||
} else if (number < 1000 * ONE_M) {
|
} else if (number < 1000 * ONE_M) {
|
||||||
//3 digit GB
|
//3 digit GB
|
||||||
number /= ONE_M;
|
number /= ONE_M;
|
||||||
|
|
Loading…
Reference in New Issue