diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-24 17:59:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-24 17:59:39 +0100 |
commit | 30276f2beb248557c6b33cd5418bca8b7084b0a5 (patch) | |
tree | 56f7b88712a5ffffdd10681983e70501e2e1ba58 /src/fileio.c | |
parent | 264b74fa545edfb92c0d7d08a02c26331cc5b168 (diff) | |
download | vim-git-30276f2beb248557c6b33cd5418bca8b7084b0a5.tar.gz |
patch 8.1.0811: too many #ifdefsv8.1.0811
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, the final chapter.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/fileio.c b/src/fileio.c index aa84e9bb4..4cb13f27a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1178,10 +1178,9 @@ retry: */ if (!skip_read) { -#if VIM_SIZEOF_INT > 2 -# if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L) +#if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L) size = SSIZE_MAX; /* use max I/O size, 52K */ -# else +#else /* Use buffer >= 64K. Add linerest to double the size if the * line gets very long, to avoid a lot of copying. But don't * read more than 1 Mbyte at a time, so we can be interrupted. @@ -1189,20 +1188,11 @@ retry: size = 0x10000L + linerest; if (size > 0x100000L) size = 0x100000L; -# endif -#else - size = 0x7ff0L - linerest; /* limit buffer to 32K */ #endif } /* Protect against the argument of lalloc() going negative. */ - if ( -#if VIM_SIZEOF_INT <= 2 - linerest >= 0x7ff0 -#else - size < 0 || size + linerest + 1 < 0 || linerest >= MAXCOL -#endif - ) + if (size < 0 || size + linerest + 1 < 0 || linerest >= MAXCOL) { ++split; *ptr = NL; /* split line by inserting a NL */ |