diff options
author | Benny Baumann <BenBE@geshi.org> | 2023-11-29 21:27:07 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-12-26 15:14:19 +0100 |
commit | 2aacbf84cb397e17e677b7e46cc4548ab599493a (patch) | |
tree | d6fd34701f8c90cc52bc4c43e6df32c2fcc50545 /pcp | |
parent | 6aa9ef2726e42c4ae062b55be4d5cc015767d997 (diff) |
Use consistent style for process field output/compare functions
Diffstat (limited to 'pcp')
-rw-r--r-- | pcp/PCPProcess.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pcp/PCPProcess.c b/pcp/PCPProcess.c index 2ea4e5c6..69e2972f 100644 --- a/pcp/PCPProcess.c +++ b/pcp/PCPProcess.c @@ -132,10 +132,12 @@ static double PCPProcess_totalIORate(const PCPProcess* pp) { static void PCPProcess_rowWriteField(const Row* super, RichString* str, ProcessField field) { const PCPProcess* pp = (const PCPProcess*) super; + bool coloring = super->host->settings->highlightMegabytes; char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; size_t n = sizeof(buffer) - 1; + switch ((int)field) { case CMINFLT: Row_printCount(str, pp->cminflt, coloring); return; case CMAJFLT: Row_printCount(str, pp->cmajflt, coloring); return; @@ -205,6 +207,7 @@ static void PCPProcess_rowWriteField(const Row* super, RichString* str, ProcessF Process_writeField(&pp->super, str, field); return; } + RichString_appendWide(str, attr, buffer); } |