master ohmu/fastfetch-openbsd / src / common / wcwidth.h
ohmu  ·  2026-10-15
 1#pragma once
 2
 3#include <stdint.h>
 4
 5#if FF_ENABLE_WCWIDTH
 6// A pure table lookup: the width depends only on the code point
 7[[gnu::pure, nodiscard]] int mk_wcwidth(uint32_t wc);
 8#else
 9[[gnu::pure, nodiscard]] static inline int mk_wcwidth(uint32_t wc) {
10    (void) wc;
11    return 1;
12}
13#endif