diff src/vim.h @ 7447:ad432f8f68fb v7.4.1027

commit https://github.com/vim/vim/commit/887c1fea4a114e7170091942d0446c8882701b5b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 2 17:56:35 2016 +0100 patch 7.4.1027 Problem: No support for binary numbers. Solution: Add "bin" to nrformats. (Jason Schulz)
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Jan 2016 18:00:05 +0100
parents 1886f2863437
children 4c922651fd78
line wrap: on
line diff
--- a/src/vim.h
+++ b/src/vim.h
@@ -392,7 +392,15 @@
 # endif
 #endif
 
-#define NUMBUFLEN 30	    /* length of a buffer to store a number in ASCII */
+/* length of a buffer to store a number in ASCII (64 bits binary + NUL) */
+#define NUMBUFLEN 65
+
+/* flags for vim_str2nr() */
+#define STR2NR_BIN 1
+#define STR2NR_OCT 2
+#define STR2NR_HEX 4
+#define STR2NR_ALL (STR2NR_BIN + STR2NR_OCT + STR2NR_HEX)
+#define STR2NR_FORCE 8 /* only when ONE of the above is used */
 
 /*
  * Shorthand for unsigned variables. Many systems, but not all, have u_char