From f4f2bdd2f650d445137f679a03423f6b53e39d45 Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 24 Aug 2021 03:43:41 -0400 Subject: [PATCH] ncport: use wcslen as approximation to wcswidth for now --- include/notcurses/ncport.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/notcurses/ncport.h b/include/notcurses/ncport.h index fcf1c7ab8..787a8fa45 100644 --- a/include/notcurses/ncport.h +++ b/include/notcurses/ncport.h @@ -23,13 +23,15 @@ extern "C" { #include #define htole(x) (OSSwapInt32(htonl(x))) #elif defined(__gnu_hurd__) // Hurd +#include #include #define htole(x) (__bswap_32(htonl(x))) -#define wcwidth(w) 1 // FIXME lol, no -#define wcswidth(w, s) (s) // FIXME lol, no +#define wcwidth(w) 1 // FIXME lol, no +#define wcswidth(w, s) (wcslen(w)) // FIXME lol, no #elif defined(__MINGW64__) // Windows -#define wcwidth(w) 1 // FIXME lol, no -#define wcswidth(w, s) (s) // FIXME lol, no +#include +#define wcwidth(w) 1 // FIXME lol, no +#define wcswidth(w, s) (wcslen(w)) // FIXME lol, no #define htole(x) (x) // FIXME are all windows installs LE? ugh #else // BSDs #include