mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.2035: recognizing octal numbers is confusing
Problem: Recognizing octal numbers is confusing. Solution: Introduce scriptversion 4: do not use octal and allow for single quote inside numbers.
This commit is contained in:
12
src/vim.h
12
src/vim.h
@@ -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
|
||||
|
Reference in New Issue
Block a user