Files
fastfetch/src/common/wcwidth.h
T
2026-01-06 09:48:38 +08:00

17 lines
364 B
C

#pragma once
#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