aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-04-30 16:48:00 +0200
committerGitHub <noreply@github.com>2022-04-30 16:48:00 +0200
commit3c23100130725bb79c04e933c505bbeda96fb3bb (patch)
tree6184115b0f11cec968966455ce1d3b2e81873f1b /src/nvim/fileio.c
parentfcdf24d8be4abada88355538a23d771e41c77dd4 (diff)
downloadrneovim-3c23100130725bb79c04e933c505bbeda96fb3bb.tar.gz
rneovim-3c23100130725bb79c04e933c505bbeda96fb3bb.tar.bz2
rneovim-3c23100130725bb79c04e933c505bbeda96fb3bb.zip
refactor: replace char_u variables and functions with char (#18288)
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index f1195f1644..7ca7abccdc 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -690,7 +690,7 @@ int readfile(char_u *fname, char_u *sfname, linenr_T from, linenr_T lines_to_ski
* Decide which 'encoding' to use or use first.
*/
if (eap != NULL && eap->force_enc != 0) {
- fenc = enc_canonize(eap->cmd + eap->force_enc);
+ fenc = enc_canonize((char_u *)eap->cmd + eap->force_enc);
fenc_alloced = true;
keep_dest_enc = true;
} else if (curbuf->b_p_bin) {
@@ -2027,7 +2027,7 @@ void prep_exarg(exarg_T *eap, const buf_T *buf)
const size_t cmd_len = 15 + STRLEN(buf->b_p_fenc);
eap->cmd = xmalloc(cmd_len);
- snprintf((char *)eap->cmd, cmd_len, "e ++enc=%s", buf->b_p_fenc);
+ snprintf(eap->cmd, cmd_len, "e ++enc=%s", buf->b_p_fenc);
eap->force_enc = 8;
eap->bad_char = buf->b_bad_char;
eap->force_ff = *buf->b_p_ff;
@@ -2062,7 +2062,7 @@ void set_file_options(int set_options, exarg_T *eap)
void set_forced_fenc(exarg_T *eap)
{
if (eap->force_enc != 0) {
- char_u *fenc = enc_canonize(eap->cmd + eap->force_enc);
+ char_u *fenc = enc_canonize((char_u *)eap->cmd + eap->force_enc);
set_string_option_direct("fenc", -1, fenc, OPT_FREE|OPT_LOCAL, 0);
xfree(fenc);
}
@@ -3066,7 +3066,7 @@ nobackup:
// Check for forced 'fileencoding' from "++opt=val" argument.
if (eap != NULL && eap->force_enc != 0) {
- fenc = eap->cmd + eap->force_enc;
+ fenc = (char_u *)eap->cmd + eap->force_enc;
fenc = enc_canonize(fenc);
fenc_tofree = fenc;
} else {