aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscott-linder <scott.b.linder@wmich.edu>2014-02-28 14:10:08 -0500
committerThiago de Arruda <tpadilha84@gmail.com>2014-02-28 18:28:27 -0300
commit007a19c4971e42d1bb7fdafc8fc7d6d8885120f2 (patch)
tree8bae444df07cee0e48b74965f966e1e0fea57e12
parent3f29a02166878bdbf32b0d638aa0e0c9d83a73cc (diff)
downloadrneovim-007a19c4971e42d1bb7fdafc8fc7d6d8885120f2.tar.gz
rneovim-007a19c4971e42d1bb7fdafc8fc7d6d8885120f2.tar.bz2
rneovim-007a19c4971e42d1bb7fdafc8fc7d6d8885120f2.zip
Added a types.h with vim.h unsigned int typedefs.
-rw-r--r--src/option_defs.h2
-rw-r--r--src/types.h20
-rw-r--r--src/vim.h10
3 files changed, 25 insertions, 7 deletions
diff --git a/src/option_defs.h b/src/option_defs.h
index 6dc232d03d..47deac8959 100644
--- a/src/option_defs.h
+++ b/src/option_defs.h
@@ -6,6 +6,8 @@
* Do ":help credits" in Vim to see a list of people who contributed.
*/
+#include "types.h"
+
/*
* option_defs.h: definition of global variables for settable options
*/
diff --git a/src/types.h b/src/types.h
new file mode 100644
index 0000000000..a82b8c8e86
--- /dev/null
+++ b/src/types.h
@@ -0,0 +1,20 @@
+/* vi:set ts=8 sts=4 sw=4:
+ *
+ * VIM - Vi IMproved by Bram Moolenaar
+ *
+ * Do ":help uganda" in Vim to read copying and usage conditions.
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ */
+
+#ifndef NEOVIM_TYPES_H
+#define NEOVIM_TYPES_H
+
+/*
+ * Shorthand for unsigned variables. Many systems, but not all, have u_char
+ * already defined, so we use char_u to avoid trouble.
+ */
+typedef unsigned char char_u;
+typedef unsigned short short_u;
+typedef unsigned int int_u;
+
+#endif /* NEOVIM_TYPES_H */
diff --git a/src/vim.h b/src/vim.h
index 75c2b14d38..8e70717652 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -8,6 +8,9 @@
#ifndef NEOVIM_VIM_H
# define NEOVIM_VIM_H
+
+#include "types.h"
+
/* Included when ported to cmake */
/* This is needed to replace TRUE/FALSE macros by true/false from c99 */
#include <stdbool.h>
@@ -96,13 +99,6 @@ Error: configure did not run properly.Check auto/config.log.
#define NUMBUFLEN 30 /* length of a buffer to store a number in ASCII */
-/*
- * Shorthand for unsigned variables. Many systems, but not all, have u_char
- * already defined, so we use char_u to avoid trouble.
- */
-typedef unsigned char char_u;
-typedef unsigned short short_u;
-typedef unsigned int int_u;
/* Make sure long_u is big enough to hold a pointer.
* On Win64, longs are 32 bits and pointers are 64 bits.
* For printf() and scanf(), we need to take care of long_u specifically. */