Mercurial > vim
comparison src/ex_cmds2.c @ 1882:c8b87fa14d27 v7.2.179
updated for version 7.2-179
author | vimboss |
---|---|
date | Sat, 16 May 2009 19:16:33 +0000 |
parents | 932ff0c0f57b |
children | ef2890033e88 |
comparison
equal
deleted
inserted
replaced
1881:6605dca2960f | 1882:c8b87fa14d27 |
---|---|
26 * script when going through the list. */ | 26 * script when going through the list. */ |
27 typedef struct scriptitem_S | 27 typedef struct scriptitem_S |
28 { | 28 { |
29 char_u *sn_name; | 29 char_u *sn_name; |
30 # ifdef UNIX | 30 # ifdef UNIX |
31 int sn_dev; | 31 int sn_dev_valid; |
32 dev_t sn_dev; | |
32 ino_t sn_ino; | 33 ino_t sn_ino; |
33 # endif | 34 # endif |
34 # ifdef FEAT_PROFILE | 35 # ifdef FEAT_PROFILE |
35 int sn_prof_on; /* TRUE when script is/was profiled */ | 36 int sn_prof_on; /* TRUE when script is/was profiled */ |
36 int sn_pr_force; /* forceit: profile functions in this script */ | 37 int sn_pr_force; /* forceit: profile functions in this script */ |
3047 && ( | 3048 && ( |
3048 # ifdef UNIX | 3049 # ifdef UNIX |
3049 /* Compare dev/ino when possible, it catches symbolic | 3050 /* Compare dev/ino when possible, it catches symbolic |
3050 * links. Also compare file names, the inode may change | 3051 * links. Also compare file names, the inode may change |
3051 * when the file was edited. */ | 3052 * when the file was edited. */ |
3052 ((stat_ok && si->sn_dev != -1) | 3053 ((stat_ok && si->sn_dev_valid) |
3053 && (si->sn_dev == st.st_dev | 3054 && (si->sn_dev == st.st_dev |
3054 && si->sn_ino == st.st_ino)) || | 3055 && si->sn_ino == st.st_ino)) || |
3055 # endif | 3056 # endif |
3056 fnamecmp(si->sn_name, fname_exp) == 0)) | 3057 fnamecmp(si->sn_name, fname_exp) == 0)) |
3057 break; | 3058 break; |
3074 si->sn_name = fname_exp; | 3075 si->sn_name = fname_exp; |
3075 fname_exp = NULL; | 3076 fname_exp = NULL; |
3076 # ifdef UNIX | 3077 # ifdef UNIX |
3077 if (stat_ok) | 3078 if (stat_ok) |
3078 { | 3079 { |
3080 si->sn_dev_valid = TRUE; | |
3079 si->sn_dev = st.st_dev; | 3081 si->sn_dev = st.st_dev; |
3080 si->sn_ino = st.st_ino; | 3082 si->sn_ino = st.st_ino; |
3081 } | 3083 } |
3082 else | 3084 else |
3083 si->sn_dev = -1; | 3085 si->sn_dev_valid = FALSE; |
3084 # endif | 3086 # endif |
3085 | 3087 |
3086 /* Allocate the local script variables to use for this script. */ | 3088 /* Allocate the local script variables to use for this script. */ |
3087 new_script_vars(current_SID); | 3089 new_script_vars(current_SID); |
3088 } | 3090 } |