diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-14 09:59:11 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-01-15 20:41:10 +0100 |
commit | 08ac22ddb9e848123934dad215c58cb03e7ad094 (patch) | |
tree | 3ae6898ec504a95982fef0f5bef41a596e8a5e41 /Process.c | |
parent | ceee96dcba7d4932d1ec4d9a745a572c47c43c1d (diff) |
RichString: refactor writing limited amount of columns
Closes: #468
Diffstat (limited to 'Process.c')
-rw-r--r-- | Process.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -245,8 +245,9 @@ void Process_outputRate(RichString* str, char* buffer, size_t n, double rate, in } void Process_printLeftAlignedField(RichString* str, int attr, const char* content, unsigned int width) { - int c = RichString_appendnWide(str, attr, content, MINIMUM(width, strlen(content))); - RichString_appendChr(str, attr, ' ', width + 1 - c); + int columns = width; + RichString_appendnWideColumns(str, attr, content, strlen(content), &columns); + RichString_appendChr(str, attr, ' ', width + 1 - columns); } void Process_writeField(const Process* this, RichString* str, ProcessField field) { |