mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
17 lines
364 B
C
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
|