mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
Common: removes using of built-in wcwidth, which is locale-dependent
This commit is contained in:
@@ -2,15 +2,4 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef FF_HAVE_WCWIDTH
|
||||
#include <wchar.h>
|
||||
|
||||
// Should be char32_t but it's not defined on macOS
|
||||
static_assert(sizeof(wchar_t) == sizeof(uint32_t), "wcwidth implementation requires wchar_t to be 32 bits");
|
||||
|
||||
static inline int mk_wcwidth(uint32_t ucs) {
|
||||
return wcwidth((wchar_t) ucs);
|
||||
}
|
||||
#else
|
||||
int mk_wcwidth(uint32_t wc);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user