aboutsummaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorStefan Hoffmann <stefan991@gmail.com>2014-03-16 16:06:55 +0100
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-03 10:30:03 -0300
commitf762a9e195cdd1db3d57561a5e82a1ea6799d8ba (patch)
treef34516c296e1aadb06e7fcda3096f107dc1df45a /src/misc2.c
parent071d28076f4ee057764359999cf2fabc75e99314 (diff)
downloadrneovim-f762a9e195cdd1db3d57561a5e82a1ea6799d8ba.tar.gz
rneovim-f762a9e195cdd1db3d57561a5e82a1ea6799d8ba.tar.bz2
rneovim-f762a9e195cdd1db3d57561a5e82a1ea6799d8ba.zip
move filewritable() into /src/os/fs.c and rename it
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/misc2.c b/src/misc2.c
index cefcc568cc..180ebedcd8 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1667,33 +1667,6 @@ void sort_strings(char_u **files, int count)
}
/*
- * Return 0 for not writable, 1 for writable file, 2 for a dir which we have
- * rights to write into.
- */
-int filewritable(char_u *fname)
-{
- int retval = 0;
-#if defined(UNIX) || defined(VMS)
- int perm = 0;
-#endif
-
-#if defined(UNIX) || defined(VMS)
- perm = os_getperm(fname);
-#endif
- if (
-# if defined(UNIX) || defined(VMS)
- (perm & 0222) &&
-# endif
- mch_access((char *)fname, W_OK) == 0
- ) {
- ++retval;
- if (os_isdir(fname))
- ++retval;
- }
- return retval;
-}
-
-/*
* Print an error message with one or two "%s" and one or two string arguments.
* This is not in message.c to avoid a warning for prototypes.
*/