summaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-11-29 21:27:07 +0100
committerBenBE <BenBE@geshi.org>2023-12-26 15:14:19 +0100
commit2aacbf84cb397e17e677b7e46cc4548ab599493a (patch)
treed6fd34701f8c90cc52bc4c43e6df32c2fcc50545 /Process.c
parent6aa9ef2726e42c4ae062b55be4d5cc015767d997 (diff)
Use consistent style for process field output/compare functions
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Process.c b/Process.c
index 4766c115..ea432be0 100644
--- a/Process.c
+++ b/Process.c
@@ -542,13 +542,14 @@ static void Process_rowWriteField(const Row* super, RichString* str, RowField fi
}
void Process_writeField(const Process* this, RichString* str, RowField field) {
- char buffer[256];
- size_t n = sizeof(buffer);
- int attr = CRT_colors[DEFAULT_COLOR];
const Row* super = (const Row*) &this->super;
const Machine* host = super->host;
const Settings* settings = host->settings;
+
bool coloring = settings->highlightMegabytes;
+ char buffer[256]; buffer[255] = '\0';
+ int attr = CRT_colors[DEFAULT_COLOR];
+ size_t n = sizeof(buffer) - 1;
switch (field) {
case COMM: {
@@ -754,6 +755,7 @@ void Process_writeField(const Process* this, RichString* str, RowField field) {
xSnprintf(buffer, n, "- ");
break;
}
+
RichString_appendAscii(str, attr, buffer);
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy