diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-05 20:19:06 +0100 |
commit | acc646ad8fc3ef11fcc63b69f3d8484e4a91accd (patch) | |
tree | 613753f19fe6f6fa45884750eb176c1517269ec2 /src/nvim/fileio.c | |
parent | c513cbf361000e6f09cd5b71b718e9de3f88904d (diff) | |
download | rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.gz rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.bz2 rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.zip |
refactor: the long goodbye
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 9e60f30cb5..804c9cec11 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -718,7 +718,7 @@ retry: if (read_buffer) { read_buf_lnum = 1; read_buf_col = 0; - } else if (read_stdin || vim_lseek(fd, (off_T)0L, SEEK_SET) != 0) { + } else if (read_stdin || vim_lseek(fd, 0, SEEK_SET) != 0) { // Can't rewind the file, give up. error = true; goto failed; @@ -880,9 +880,9 @@ retry: // 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. - size = 0x10000L + linerest; - if (size > 0x100000L) { - size = 0x100000L; + size = 0x10000 + linerest; + if (size > 0x100000) { + size = 0x100000; } } @@ -1531,7 +1531,7 @@ rewind_retry: if (try_unix && !read_stdin && (read_buffer - || vim_lseek(fd, (off_T)0L, SEEK_SET) == 0)) { + || vim_lseek(fd, 0, SEEK_SET) == 0)) { fileformat = EOL_UNIX; if (set_options) { set_fileformat(EOL_UNIX, OPT_LOCAL); @@ -3054,7 +3054,7 @@ int buf_check_timestamp(buf_T *buf) if (emsg_silent == 0 && !in_assert_fails) { ui_flush(); // give the user some time to think about it - os_delay(1004L, true); + os_delay(1004, true); // don't redraw and erase the message redraw_cmdline = false; |