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 /Process.c | |
parent | 6aa9ef2726e42c4ae062b55be4d5cc015767d997 (diff) |
Use consistent style for process field output/compare functions
Diffstat (limited to 'Process.c')
-rw-r--r-- | Process.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); } |