aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/globals.h
diff options
context:
space:
mode:
authorNicolas Hillegeer <nicolas@hillegeer.com>2014-07-18 10:51:44 +0200
committerJustin M. Keyes <justinkz@gmail.com>2014-07-20 16:59:57 -0400
commitab1eec10a1906cadeed7f480b0d12505a0fba0ad (patch)
treed4452ccd50ba368d02e953dd0f40bd6378fd56e1 /src/nvim/globals.h
parentd19712f23345af2545af609721f1dbccd002a0df (diff)
downloadrneovim-ab1eec10a1906cadeed7f480b0d12505a0fba0ad.tar.gz
rneovim-ab1eec10a1906cadeed7f480b0d12505a0fba0ad.tar.bz2
rneovim-ab1eec10a1906cadeed7f480b0d12505a0fba0ad.zip
globals.h: decouple vim.h and globals.h
Allow globals.h to be included without including vim.h. Another small piece of the puzzle of dismantling vim.h. Moving some extra `#define`'s to globals.h is no better than having them in vim.h. We should, in a later PR, move them to the file where they belong or to a separate `constants.h` or something.
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r--src/nvim/globals.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index 1f402f3ef9..b3ed2f7239 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -10,15 +10,36 @@
#include <stdbool.h>
+// EXTERN is only defined in main.c. That's where global variables are
+// actually defined and initialized.
+#ifndef EXTERN
+# define EXTERN extern
+# define INIT(x)
+#else
+# ifndef INIT
+# define INIT(x) x
+# define DO_INIT
+# endif
+#endif
+
#include "nvim/ex_eval.h"
#include "nvim/mbyte.h"
#include "nvim/menu.h"
#include "nvim/syntax_defs.h"
+#include "nvim/types.h"
/*
* definition of global variables
*/
+#define IOSIZE (1024+1) // file I/O and sprintf buffer size
+
+#define MAX_MCO 6 // maximum value for 'maxcombine'
+
+# define MSG_BUF_LEN 480 // length of buffer for small messages
+# define MSG_BUF_CLEN (MSG_BUF_LEN / 6) // cell length (worst case: utf-8
+ // takes 6 bytes for one cell)
+
/* Values for "starting" */
#define NO_SCREEN 2 /* no screen updating yet */
#define NO_BUFFERS 1 /* not all buffers loaded yet */