diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-15 14:33:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-15 14:33:22 +0200 |
commit | 60a8de28d11595f4df0419ece8afa7d6accc9fbd (patch) | |
tree | 0dc410fcff779f8f9f7769f775f7e41d924a0da7 /src/vim.h | |
parent | 50bf7ce0c9f8c3ede2d1a02c734beba9d5a0504e (diff) | |
download | vim-git-60a8de28d11595f4df0419ece8afa7d6accc9fbd.tar.gz |
patch 8.1.2035: recognizing octal numbers is confusingv8.1.2035
Problem: Recognizing octal numbers is confusing.
Solution: Introduce scriptversion 4: do not use octal and allow for single
quote inside numbers.
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -307,11 +307,15 @@ #define NUMBUFLEN 65 // flags for vim_str2nr() -#define STR2NR_BIN 1 -#define STR2NR_OCT 2 -#define STR2NR_HEX 4 +#define STR2NR_BIN 0x01 +#define STR2NR_OCT 0x02 +#define STR2NR_HEX 0x04 #define STR2NR_ALL (STR2NR_BIN + STR2NR_OCT + STR2NR_HEX) -#define STR2NR_FORCE 8 // only when ONE of the above is used +#define STR2NR_NO_OCT (STR2NR_BIN + STR2NR_HEX) + +#define STR2NR_FORCE 0x80 // only when ONE of the above is used + +#define STR2NR_QUOTE 0x10 // ignore embedded single quotes /* * Shorthand for unsigned variables. Many systems, but not all, have u_char |