mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
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.
This commit is contained in:

committed by
Justin M. Keyes

parent
d19712f233
commit
ab1eec10a1
@@ -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 */
|
||||
|
Reference in New Issue
Block a user