diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-08-26 23:11:25 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-08-27 17:59:43 +0200 |
commit | 691f4715c0cf4bc11ea2280db8777e6dd174a8ac (patch) | |
tree | 5fbd18d7d350d0df98cae0f620bafc2fd94006e7 /src/nvim/fileio.c | |
parent | 09c6ce8c4e4c6415cca9b834539ed0df461373f6 (diff) | |
download | rneovim-691f4715c0cf4bc11ea2280db8777e6dd174a8ac.tar.gz rneovim-691f4715c0cf4bc11ea2280db8777e6dd174a8ac.tar.bz2 rneovim-691f4715c0cf4bc11ea2280db8777e6dd174a8ac.zip |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
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 39b4eb4376..b873388473 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -699,7 +699,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip, * Decide which 'encoding' to use or use first. */ if (eap != NULL && eap->force_enc != 0) { - fenc = (char *)enc_canonize((char_u *)eap->cmd + eap->force_enc); + fenc = enc_canonize(eap->cmd + eap->force_enc); fenc_alloced = true; keep_dest_enc = true; } else if (curbuf->b_p_bin) { @@ -2056,8 +2056,8 @@ 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((char_u *)eap->cmd + eap->force_enc); - set_string_option_direct("fenc", -1, (char *)fenc, OPT_FREE|OPT_LOCAL, 0); + char *fenc = enc_canonize(eap->cmd + eap->force_enc); + set_string_option_direct("fenc", -1, fenc, OPT_FREE|OPT_LOCAL, 0); xfree(fenc); } } @@ -2081,12 +2081,12 @@ static char_u *next_fenc(char **pp, bool *alloced) } p = (char_u *)vim_strchr((*pp), ','); if (p == NULL) { - r = enc_canonize((char_u *)(*pp)); + r = (char_u *)enc_canonize(*pp); *pp += STRLEN(*pp); } else { r = vim_strnsave((char_u *)(*pp), (size_t)(p - (char_u *)(*pp))); *pp = (char *)p + 1; - p = enc_canonize(r); + p = (char_u *)enc_canonize((char *)r); xfree(r); r = p; } @@ -3055,7 +3055,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 *)enc_canonize((char_u *)fenc); + fenc = enc_canonize(fenc); fenc_tofree = fenc; } else { fenc = buf->b_p_fenc; |