diff --git a/src/wutil.cpp b/src/wutil.cpp index 406dc00b3..4d03a5507 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -516,6 +516,15 @@ ssize_t wwrite_to_fd(const wchar_t *input, size_t input_len, int fd) { return success ? total_written : -1; } +enum : wint_t { + PUA1_START = 0xE000, + PUA1_END = 0xF900, + PUA2_START = 0xF0000, + PUA2_END = 0xFFFFE, + PUA3_START = 0x100000, + PUA3_END = 0x10FFFE, +}; + /// Return one if the code point is in a Unicode private use area. static int fish_is_pua(wint_t wc) { if (PUA1_START <= wc && wc < PUA1_END) return 1; diff --git a/src/wutil.h b/src/wutil.h index 6c27666fd..219e23fb4 100644 --- a/src/wutil.h +++ b/src/wutil.h @@ -106,13 +106,6 @@ inline ssize_t wwrite_to_fd(const wcstring &s, int fd) { return wwrite_to_fd(s.c_str(), s.size(), fd); } -#define PUA1_START 0xE000 -#define PUA1_END 0xF900 -#define PUA2_START 0xF0000 -#define PUA2_END 0xFFFFE -#define PUA3_START 0x100000 -#define PUA3_END 0x10FFFE - // We need this because there are too many implementations that don't return the proper answer for // some code points. See issue #3050. #ifndef FISH_NO_ISW_WRAPPERS