From c2d5277fc9ab5a1f8430cb7a593fb12a4baf3f6d Mon Sep 17 00:00:00 2001 From: vimboss Date: Tue, 14 Jul 2009 10:20:22 +0000 Subject: [PATCH 1/6] updated for version 7.2-229 --- src/os_unix.c | 6 +++--- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/os_unix.c b/src/os_unix.c index 591b49c912..102b654a7c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1138,10 +1138,10 @@ mch_suspend() * to happen). */ { - long wait; - for (wait = 0; !sigcont_received && wait <= 3L; wait++) + long wait_time; + for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++) /* Loop is not entered most of the time */ - mch_delay(wait, FALSE); + mch_delay(wait_time, FALSE); } # endif diff --git a/src/version.c b/src/version.c index 250bf2d863..068f56f919 100644 --- a/src/version.c +++ b/src/version.c @@ -676,6 +676,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 229, /**/ 228, /**/ From eb6512ab82b33592332b5381bd5bfe75cdb164b6 Mon Sep 17 00:00:00 2001 From: vimboss Date: Tue, 14 Jul 2009 11:44:30 +0000 Subject: [PATCH 2/6] updated for version 7.2-230 --- src/getchar.c | 12 +++++------- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index e050601cfc..e81f7cb563 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -3708,11 +3708,10 @@ get_map_mode(cmdp, forceit) * Clear all mappings or abbreviations. * 'abbr' should be FALSE for mappings, TRUE for abbreviations. */ -/*ARGSUSED*/ void map_clear(cmdp, arg, forceit, abbr) char_u *cmdp; - char_u *arg; + char_u *arg UNUSED; int forceit; int abbr; { @@ -3741,13 +3740,12 @@ map_clear(cmdp, arg, forceit, abbr) /* * Clear all mappings in "mode". */ -/*ARGSUSED*/ void map_clear_int(buf, mode, local, abbr) - buf_T *buf; /* buffer for local mappings */ - int mode; /* mode in which to delete */ - int local; /* TRUE for buffer-local mappings */ - int abbr; /* TRUE for abbreviations */ + buf_T *buf UNUSED; /* buffer for local mappings */ + int mode; /* mode in which to delete */ + int local UNUSED; /* TRUE for buffer-local mappings */ + int abbr; /* TRUE for abbreviations */ { mapblock_T *mp, **mpp; int hash; diff --git a/src/version.c b/src/version.c index 068f56f919..b10cb7fcb5 100644 --- a/src/version.c +++ b/src/version.c @@ -676,6 +676,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 230, /**/ 229, /**/ From 7d87f83e262b8b0d92ceebb67b1698a419ce5c06 Mon Sep 17 00:00:00 2001 From: vimboss Date: Tue, 14 Jul 2009 14:04:54 +0000 Subject: [PATCH 3/6] updated for version 7.2-231 --- src/if_perl.xs | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/if_perl.xs b/src/if_perl.xs index a589f8fd09..926adcef5b 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -720,9 +720,11 @@ ex_perl(eap) #ifdef HAVE_SANDBOX if (sandbox) { +# ifndef MAKE_TEST /* avoid a warning for unreachable code */ if ((safe = perl_get_sv( "VIM::safe", FALSE )) == NULL || !SvTRUE(safe)) EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); else +# endif { PUSHMARK(SP); XPUSHs(safe); diff --git a/src/version.c b/src/version.c index b10cb7fcb5..b3624ef6b8 100644 --- a/src/version.c +++ b/src/version.c @@ -676,6 +676,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 231, /**/ 230, /**/ From af2e8b9e3b785ac891ff861accc9693aa40d1128 Mon Sep 17 00:00:00 2001 From: vimboss Date: Tue, 14 Jul 2009 15:38:41 +0000 Subject: [PATCH 4/6] updated for version 7.2-232 --- src/os_unix.c | 23 +++++++++++++++++++++++ src/os_unix.h | 5 ----- src/proto/os_unix.pro | 1 + src/version.c | 2 ++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/os_unix.c b/src/os_unix.c index 102b654a7c..3aa397bf63 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -319,6 +319,23 @@ static struct signalinfo {-1, "Unknown!", FALSE} }; + int +mch_chdir(path) + char *path; +{ + if (p_verbose >= 5) + { + verbose_enter(); + smsg((char_u *)"chdir(%s)", path); + verbose_leave(); + } +# ifdef VMS + return chdir(vms_fixfilename(path)); +# else + return chdir(path); +# endif +} + /* * Write s[len] to the screen. */ @@ -2424,6 +2441,12 @@ mch_FullName(fname, buf, len, force) #ifdef HAVE_FCHDIR if (fd >= 0) { + if (p_verbose >= 5) + { + verbose_enter(); + MSG("fchdir() to previous dir"); + verbose_leave(); + } l = fchdir(fd); close(fd); } diff --git a/src/os_unix.h b/src/os_unix.h index 944cc1b838..5fd28af7d0 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -482,11 +482,6 @@ typedef struct dsc$descriptor DESC; # else int mch_rename __ARGS((const char *src, const char *dest)); # endif -# ifdef VMS -# define mch_chdir(s) chdir(vms_fixfilename(s)) -# else -# define mch_chdir(s) chdir(s) -# endif # ifndef VMS # ifdef __MVS__ /* on OS390 Unix getenv() doesn't return a pointer to persistent diff --git a/src/proto/os_unix.pro b/src/proto/os_unix.pro index 36193bb00d..e4cad51de4 100644 --- a/src/proto/os_unix.pro +++ b/src/proto/os_unix.pro @@ -1,4 +1,5 @@ /* os_unix.c */ +int mch_chdir __ARGS((char *path)); void mch_write __ARGS((char_u *s, int len)); int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt)); int mch_char_avail __ARGS((void)); diff --git a/src/version.c b/src/version.c index b3624ef6b8..6d1b28b417 100644 --- a/src/version.c +++ b/src/version.c @@ -676,6 +676,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 232, /**/ 231, /**/ From 7068f9086cc5fe80a16959641a342de768f1a5b7 Mon Sep 17 00:00:00 2001 From: vimboss Date: Tue, 14 Jul 2009 16:38:36 +0000 Subject: [PATCH 5/6] updated for version 7.2-233 --- src/os_mac.h | 1 - src/os_msdos.c | 6 ++++++ src/os_mswin.c | 6 ++++++ src/os_riscos.c | 6 ++++++ src/version.c | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/os_mac.h b/src/os_mac.h index aadaed7766..314ec32482 100644 --- a/src/os_mac.h +++ b/src/os_mac.h @@ -291,7 +291,6 @@ # define HAVE_SETENV # define HAVE_RENAME # endif -# define mch_chdir(s) chdir(s) #endif #if defined(MACOS_X) && !defined(HAVE_CONFIG_H) diff --git a/src/os_msdos.c b/src/os_msdos.c index 6748e6a83e..0df20c72b4 100644 --- a/src/os_msdos.c +++ b/src/os_msdos.c @@ -2039,6 +2039,12 @@ mch_chdir(char *path) { if (path[0] == NUL) /* just checking... */ return 0; + if (p_verbose >= 5) + { + verbose_enter(); + smsg((char_u *)"chdir(%s)", path); + verbose_leave(); + } if (path[1] == ':') /* has a drive name */ { if (change_drive(TOLOWER_ASC(path[0]) - 'a' + 1)) diff --git a/src/os_mswin.c b/src/os_mswin.c index 94cf3a9624..c3588e6f56 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -653,6 +653,12 @@ mch_chdir(char *path) if (path[0] == NUL) /* just checking... */ return -1; + if (p_verbose >= 5) + { + verbose_enter(); + smsg((char_u *)"chdir(%s)", path); + verbose_leave(); + } if (isalpha(path[0]) && path[1] == ':') /* has a drive name */ { /* If we can change to the drive, skip that part of the path. If we diff --git a/src/os_riscos.c b/src/os_riscos.c index 8d6df27802..5c443fce15 100644 --- a/src/os_riscos.c +++ b/src/os_riscos.c @@ -1203,6 +1203,12 @@ mch_chdir(dir) int retval; char_u *new_dir; + if (p_verbose >= 5) + { + verbose_enter(); + smsg((char_u *)"chdir(%s)", dir); + verbose_leave(); + } length = strlen(dir); if (dir[length - 1] != '.') return chdir(dir); /* No trailing dots - nothing to do. */ diff --git a/src/version.c b/src/version.c index 6d1b28b417..aeb708fb8a 100644 --- a/src/version.c +++ b/src/version.c @@ -676,6 +676,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 233, /**/ 232, /**/ From 7391be3977f37b17cc07d167481409d75395eb25 Mon Sep 17 00:00:00 2001 From: vimboss Date: Tue, 14 Jul 2009 19:40:21 +0000 Subject: [PATCH 6/6] updated for version 7.2-234 --- runtime/doc/cmdline.txt | 9 ++++++++- src/misc1.c | 24 +++++++++++++++++++----- src/version.c | 2 ++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 839536b21f..c87e61c089 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -441,13 +441,20 @@ between files with almost the same name. If there are multiple matches, those files with an extension that is in the 'suffixes' option are ignored. The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored. -It is impossible to ignore suffixes with two dots. Examples: + +An empty entry, two consecutive commas, match a file name that does not +contain a ".", thus has no suffix. This is useful to ignore "prog" and prefer +"prog.c". + +Examples: pattern: files: match: ~ test* test.c test.h test.o test.c test* test.h test.o test.h and test.o test* test.i test.h test.c test.i and test.c +It is impossible to ignore suffixes with two dots. + If there is more than one matching file (after ignoring the ones matching the 'suffixes' option) the first file name is inserted. You can see that there is only one match when you type 'wildchar' twice and the completed diff --git a/src/misc1.c b/src/misc1.c index 39669b4c32..f86a16781f 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -8533,11 +8533,25 @@ match_suffix(fname) for (setsuf = p_su; *setsuf; ) { setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,"); - if (fnamelen >= setsuflen - && fnamencmp(suf_buf, fname + fnamelen - setsuflen, - (size_t)setsuflen) == 0) - break; - setsuflen = 0; + if (setsuflen == 0) + { + char_u *tail = gettail(fname); + + /* empty entry: match name without a '.' */ + if (vim_strchr(tail, '.') == NULL) + { + setsuflen = 1; + break; + } + } + else + { + if (fnamelen >= setsuflen + && fnamencmp(suf_buf, fname + fnamelen - setsuflen, + (size_t)setsuflen) == 0) + break; + setsuflen = 0; + } } return (setsuflen != 0); } diff --git a/src/version.c b/src/version.c index aeb708fb8a..3f07803e23 100644 --- a/src/version.c +++ b/src/version.c @@ -676,6 +676,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 234, /**/ 233, /**/