diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-01-21 19:56:39 -0800 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-02-28 18:36:34 -0800 |
commit | f2246dfb343bea19beb176fb2cc534f85513b2eb (patch) | |
tree | f95f0c4f4f48d445c1d561aa0986d2b98cdecec5 /src/fish.cpp | |
parent | b41b96233616f26e52663c133f7a29d32b0e9142 (diff) |
reduce number of Unicode private-use characters
This narrows the range of Unicode codepoints fish reserves for its own
use from U+E000 thru U+F8FE (6399 codepoints) to U+F600 thru U+F73F (320
codepoints). This is still not ideal since fish shouldn't be using any
Unicode private-use codepoints but it's a step in the right direction.
This partially addresses issue #2684.
Diffstat (limited to 'src/fish.cpp')
-rw-r--r-- | src/fish.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fish.cpp b/src/fish.cpp index 69b4b0de..91610232 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "config.h" +#include <assert.h> #include <limits.h> #include <stddef.h> #include <stdint.h> @@ -63,6 +64,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "input.h" #include "io.h" #include "fish_version.h" +#include "input_common.h" +#include "wildcard.h" /* PATH_MAX may not exist */ #ifndef PATH_MAX @@ -484,6 +487,14 @@ int main(int argc, char **argv) int res=1; int my_optind=0; + // We can't do this at compile time due to the use of enum symbols. + assert(EXPAND_SENTINAL >= EXPAND_RESERVED_BASE && + EXPAND_SENTINAL <= EXPAND_RESERVED_END); + assert(ANY_SENTINAL >= WILDCARD_RESERVED_BASE && + ANY_SENTINAL <= WILDCARD_RESERVED_END); + assert(R_SENTINAL >= INPUT_COMMON_BASE && + R_SENTINAL <= INPUT_COMMON_END); + set_main_thread(); setup_fork_guards(); |