comparison src/vim.h @ 18080:a6d218f99ff7 v8.1.2035

patch 8.1.2035: recognizing octal numbers is confusing Commit: https://github.com/vim/vim/commit/60a8de28d11595f4df0419ece8afa7d6accc9fbd Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 15 14:33:22 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 Sep 2019 14:45:04 +0200
parents 8f4cc259ed7a
children a2870e6f5b45
comparison
equal deleted inserted replaced
18079:c4ca2f98e7b4 18080:a6d218f99ff7
305 305
306 // length of a buffer to store a number in ASCII (64 bits binary + NUL) 306 // length of a buffer to store a number in ASCII (64 bits binary + NUL)
307 #define NUMBUFLEN 65 307 #define NUMBUFLEN 65
308 308
309 // flags for vim_str2nr() 309 // flags for vim_str2nr()
310 #define STR2NR_BIN 1 310 #define STR2NR_BIN 0x01
311 #define STR2NR_OCT 2 311 #define STR2NR_OCT 0x02
312 #define STR2NR_HEX 4 312 #define STR2NR_HEX 0x04
313 #define STR2NR_ALL (STR2NR_BIN + STR2NR_OCT + STR2NR_HEX) 313 #define STR2NR_ALL (STR2NR_BIN + STR2NR_OCT + STR2NR_HEX)
314 #define STR2NR_FORCE 8 // only when ONE of the above is used 314 #define STR2NR_NO_OCT (STR2NR_BIN + STR2NR_HEX)
315
316 #define STR2NR_FORCE 0x80 // only when ONE of the above is used
317
318 #define STR2NR_QUOTE 0x10 // ignore embedded single quotes
315 319
316 /* 320 /*
317 * Shorthand for unsigned variables. Many systems, but not all, have u_char 321 * Shorthand for unsigned variables. Many systems, but not all, have u_char
318 * already defined, so we use char_u to avoid trouble. 322 * already defined, so we use char_u to avoid trouble.
319 */ 323 */