diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-27 18:07:28 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-24 15:30:45 +0000 |
| commit | 0a9531ac6caff2ad6abfbb804ec27cade4a92e7a (patch) | |
| tree | 33cdf629fe3e99d1e2afe3cc181b100af8fb9a67 /util.h | |
| parent | wip: grapheme shaping (diff) | |
vt: cache grapheme cluster width in composed struct
* Use regular wcswidth() to calculate the width
* Explicitly set to ‘2’ if we see a emoji variant selector
* Cache the result in the composed struct
Diffstat (limited to 'util.h')
| -rw-r--r-- | util.h | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -35,11 +35,3 @@ sdbm_hash(const char *s) return hash; } - -#include <wchar.h> -static inline int -my_wcswidth(const wchar_t *s, size_t n) -{ - int ret = wcswidth(s, n); - return max(0, ret); -} |
