Mercurial > vim
diff src/vim.h @ 15607:2dcaa860e3fc v8.1.0811
patch 8.1.0811: too many #ifdefs
commit https://github.com/vim/vim/commit/30276f2beb248557c6b33cd5418bca8b7084b0a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 17:59:39 2019 +0100
patch 8.1.0811: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, the final chapter.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 18:00:07 +0100 |
parents | 62b3805506b3 |
children | b440c7becbca |
line wrap: on
line diff
--- a/src/vim.h +++ b/src/vim.h @@ -157,6 +157,10 @@ # define VIM_SIZEOF_INT __SIZEOF_INT__ #endif +#if VIM_SIZEOF_INT < 4 && !defined(PROTO) + Error: Vim only works with 32 bit int or larger +#endif + /* * #defines for optionals and features * Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined. @@ -1664,8 +1668,6 @@ typedef long linenr_T; /* line number t typedef int colnr_T; /* column number type */ typedef unsigned short disptick_T; /* display tick type */ -#define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */ - /* * Well, you won't believe it, but some S/390 machines ("host", now also known * as zServer) use 31 bit pointers. There are also some newer machines, that @@ -1675,14 +1677,12 @@ typedef unsigned short disptick_T; /* di * With this we restrict the maximum line length to 1073741823. I guess this is * not a real problem. BTW: Longer lines are split. */ -#if VIM_SIZEOF_INT >= 4 -# ifdef __MVS__ -# define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */ -# else -# define MAXCOL (0x7fffffffL) /* maximum column number, 31 bits */ -# endif +#ifdef __MVS__ +# define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */ +# define MAXLNUM (0x3fffffffL) /* maximum (invalid) line number */ #else -# define MAXCOL (0x7fff) /* maximum column number, 15 bits */ +# define MAXCOL (0x7fffffffL) /* maximum column number, 31 bits */ +# define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */ #endif #define SHOWCMD_COLS 10 /* columns needed by shown command */