diff options
Diffstat (limited to 'src/nvim/vim.h')
-rw-r--r-- | src/nvim/vim.h | 64 |
1 files changed, 16 insertions, 48 deletions
diff --git a/src/nvim/vim.h b/src/nvim/vim.h index fa00d9efcf..165a44a148 100644 --- a/src/nvim/vim.h +++ b/src/nvim/vim.h @@ -27,20 +27,21 @@ Error: configure did not run properly.Check auto/config.log. # endif #endif -/* user ID of root is usually zero, but not for everybody */ -#define ROOT_UID 0 - +#include "nvim/os/os_defs.h" /* bring lots of system header files */ -/* Can't use "PACKAGE" here, conflicts with a Perl include file. */ -#ifndef VIMPACKAGE -# define VIMPACKAGE "vim" -#endif +/// length of a buffer to store a number in ASCII (64 bits binary + NUL) +#define NUMBUFLEN 65 -#include "nvim/os/os_defs.h" /* bring lots of system header files */ +// 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 -#define NUMBUFLEN 30 /* length of a buffer to store a number in ASCII */ +#define MAX_TYPENR 65535 -# define MAX_TYPENR 65535 +#define ROOT_UID 0 #include "nvim/keymap.h" #include "nvim/macros.h" @@ -200,15 +201,6 @@ enum { #define MAYBE 2 /* sometimes used for a variant on TRUE */ -/* - * Motion types, used for operators and for yank/delete registers. - */ -#define MCHAR 0 /* character-wise movement/register */ -#define MLINE 1 /* line-wise movement/register */ -#define MBLOCK 2 /* block-wise register */ - -#define MAUTO 0xff /* Decide between MLINE/MCHAR */ - #define STATUS_HEIGHT 1 /* height of a status line under a window */ #define QF_WINHEIGHT 10 /* default height for quickfix window */ @@ -232,15 +224,6 @@ enum { /* Size in bytes of the hash used in the undo file. */ #define UNDO_HASH_SIZE 32 -#ifdef HAVE_FCNTL_H -# include <fcntl.h> -#endif - - -#ifndef O_NOFOLLOW -# define O_NOFOLLOW 0 -#endif - /* * defines to avoid typecasts from (char_u *) to (char *) and back * (vim_strchr() and vim_strrchr() are now in alloc.c) @@ -279,26 +262,11 @@ enum { # define vim_strpbrk(s, cs) (char_u *)strpbrk((char *)(s), (char *)(cs)) -#define MSG(s) msg((char_u *)(s)) -#define MSG_ATTR(s, attr) msg_attr((char_u *)(s), (attr)) -#define EMSG(s) emsg((char_u *)(s)) -#define EMSG2(s, p) emsg2((char_u *)(s), (char_u *)(p)) -#define EMSG3(s, p, q) emsg3((char_u *)(s), (char_u *)(p), \ - (char_u *)(q)) -#define EMSGN(s, n) emsgn((char_u *)(s), (int64_t)(n)) -#define EMSGU(s, n) emsgu((char_u *)(s), (uint64_t)(n)) -#define OUT_STR(s) out_str((char_u *)(s)) -#define OUT_STR_NF(s) out_str_nf((char_u *)(s)) -#define MSG_PUTS(s) msg_puts((char_u *)(s)) -#define MSG_PUTS_ATTR(s, a) msg_puts_attr((char_u *)(s), (a)) -#define MSG_PUTS_TITLE(s) msg_puts_title((char_u *)(s)) -#define MSG_PUTS_LONG(s) msg_puts_long_attr((char_u *)(s), 0) -#define MSG_PUTS_LONG_ATTR(s, a) msg_puts_long_attr((char_u *)(s), (a)) - -/* Prefer using emsg3(), because perror() may send the output to the wrong - * destination and mess up the screen. */ -#define PERROR(msg) \ - (void) emsg3((char_u *) "%s: %s", (char_u *)msg, (char_u *)strerror(errno)) +#include "nvim/message.h" + +// Prefer using emsgf(), because perror() may send the output to the wrong +// destination and mess up the screen. +#define PERROR(msg) (void) emsgf("%s: %s", msg, strerror(errno)) #define SHOWCMD_COLS 10 /* columns needed by shown command */ #define STL_MAX_ITEM 80 /* max nr of %<flag> in statusline */ |