RichString_appendChr: add parameter to set attributes

Allows to set attributes when padding process fields in non-wide ncurses
mode.

Closes: #475
This commit is contained in:
Christian Göttsche
2021-01-13 19:22:33 +01:00
parent 78b993dbb4
commit 5fde0e0127
4 changed files with 21 additions and 12 deletions

View File

@ -246,7 +246,7 @@ 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, ' ', width + 1 - c);
RichString_appendChr(str, attr, ' ', width + 1 - c);
}
void Process_writeField(const Process* this, RichString* str, ProcessField field) {