diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-26 23:07:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 23:07:56 +0200 |
commit | b0e052a8b30ce84221c3f992e111713451633b36 (patch) | |
tree | 27caaef2e0b8351eb5637d1a969229663ec2c4a8 /src/nvim/fileio.c | |
parent | 6a13b8fa5460da5aa22a1c366e5252c26ed5fe1e (diff) | |
parent | 395277036014189c03b8969fc0a5cd2bdc5c8631 (diff) | |
download | rneovim-b0e052a8b30ce84221c3f992e111713451633b36.tar.gz rneovim-b0e052a8b30ce84221c3f992e111713451633b36.tar.bz2 rneovim-b0e052a8b30ce84221c3f992e111713451633b36.zip |
Merge pull request #19957 from dundargoc/refactor/char_u/1
refactor: replace char_u with char
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 206ef7c98d..21c1549f42 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -711,7 +711,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip, fenc = curbuf->b_p_fenc; // use format from buffer fenc_alloced = false; } else { - fenc_next = (char *)p_fencs; // try items in 'fileencodings' + fenc_next = p_fencs; // try items in 'fileencodings' fenc = (char *)next_fenc(&fenc_next, &fenc_alloced); } @@ -2735,7 +2735,7 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en if (*p_bex == NUL) { backup_ext = ".bak"; } else { - backup_ext = (char *)p_bex; + backup_ext = p_bex; } if (backup_copy) { @@ -2757,7 +2757,7 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en * For these reasons, the existing writable file must be truncated * and reused. Creation of a backup COPY will be attempted. */ - dirp = (char *)p_bdir; + dirp = p_bdir; while (*dirp) { /* * Isolate one directory name, using an entry in 'bdir'. @@ -2918,7 +2918,7 @@ nobackup: * path/fo.o.h.bak Try all directories in 'backupdir', first one * that works is used. */ - dirp = (char *)p_bdir; + dirp = p_bdir; while (*dirp) { /* * Isolate one directory name and make the backup file name. @@ -3572,7 +3572,7 @@ restore_backup: * the backup file our 'original' file. */ if (*p_pm && dobackup) { - char *const org = modname(fname, (char *)p_pm, false); + char *const org = modname(fname, p_pm, false); if (backup != NULL) { /* @@ -4172,7 +4172,7 @@ static bool need_conversion(const char_u *fenc) } else { // Ignore difference between "ansi" and "latin1", "ucs-4" and // "ucs-4be", etc. - enc_flags = get_fio_flags(p_enc); + enc_flags = get_fio_flags((char_u *)p_enc); fenc_flags = get_fio_flags(fenc); same_encoding = (enc_flags != 0 && fenc_flags == enc_flags); } @@ -4196,7 +4196,7 @@ static int get_fio_flags(const char_u *name) int prop; if (*name == NUL) { - name = p_enc; + name = (char_u *)p_enc; } prop = enc_canon_props(name); if (prop & ENC_UNICODE) { |