Mercurial > vim
comparison src/misc2.c @ 1881:6605dca2960f v7.2.178
updated for version 7.2-178
author | vimboss |
---|---|
date | Sat, 16 May 2009 19:07:03 +0000 |
parents | 63369d73b551 |
children | b1b09b68d706 |
comparison
equal
deleted
inserted
replaced
1880:e5602d92da8c | 1881:6605dca2960f |
---|---|
2839 #if defined(FEAT_CMDL_COMPL) || defined(PROTO) | 2839 #if defined(FEAT_CMDL_COMPL) || defined(PROTO) |
2840 char_u * | 2840 char_u * |
2841 get_key_name(i) | 2841 get_key_name(i) |
2842 int i; | 2842 int i; |
2843 { | 2843 { |
2844 if (i >= KEY_NAMES_TABLE_LEN) | 2844 if (i >= (int)KEY_NAMES_TABLE_LEN) |
2845 return NULL; | 2845 return NULL; |
2846 return key_names_table[i].name; | 2846 return key_names_table[i].name; |
2847 } | 2847 } |
2848 #endif | 2848 #endif |
2849 | 2849 |
3867 #endif | 3867 #endif |
3868 /* for unix use inode etc for comparison (needed because of links), else | 3868 /* for unix use inode etc for comparison (needed because of links), else |
3869 * use filename. | 3869 * use filename. |
3870 */ | 3870 */ |
3871 #ifdef UNIX | 3871 #ifdef UNIX |
3872 int ffv_dev; /* device number (-1 if not set) */ | 3872 int ffv_dev_valid; /* ffv_dev and ffv_ino were set */ |
3873 dev_t ffv_dev; /* device number */ | |
3873 ino_t ffv_ino; /* inode number */ | 3874 ino_t ffv_ino; /* inode number */ |
3874 #endif | 3875 #endif |
3875 /* The memory for this struct is allocated according to the length of | 3876 /* The memory for this struct is allocated according to the length of |
3876 * ffv_fname. | 3877 * ffv_fname. |
3877 */ | 3878 */ |
4057 * must be NULL. | 4058 * must be NULL. |
4058 * | 4059 * |
4059 * This function silently ignores a few errors, vim_findfile() will have | 4060 * This function silently ignores a few errors, vim_findfile() will have |
4060 * limited functionality then. | 4061 * limited functionality then. |
4061 */ | 4062 */ |
4062 /*ARGSUSED*/ | |
4063 void * | 4063 void * |
4064 vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what, | 4064 vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what, |
4065 search_ctx_arg, tagfile, rel_fname) | 4065 search_ctx_arg, tagfile, rel_fname) |
4066 char_u *path; | 4066 char_u *path; |
4067 char_u *filename; | 4067 char_u *filename; |
4068 char_u *stopdirs; | 4068 char_u *stopdirs UNUSED; |
4069 int level; | 4069 int level; |
4070 int free_visited; | 4070 int free_visited; |
4071 int find_what; | 4071 int find_what; |
4072 void *search_ctx_arg; | 4072 void *search_ctx_arg; |
4073 int tagfile; | 4073 int tagfile; |
5061 /* check against list of already visited files */ | 5061 /* check against list of already visited files */ |
5062 for (vp = *visited_list; vp != NULL; vp = vp->ffv_next) | 5062 for (vp = *visited_list; vp != NULL; vp = vp->ffv_next) |
5063 { | 5063 { |
5064 if ( | 5064 if ( |
5065 #ifdef UNIX | 5065 #ifdef UNIX |
5066 !url | 5066 !url ? (vp->ffv_dev_valid && vp->ffv_dev == st.st_dev |
5067 ? (vp->ffv_dev == st.st_dev | 5067 && vp->ffv_ino == st.st_ino) |
5068 && vp->ffv_ino == st.st_ino) | 5068 : |
5069 : | |
5070 #endif | 5069 #endif |
5071 fnamecmp(vp->ffv_fname, ff_expand_buffer) == 0 | 5070 fnamecmp(vp->ffv_fname, ff_expand_buffer) == 0 |
5072 ) | 5071 ) |
5073 { | 5072 { |
5074 #ifdef FEAT_PATH_EXTRA | 5073 #ifdef FEAT_PATH_EXTRA |
5089 if (vp != NULL) | 5088 if (vp != NULL) |
5090 { | 5089 { |
5091 #ifdef UNIX | 5090 #ifdef UNIX |
5092 if (!url) | 5091 if (!url) |
5093 { | 5092 { |
5093 vp->ffv_dev_valid = TRUE; | |
5094 vp->ffv_ino = st.st_ino; | 5094 vp->ffv_ino = st.st_ino; |
5095 vp->ffv_dev = st.st_dev; | 5095 vp->ffv_dev = st.st_dev; |
5096 vp->ffv_fname[0] = NUL; | 5096 vp->ffv_fname[0] = NUL; |
5097 } | 5097 } |
5098 else | 5098 else |
5099 { | 5099 { |
5100 vp->ffv_ino = 0; | 5100 vp->ffv_dev_valid = FALSE; |
5101 vp->ffv_dev = -1; | |
5102 #endif | 5101 #endif |
5103 STRCPY(vp->ffv_fname, ff_expand_buffer); | 5102 STRCPY(vp->ffv_fname, ff_expand_buffer); |
5104 #ifdef UNIX | 5103 #ifdef UNIX |
5105 } | 5104 } |
5106 #endif | 5105 #endif |