diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-06-28 03:24:35 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-28 03:24:35 -0400 |
commit | 2fcc07892fcf05479fa1142e6a4fe5101c1cdf7a (patch) | |
tree | 836e10a3a766d7e3bd4a6b8178b7f3a39264165b /src/nvim/if_cscope.c | |
parent | 8a85b37253ccb3aa9e127a53f5a0c0ee80cd65d7 (diff) | |
parent | 147ab48d1ce6204ef80d4bdf0d44cfdf6863e690 (diff) | |
download | rneovim-2fcc07892fcf05479fa1142e6a4fe5101c1cdf7a.tar.gz rneovim-2fcc07892fcf05479fa1142e6a4fe5101c1cdf7a.tar.bz2 rneovim-2fcc07892fcf05479fa1142e6a4fe5101c1cdf7a.zip |
Merge #775 'Implement `FileID` struct'
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r-- | src/nvim/if_cscope.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index ffc00f060a..73dac908e9 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -1139,14 +1139,7 @@ static void clear_csinfo(int i) csinfo[i].fname = NULL; csinfo[i].ppath = NULL; csinfo[i].flags = NULL; -#if defined(UNIX) - csinfo[i].st_dev = (dev_t)0; - csinfo[i].st_ino = (ino_t)0; -#else - csinfo[i].nVolume = 0; - csinfo[i].nIndexHigh = 0; - csinfo[i].nIndexLow = 0; -#endif + csinfo[i].file_id = FILE_ID_EMPTY; csinfo[i].pid = 0; csinfo[i].fr_fp = NULL; csinfo[i].to_fp = NULL; @@ -1181,8 +1174,7 @@ static int cs_insert_filelist(char *fname, char *ppath, char *flags, i = -1; /* can be set to the index of an empty item in csinfo */ for (j = 0; j < csinfo_size; j++) { if (csinfo[j].fname != NULL - && csinfo[j].st_dev == file_info->stat.st_dev - && csinfo[j].st_ino == file_info->stat.st_ino) { + && os_file_id_equal_file_info(&(csinfo[j].file_id), file_info)) { if (p_csverbose) (void)EMSG(_("E568: duplicate cscope database not added")); return -1; @@ -1225,8 +1217,7 @@ static int cs_insert_filelist(char *fname, char *ppath, char *flags, } else csinfo[i].flags = NULL; - csinfo[i].st_dev = file_info->stat.st_dev; - csinfo[i].st_ino = file_info->stat.st_ino; + os_file_info_get_id(file_info, &(csinfo[i].file_id)); return i; } /* cs_insert_filelist */ |