Common: removes using of built-in wcwidth, which is locale-dependent

This commit is contained in:
Carter Li
2026-05-26 16:10:01 +08:00
parent 4b265cd56a
commit 173d9695b6
2 changed files with 9 additions and 19 deletions
-11
View File
@@ -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