aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memfile.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerDundar Göc <gocdundar@gmail.com>2022-08-27 17:59:43 +0200
commit691f4715c0cf4bc11ea2280db8777e6dd174a8ac (patch)
tree5fbd18d7d350d0df98cae0f620bafc2fd94006e7 /src/nvim/memfile.c
parent09c6ce8c4e4c6415cca9b834539ed0df461373f6 (diff)
downloadrneovim-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/memfile.c')
-rw-r--r--src/nvim/memfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c
index 216ee26620..9446aaee4f 100644
--- a/src/nvim/memfile.c
+++ b/src/nvim/memfile.c
@@ -77,7 +77,7 @@
///
/// @return - The open memory file, on success.
/// - NULL, on failure (e.g. file does not exist).
-memfile_T *mf_open(char_u *fname, int flags)
+memfile_T *mf_open(char *fname, int flags)
{
memfile_T *mfp = xmalloc(sizeof(memfile_T));
@@ -148,7 +148,7 @@ memfile_T *mf_open(char_u *fname, int flags)
///
/// @return OK On success.
/// FAIL If file could not be opened.
-int mf_open_file(memfile_T *mfp, char_u *fname)
+int mf_open_file(memfile_T *mfp, char *fname)
{
if (mf_do_open(mfp, fname, O_RDWR | O_CREAT | O_EXCL)) {
mfp->mf_dirty = true;
@@ -749,9 +749,9 @@ void mf_free_fnames(memfile_T *mfp)
///
/// Only called when creating or renaming the swapfile. Either way it's a new
/// name so we must work out the full path name.
-void mf_set_fnames(memfile_T *mfp, char_u *fname)
+void mf_set_fnames(memfile_T *mfp, char *fname)
{
- mfp->mf_fname = fname;
+ mfp->mf_fname = (char_u *)fname;
mfp->mf_ffname = (char_u *)FullName_save((char *)mfp->mf_fname, false);
}
@@ -779,7 +779,7 @@ bool mf_need_trans(memfile_T *mfp)
///
/// @param flags Flags for open().
/// @return A bool indicating success of the `open` call.
-static bool mf_do_open(memfile_T *mfp, char_u *fname, int flags)
+static bool mf_do_open(memfile_T *mfp, char *fname, int flags)
{
// fname cannot be NameBuff, because it must have been allocated.
mf_set_fnames(mfp, fname);