aboutsummaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorHinidu <hinidu@gmail.com>2014-04-07 00:24:21 +0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-07 12:15:28 -0300
commit8a2ffb2b010e02dd8dcbb3182d5a6e27006f6e46 (patch)
tree0f815b3f51dc2e383b6a2a5c8b9805885cae2ec2 /src/fileio.c
parentc3cea30cb7952c44c3452d9e7926fe50397d43ae (diff)
downloadrneovim-8a2ffb2b010e02dd8dcbb3182d5a6e27006f6e46.tar.gz
rneovim-8a2ffb2b010e02dd8dcbb3182d5a6e27006f6e46.tar.bz2
rneovim-8a2ffb2b010e02dd8dcbb3182d5a6e27006f6e46.zip
Use stdbool in os module
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index bf845c4fda..903b84914b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -490,17 +490,13 @@ readfile (
}
if (fd < 0) { /* cannot open at all */
-#ifndef UNIX
- int isdir_f;
-#endif
msg_scroll = msg_save;
#ifndef UNIX
/*
* On MSDOS and Amiga we can't open a directory, check here.
*/
- isdir_f = (os_isdir(fname));
perm = os_getperm(fname); /* check if the file exists */
- if (isdir_f) {
+ if (os_isdir(fname)) {
filemess(curbuf, sfname, (char_u *)_("is a directory"), 0);
curbuf->b_p_ro = TRUE; /* must use "w!" now */
} else
@@ -2496,7 +2492,7 @@ buf_write (
int device = FALSE; /* writing to a device */
struct stat st_old;
int prev_got_int = got_int;
- int file_readonly = FALSE; /* overwritten file is read-only */
+ bool file_readonly = false; /* overwritten file is read-only */
static char *err_readonly =
"is read-only (cannot override: \"W\" in 'cpoptions')";
#if defined(UNIX) || defined(__EMX__XX) /*XXX fix me sometime? */
@@ -5021,7 +5017,7 @@ int vim_rename(char_u *from, char_u *to)
STRCPY(tempname, from);
for (n = 123; n < 99999; ++n) {
sprintf((char *)path_tail(tempname), "%d", n);
- if (os_file_exists(tempname) == FALSE) {
+ if (!os_file_exists(tempname)) {
if (os_rename(from, tempname) == OK) {
if (os_rename(tempname, to) == OK)
return 0;