diff options
author | June McEnroe <june@causal.agency> | 2022-03-16 18:35:56 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-03-16 18:37:31 -0400 |
commit | c5ce5ebf4dd599345c50e5c1267f0a7bbaa3050b (patch) | |
tree | 907d17f50b74b818f7082853019c5e0f54548e56 /port/wcwidth/wcwidth.c | |
parent | Remove -j4 from ./Plan (diff) | |
download | src-c5ce5ebf4dd599345c50e5c1267f0a7bbaa3050b.tar.gz src-c5ce5ebf4dd599345c50e5c1267f0a7bbaa3050b.zip |
Remove wcwidth port
DYLD_FORCE_FLAT_NAMESPACE no longer exists in macOS 12 so this approach doesn't work anymore. Moved to <https://git.causal.agency/jorts/tree/wcwidth> and compiled into <https://git.causal.agency/jorts/tree/ncurses>.
Diffstat (limited to '')
-rw-r--r-- | port/wcwidth/wcwidth.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/port/wcwidth/wcwidth.c b/port/wcwidth/wcwidth.c deleted file mode 100644 index 36256a53..00000000 --- a/port/wcwidth/wcwidth.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <wchar.h> - -static const unsigned char table[] = { -#include "nonspacing.h" -}; - -static const unsigned char wtable[] = { -#include "wide.h" -}; - -int wcwidth(wchar_t wc) -{ - if (wc < 0xffU) - return (wc+1 & 0x7f) >= 0x21 ? 1 : wc ? -1 : 0; - if ((wc & 0xfffeffffU) < 0xfffe) { - if ((table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1) - return 0; - if ((wtable[wtable[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1) - return 2; - return 1; - } - if ((wc & 0xfffe) == 0xfffe) - return -1; - if (wc-0x20000U < 0x20000) - return 2; - if (wc == 0xe0001 || wc-0xe0020U < 0x5f || wc-0xe0100U < 0xef) - return 0; - return 1; -} |