]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-170 v7.2.170
authorBram Moolenaar <Bram@vim.org>
Wed, 13 May 2009 18:48:16 +0000 (18:48 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 13 May 2009 18:48:16 +0000 (18:48 +0000)
src/buffer.c
src/fileio.c
src/structs.h
src/version.c

index e9243d4569ba89bf405ae4efe31debe08bef3aad..4da9d638926c9a0e3c44fd5ede0a2790c425f676 100644 (file)
@@ -1678,9 +1678,10 @@ buflist_new(ffname, sfname, lnum, flags)
     buf->b_fname = buf->b_sfname;
 #ifdef UNIX
     if (st.st_dev == (dev_T)-1)
-       buf->b_dev = -1;
+       buf->b_dev_valid = FALSE;
     else
     {
+       buf->b_dev_valid = TRUE;
        buf->b_dev = st.st_dev;
        buf->b_ino = st.st_ino;
     }
@@ -2693,9 +2694,10 @@ setfname(buf, ffname, sfname, message)
     buf->b_fname = buf->b_sfname;
 #ifdef UNIX
     if (st.st_dev == (dev_T)-1)
-       buf->b_dev = -1;
+       buf->b_dev_valid = FALSE;
     else
     {
+       buf->b_dev_valid = TRUE;
        buf->b_dev = st.st_dev;
        buf->b_ino = st.st_ino;
     }
@@ -2889,7 +2891,7 @@ otherfile_buf(buf, ffname
        /* If no struct stat given, get it now */
        if (stp == NULL)
        {
-           if (buf->b_dev < 0 || mch_stat((char *)ffname, &st) < 0)
+           if (!buf->b_dev_valid || mch_stat((char *)ffname, &st) < 0)
                st.st_dev = (dev_T)-1;
            stp = &st;
        }
@@ -2926,11 +2928,12 @@ buf_setino(buf)
 
     if (buf->b_fname != NULL && mch_stat((char *)buf->b_fname, &st) >= 0)
     {
+       buf->b_dev_valid = TRUE;
        buf->b_dev = st.st_dev;
        buf->b_ino = st.st_ino;
     }
     else
-       buf->b_dev = -1;
+       buf->b_dev_valid = FALSE;
 }
 
 /*
@@ -2941,7 +2944,7 @@ buf_same_ino(buf, stp)
     buf_T      *buf;
     struct stat *stp;
 {
-    return (buf->b_dev >= 0
+    return (buf->b_dev_valid
            && stp->st_dev == buf->b_dev
            && stp->st_ino == buf->b_ino);
 }
index 3af64c4b0fba997984c0235ef8fa9f9d2888a316..ae656a0f103d06ebec92002c158c6e68d487d16a 100644 (file)
@@ -4416,7 +4416,7 @@ restore_backup:
 # endif
        buf_setino(buf);
     }
-    else if (buf->b_dev < 0)
+    else if (!buf->b_dev_valid)
        /* Set the inode when creating a new file. */
        buf_setino(buf);
 #endif
index 7deb5abc4b05e9a22e71e64115b997f9344b0216..25012d698adbe9b9eeffb29f55cd738640407b18 100644 (file)
@@ -1166,7 +1166,8 @@ struct file_buffer
     char_u     *b_fname;       /* current file name */
 
 #ifdef UNIX
-    dev_t      b_dev;          /* device number (-1 if not set) */
+    int                b_dev_valid;    /* TRUE when b_dev has a valid number */
+    dev_t      b_dev;          /* device number */
     ino_t      b_ino;          /* inode number */
 #endif
 #ifdef FEAT_CW_EDITOR
index 5a38f1bab47abb4755aedee648eea207173e7430..d8be1e692a0cb72a1b9f48e2b33e4fe319c11750 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    170,
 /**/
     169,
 /**/