diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-01-30 13:18:46 +0000 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2023-01-31 11:20:35 +0000 |
commit | f4b1f0d042a910f069cde9f336bb4d2a8443713c (patch) | |
tree | c2b5ba160663689b326183bda2850fc639c553ef | |
parent | 740f6ae168bf845360ee01442837237b717d53c6 (diff) | |
download | rneovim-f4b1f0d042a910f069cde9f336bb4d2a8443713c.tar.gz rneovim-f4b1f0d042a910f069cde9f336bb4d2a8443713c.tar.bz2 rneovim-f4b1f0d042a910f069cde9f336bb4d2a8443713c.zip |
refactor(fileio.c): remove HAS_BW_FLAGS
-rw-r--r-- | src/nvim/fileio.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index e2138485e9..826b25cd3e 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -81,7 +81,6 @@ # define UV_FS_COPYFILE_FICLONE 0 #endif -#define HAS_BW_FLAGS enum { FIO_LATIN1 = 0x01, // convert Latin1 FIO_UTF8 = 0x02, // convert UTF-8 @@ -107,9 +106,7 @@ struct bw_info { int bw_fd; // file descriptor char *bw_buf; // buffer with data to be written int bw_len; // length of data -#ifdef HAS_BW_FLAGS int bw_flags; // FIO_ flags -#endif char_u bw_rest[CONV_RESTLEN]; // not converted bytes int bw_restlen; // nr of bytes in bw_rest[] int bw_first; // first write call @@ -2150,9 +2147,7 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en int notconverted = false; char *fenc; // effective 'fileencoding' char *fenc_tofree = NULL; // allocated "fenc" -#ifdef HAS_BW_FLAGS int wb_flags = 0; -#endif #ifdef HAVE_ACL vim_acl_T acl = NULL; // ACL copied from original file to // backup or new file @@ -3117,9 +3112,7 @@ restore_backup: } write_info.bw_len = bufsize; -#ifdef HAS_BW_FLAGS write_info.bw_flags = wb_flags; -#endif fileformat = get_fileformat_force(buf, eap); s = buffer; len = 0; @@ -3899,9 +3892,7 @@ static int buf_write_bytes(struct bw_info *ip) { char *buf = ip->bw_buf; // data to write int len = ip->bw_len; // length of data -#ifdef HAS_BW_FLAGS int flags = ip->bw_flags; // extra flags -#endif // Skip conversion when writing the BOM. if (!(flags & FIO_NOCONVERT)) { |