Mercurial > vim
comparison src/fileio.c @ 5684:136f05449f29 v7.4.188
updated for version 7.4.188
Problem: SIZEOF_LONG clashes with similar defines in header files.
Solution: Rename to a name starting with VIM_. Also for SIZEOF_INT.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 23 Feb 2014 22:52:40 +0100 |
parents | 391e10afccf6 |
children | 6050f52d7cd8 |
comparison
equal
deleted
inserted
replaced
5683:ad27683db066 | 5684:136f05449f29 |
---|---|
1183 * We allocate as much space for the file as we can get, plus | 1183 * We allocate as much space for the file as we can get, plus |
1184 * space for the old line plus room for one terminating NUL. | 1184 * space for the old line plus room for one terminating NUL. |
1185 * The amount is limited by the fact that read() only can read | 1185 * The amount is limited by the fact that read() only can read |
1186 * upto max_unsigned characters (and other things). | 1186 * upto max_unsigned characters (and other things). |
1187 */ | 1187 */ |
1188 #if SIZEOF_INT <= 2 | 1188 #if VIM_SIZEOF_INT <= 2 |
1189 if (linerest >= 0x7ff0) | 1189 if (linerest >= 0x7ff0) |
1190 { | 1190 { |
1191 ++split; | 1191 ++split; |
1192 *ptr = NL; /* split line by inserting a NL */ | 1192 *ptr = NL; /* split line by inserting a NL */ |
1193 size = 1; | 1193 size = 1; |
1195 else | 1195 else |
1196 #endif | 1196 #endif |
1197 { | 1197 { |
1198 if (!skip_read) | 1198 if (!skip_read) |
1199 { | 1199 { |
1200 #if SIZEOF_INT > 2 | 1200 #if VIM_SIZEOF_INT > 2 |
1201 # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L) | 1201 # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L) |
1202 size = SSIZE_MAX; /* use max I/O size, 52K */ | 1202 size = SSIZE_MAX; /* use max I/O size, 52K */ |
1203 # else | 1203 # else |
1204 size = 0x10000L; /* use buffer >= 64K */ | 1204 size = 0x10000L; /* use buffer >= 64K */ |
1205 # endif | 1205 # endif |