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 /darwin | |
parent | 6aa9ef2726e42c4ae062b55be4d5cc015767d997 (diff) |
Use consistent style for process field output/compare functions
Diffstat (limited to 'darwin')
-rw-r--r-- | darwin/DarwinProcess.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/darwin/DarwinProcess.c b/darwin/DarwinProcess.c index 4f58832d..1e315eba 100644 --- a/darwin/DarwinProcess.c +++ b/darwin/DarwinProcess.c @@ -74,9 +74,11 @@ void Process_delete(Object* cast) { static void DarwinProcess_rowWriteField(const Row* super, RichString* str, ProcessField field) { const DarwinProcess* dp = (const DarwinProcess*) super; + char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; - int n = sizeof(buffer) - 1; + size_t n = sizeof(buffer) - 1; + switch (field) { // add Platform-specific fields here case TRANSLATED: xSnprintf(buffer, n, "%c ", dp->translated ? 'T' : 'N'); break; @@ -84,6 +86,7 @@ static void DarwinProcess_rowWriteField(const Row* super, RichString* str, Proce Process_writeField(&dp->super, str, field); return; } + RichString_appendWide(str, attr, buffer); } |