Linux: use correct column alignment for wide fields

This affects:
- PROC_COMM, PROC_EXE and CWD on Linux
- JAIL on FreeBSD and DragonFlyBSD
- ZONE on Solaris
This commit is contained in:
Christian Göttsche
2021-01-10 15:57:46 +01:00
parent 8a67d7f086
commit a5db139a0a
8 changed files with 34 additions and 33 deletions

View File

@ -60,7 +60,7 @@ static inline int RichString_writeFromWide(RichString* this, int attrs, const ch
this->chptr[i] = (CharType) { .attr = attrs & 0xffffff, .chars = { (iswprint(data[j]) ? data[j] : '?') } };
}
return len;
return wcswidth(data, len);
}
static inline int RichString_writeFromAscii(RichString* this, int attrs, const char* data, int from, int len) {