From 9e2f853d0055e47c6c11cf6fe42f367ffe6906d6 Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 17 Aug 2008 21:03:18 +0000 Subject: [PATCH 01/22] updated for version 7.2-001 --- src/pty.c | 5 +++-- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pty.c b/src/pty.c index cd17bde2fb..d23cb2ef12 100644 --- a/src/pty.c +++ b/src/pty.c @@ -270,9 +270,10 @@ OpenPTY(ttyn) } #endif -#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) +#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) && !defined(MACOS_X) -/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work! */ +/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work! + * Same for Mac OS X Leopard. */ #define PTY_DONE int OpenPTY(ttyn) diff --git a/src/version.c b/src/version.c index 21d7b143c2..c8565c447a 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 */ +/**/ + 1, /**/ 0 }; From 17f08c9776922f742152c068d40a324acf11d80b Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 17 Aug 2008 21:44:45 +0000 Subject: [PATCH 02/22] updated for version 7.2-002 --- src/menu.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/menu.c b/src/menu.c index 94e5938d71..7d4839fdaa 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1120,6 +1120,7 @@ show_menus(path_name, modes) parent = menu; menu = menu->children; } + vim_free(path_name); /* Now we have found the matching menu, and we list the mappings */ /* Highlight title */ diff --git a/src/version.c b/src/version.c index c8565c447a..6730cc0fd7 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 */ +/**/ + 2, /**/ 1, /**/ From 91ed612ac08fa85fd8e4f11153d2e21ffc0311d5 Mon Sep 17 00:00:00 2001 From: vimboss Date: Mon, 25 Aug 2008 02:14:05 +0000 Subject: [PATCH 03/22] updated for version 7.2-003 --- src/spell.c | 6 +++--- src/version.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/spell.c b/src/spell.c index cdff0a3b9e..53869bbcaa 100644 --- a/src/spell.c +++ b/src/spell.c @@ -77,7 +77,7 @@ /* * Do the opposite: based on a maximum end score and a known sound score, - * compute the the maximum word score that can be used. + * compute the maximum word score that can be used. */ #define MAXSCORE(word_score, sound_score) ((4 * word_score - sound_score) / 3) @@ -625,7 +625,7 @@ typedef struct suggest_S /* TRUE if a word appears in the list of banned words. */ #define WAS_BANNED(su, word) (!HASHITEM_EMPTY(hash_find(&su->su_banned, word))) -/* Number of suggestions kept when cleaning up. we need to keep more than +/* Number of suggestions kept when cleaning up. We need to keep more than * what is displayed, because when rescore_suggestions() is called the score * may change and wrong suggestions may be removed later. */ #define SUG_CLEAN_COUNT(su) ((su)->su_maxcount < 130 ? 150 : (su)->su_maxcount + 20) @@ -5980,7 +5980,7 @@ spell_read_aff(spin, fname) else if (spin->si_newprefID == 0 || spin->si_newprefID == 127) MSG(_("Too many compound flags")); else - MSG(_("Too many posponed prefixes and/or compound flags")); + MSG(_("Too many postponed prefixes and/or compound flags")); } if (syllable != NULL) diff --git a/src/version.c b/src/version.c index 6730cc0fd7..ef68174afd 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 */ +/**/ + 3, /**/ 2, /**/ @@ -790,7 +792,7 @@ list_version() MSG_PUTS(_("\nRISC OS version")); #endif #ifdef VMS - MSG_PUTS("\nOpenVMS version"); + MSG_PUTS(_("\nOpenVMS version")); # ifdef HAVE_PATHDEF if (*compiled_arch != NUL) { From 92ed496e2926e1e931b989464c8396218cfa4063 Mon Sep 17 00:00:00 2001 From: vimboss Date: Mon, 25 Aug 2008 02:35:59 +0000 Subject: [PATCH 04/22] updated for version 7.2-004 --- src/if_cscope.c | 13 +++++++++++-- src/if_cscope.h | 11 ----------- src/version.c | 2 ++ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/if_cscope.c b/src/if_cscope.c index 600fcb0a37..4dff11631e 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -74,7 +74,7 @@ static cscmd_T cs_cmds[] = { "add", cs_add, N_("Add a new database"), "add file|dir [pre-path] [flags]", 0 }, { "find", cs_find, - N_("Query for a pattern"), FIND_USAGE, 1 }, + N_("Query for a pattern"), "find c|d|e|f|g|i|s|t name", 1 }, { "help", cs_help, N_("Show this message"), "help", 0 }, { "kill", cs_kill, @@ -1180,7 +1180,16 @@ cs_help(eap) (void)smsg((char_u *)_("%-5s: %-30s (Usage: %s)"), cmdp->name, _(cmdp->help), cmdp->usage); if (strcmp(cmdp->name, "find") == 0) - MSG_PUTS(FIND_HELP); + MSG_PUTS(_("\n" + " c: Find functions calling this function\n" + " d: Find functions called by this function\n" + " e: Find this egrep pattern\n" + " f: Find this file\n" + " g: Find this definition\n" + " i: Find files #including this file\n" + " s: Find this C symbol\n" + " t: Find assignments to\n")); + cmdp++; } diff --git a/src/if_cscope.h b/src/if_cscope.h index 99d472b9c7..89b69f7c72 100644 --- a/src/if_cscope.h +++ b/src/if_cscope.h @@ -42,17 +42,6 @@ * f 7name Find this file * i 8name Find files #including this file */ -#define FIND_USAGE "find c|d|e|f|g|i|s|t name" -#define FIND_HELP "\n\ - c: Find functions calling this function\n\ - d: Find functions called by this function\n\ - e: Find this egrep pattern\n\ - f: Find this file\n\ - g: Find this definition\n\ - i: Find files #including this file\n\ - s: Find this C symbol\n\ - t: Find assignments to\n" - typedef struct { char * name; diff --git a/src/version.c b/src/version.c index ef68174afd..5ee09c7628 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 */ +/**/ + 4, /**/ 3, /**/ From 28132658b2c1179a2474e6b7851e4acb27bba4cf Mon Sep 17 00:00:00 2001 From: vimboss Date: Mon, 25 Aug 2008 02:49:18 +0000 Subject: [PATCH 05/22] updated for version 7.2-005 --- src/eval.c | 18 +++++++++++------- src/version.c | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/eval.c b/src/eval.c index 5802a08940..351f24c37d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3657,8 +3657,8 @@ item_lock(tv, deep, lock) } /* - * Return TRUE if typeval "tv" is locked: Either tha value is locked itself or - * it refers to a List or Dictionary that is locked. + * Return TRUE if typeval "tv" is locked: Either that value is locked itself + * or it refers to a List or Dictionary that is locked. */ static int tv_islocked(tv) @@ -15838,10 +15838,9 @@ item_compare2(s1, s2) if (res == FAIL) res = ITEM_COMPARE_FAIL; else - /* return value has wrong type */ res = get_tv_number_chk(&rettv, &item_compare_func_err); if (item_compare_func_err) - res = ITEM_COMPARE_FAIL; + res = ITEM_COMPARE_FAIL; /* return value has wrong type */ clear_tv(&rettv); return res; } @@ -20590,6 +20589,9 @@ func_dump_profile(fd) int st_len = 0; todo = (int)func_hashtab.ht_used; + if (todo == 0) + return; /* nothing to dump */ + sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T) * todo)); for (hi = func_hashtab.ht_array; todo > 0; ++hi) @@ -20638,6 +20640,8 @@ func_dump_profile(fd) prof_self_cmp); prof_sort_list(fd, sorttab, st_len, "SELF", TRUE); } + + vim_free(sorttab); } static void @@ -21204,7 +21208,7 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict) if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL)) func_do_profile(fp); if (fp->uf_profiling - || (fc.caller != NULL && &fc.caller->func->uf_profiling)) + || (fc.caller != NULL && fc.caller->func->uf_profiling)) { ++fp->uf_tm_count; profile_start(&call_start); @@ -21235,13 +21239,13 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict) #ifdef FEAT_PROFILE if (do_profiling == PROF_YES && (fp->uf_profiling - || (fc.caller != NULL && &fc.caller->func->uf_profiling))) + || (fc.caller != NULL && fc.caller->func->uf_profiling))) { profile_end(&call_start); profile_sub_wait(&wait_start, &call_start); profile_add(&fp->uf_tm_total, &call_start); profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children); - if (fc.caller != NULL && &fc.caller->func->uf_profiling) + if (fc.caller != NULL && fc.caller->func->uf_profiling) { profile_add(&fc.caller->func->uf_tm_children, &call_start); profile_add(&fc.caller->func->uf_tml_children, &call_start); diff --git a/src/version.c b/src/version.c index 5ee09c7628..cf3c6ed96e 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 */ +/**/ + 5, /**/ 4, /**/ From b2e259fb620a901cc8e07bf66d9b3b56ac971ec3 Mon Sep 17 00:00:00 2001 From: vimboss Date: Mon, 25 Aug 2008 03:04:18 +0000 Subject: [PATCH 06/22] updated for version 7.2-006 --- runtime/scripts.vim | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 62ea472d48..d20ab09ad8 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -234,6 +234,10 @@ else elseif s:line1 =~ '\' + set ft=html + " PDF elseif s:line1 =~ '^%PDF-' set ft=pdf diff --git a/src/version.c b/src/version.c index cf3c6ed96e..dc8fab6ec6 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 */ +/**/ + 6, /**/ 5, /**/ From 96e61949b39f3650cc17434e3fbb863f6043ee18 Mon Sep 17 00:00:00 2001 From: vimboss Date: Mon, 1 Sep 2008 14:51:37 +0000 Subject: [PATCH 07/22] updated for version 7.2-007 --- runtime/doc/os_vms.txt | 129 +++++++++++++++++++++++++++++++++++++-- src/Make_vms.mms | 4 +- src/os_vms_conf.h | 2 + src/testdir/Make_vms.mms | 41 ++++++++++--- src/testdir/test30.in | 15 +++-- src/testdir/test54.in | 9 ++- src/version.c | 2 + 7 files changed, 183 insertions(+), 19 deletions(-) diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index f74700d26f..0d75906289 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -1,4 +1,4 @@ -*os_vms.txt* For Vim version 7.2. Last change: 2006 Nov 18 +*os_vms.txt* For Vim version 7.2. Last change: 2008 Aug 19 VIM REFERENCE MANUAL @@ -312,7 +312,7 @@ features, it is worth to choose non GUI executables. 8. Useful notes *vms-notes* -8.1 backspace/delete +8.1 Backspace/delete 8.2 Filters 8.3 VMS file version numbers 8.4 Directory conversion @@ -326,8 +326,10 @@ features, it is worth to choose non GUI executables. 8.12 diff-mode 8.13 Allow '$' in C keywords 8.14 VIMTUTOR for beginners +8.15 Slow start in console mode issue +8.16 Common VIM directory - different architectures -8.1 backspace/delete +8.1 Backspace/delete There are backspace/delete key inconsistencies with VMS. :fixdel doesn't do the trick, but the solution is: > @@ -663,12 +665,130 @@ start it with: > (Thomas.R.Wyant III, Vim 6.1) +8.14 Slow start in console mode issue + +As GUI/GTK Vim works equally well in console mode, many administartors +deploy those executables system wide. +Unfortunately, on a remote slow connections GUI/GTK executables behave rather +slow when user wants to run Vim just in the console mode - because of X environment detection timeout. + +Luckily, there is a simple solution for that. Administrators need to deploy +both GUI/GTK build and just console build executables, like below: > + + |- vim72 + |----- doc + |----- syntax + vimrc (system rc files) + gvimrc + gvim.exe (the remaned GUI or GTK built vim.exe) + vim.exe (the console only executable) + +Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: > + + $ define/nolog VIM RF10:[UTIL.VIM72] ! where you VIM directory is + $ vi*m :== mcr VIM:VIM.EXE + $ gvi*m :== mcr VIM:GVIM.EXE + $ ! or you can try to spawn with + $ gv*im :== spawn/nowait/input=NLA0 mcr VIM:GVIM.EXE -g -GEOMETRY 80x40 + + +Like this, users that do not have X environment and want to use Vim just in +console mode can avoid performance problems. + +(Zoltan Arpadffy, Vim 7.2) + +8.15 Common VIM directory - different architectures + +In a cluster that contains nodes with different architectures like below: + +$show cluster +View of Cluster from system ID 11655 node: TOR 18-AUG-2008 11:58:31 ++---------------------------------+ +¦ SYSTEMS ¦ MEMBERS ¦ ++-----------------------+---------¦ +¦ NODE ¦ SOFTWARE ¦ STATUS ¦ ++--------+--------------+---------¦ +¦ TOR ¦ VMS V7.3-2 ¦ MEMBER ¦ +¦ TITAN2 ¦ VMS V8.3 ¦ MEMBER ¦ +¦ ODIN ¦ VMS V7.3-2 ¦ MEMBER ¦ ++---------------------------------+ + +It is convinient to have a common VIM directory but execute different +executables. +There are more solutions for this problem: + +solution 1. all executables in the same directory with different names +This is easily done with the following script that can be added +to the login.com or sylogin.com: > + + $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX" + $ then + $ say "VAX platform" + $ vi*m:== mcr vim:VIM.EXE_VAX + $ endif + $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH" + $ then + $ say "ALPHA platform" + $ vi*m :== mcr vim:VIM.EXE_AXP + $ endif + $ if f$getsyi("ARCH_NAME") .eqs. "IA64" + $ then + $ say "IA64 platform" + $ vi*m :== mcr vim:VIM.EXE_IA64 + $ endif + +solution 2. different directories: > + + $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX" + $ then + $ say "VAX platform" + $ define/nolog VIM RF10:[UTIL.VAX_EXE] ! VAX executables + $ endif + $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH" + $ then + $ say "ALPHA platform" + $ define/nolog VIM RF10:[UTIL.AXP_EXE] ! AXP executables + $ endif + $ if f$getsyi("ARCH_NAME") .eqs. "IA64" + $ then + $ say "IA64 platform" + $ define/nolog VIM RF10:[UTIL.IA64_EXE] ! IA64 executables + $ endif + $! VIMRUNTIME must be defined in order to find runtime files + $ define/nolog VIMRUNTIME RF10:[UTIL.VIM72] + +A good examle for this approach is the [GNU]gnu_tools.com script from GNU_TOOLS.ZIP +package downloadable from http://www.polarhome.com/vim/ + +(Zoltan Arpadffy, Vim 7.2) + ============================================================================== 9. VMS related changes *vms-changes* -Version 7 +Recent changes +- The following plugins are included into VMS runtime: + genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3, + bufexplorer 7.1.7, taglist 4.5 +- minor changes in vimrc (just in VMS runtime) +- make_vms.mms - HUGE model is the default +- [TESTDIR]make_vms.mms include as many tests possible +- modify test30 and test54 for VMS +- enable FLOAT feature in VMS port +- os_vms.txt updated + +Version 7.2 (2008 Aug 9) +- VCF files write corrected +- CTAGS 5.7 included +- corrected make_vms.mms (on VAX gave syntax error) + +Version 7.1 (2007 Jun 15) +- create TAGS file from menu + +Version 7 (2006 May 8) - Improved low level char input (affects just console mode) +- Fixed plugin bug +- CTAGS 5.6 included Version 6.4 (2005 Oct 15) - GTKLIB and Vim build on IA64 @@ -806,6 +926,7 @@ Version 4.5 (1996 Dec 16) OpenVMS documentation and executables are maintained by: Zoltan Arpadffy +OpenVMS Vim page: http://www.polarhome.com/vim/ This document uses parts and remarks from earlier authors and contributors of OS_VMS.TXT: diff --git a/src/Make_vms.mms b/src/Make_vms.mms index 8c5f74edd0..0519d7b6f9 100644 --- a/src/Make_vms.mms +++ b/src/Make_vms.mms @@ -2,7 +2,7 @@ # Makefile for Vim on OpenVMS # # Maintainer: Zoltan Arpadffy -# Last change: 2007 Oct 22 +# Last change: 2008 Aug 16 # # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64 # with MMS and MMK @@ -36,7 +36,7 @@ DECC = YES # BIG - Many features enabled, as rich as possible. (default) # HUGE - All possible featues enabled. # Please select one of these alternatives above. -MODEL = BIG +MODEL = HUGE # GUI or terminal mode executable. # Comment out if you want just the character terminal mode only. diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h index 71f1df2fd8..d70ab6137c 100644 --- a/src/os_vms_conf.h +++ b/src/os_vms_conf.h @@ -114,6 +114,8 @@ #define HAVE_PUTENV #define HAVE_SETENV #define HAVE_SETJMP_H +#define HAVE_MATH_H +#define HAVE_FLOAT_FUNCS #undef HAVE_DIRENT_H #undef HAVE_SYS_NDIR_H diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms index b9871d601a..dc6ff96a1b 100644 --- a/src/testdir/Make_vms.mms +++ b/src/testdir/Make_vms.mms @@ -4,9 +4,9 @@ # Authors: Zoltan Arpadffy, # Sandor Kopanyi, # -# Last change: 2008 Jun 19 +# Last change: 2008 Aug 19 # -# This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX. +# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. # Edit the lines in the Configuration section below to select. # # Execute with: @@ -32,6 +32,15 @@ # and directory handling. # WANT_UNIX = YES +# Comment out if you want to run Win32 specific tests as well, but please +# be aware, that on OpenVMS will fail, because of cat, rm, etc commands +# and directory handling. +# WANT_WIN = YES + +# Comment out if you want to run spell checker tests. +# They fail because VMS does not support file names. +# WANT_SPELL = YES + # Comment out if you have gzip on your system # HAVE_GZIP = YES @@ -53,12 +62,12 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \ test13.out test14.out test15.out test17.out \ test18.out test19.out test20.out test21.out test22.out \ test23.out test24.out test26.out \ - test28.out test29.out test31.out test32.out \ + test28.out test29.out test30.out test31.out test32.out \ test33.out test34.out test35.out test36.out test37.out \ test38.out test39.out test40.out test41.out test42.out \ test43.out test44.out test45.out test46.out \ test48.out test51.out test53.out test54.out test55.out \ - test56.out test57.out test58.out test59.out test60.out \ + test56.out test57.out test60.out \ test61.out test62.out test63.out test64.out test65.out .IFDEF WANT_GUI @@ -67,7 +76,15 @@ GUI_OPTION = -g .ENDIF .IFDEF WANT_UNIX -SCRIPT_UNIX = test10.out test12.out test25.out test27.out test30.out test49.out +SCRIPT_UNIX = test10.out test12.out test25.out test27.out test49.out +.ENDIF + +.IFDEF WANT_WIN +SCRIPT_WIN = test50.out test52.out +.ENDIF + +.IFDEF WANT_SPELL +SCRIPT_SPELL = test58.out test59.out .ENDIF .IFDEF HAVE_GZIP @@ -84,11 +101,11 @@ SCRIPT_GDIFF = test47.out -@ write sys$output " "$*" " -@ write sys$output "-----------------------------------------------" -@ create/term/wait mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in - -@ if "''F$SEARCH("test.out.*")'" .NES. "" then differences test.out $*.ok; + -@ if "''F$SEARCH("test.out.*")'" .NES. "" then differences /par test.out $*.ok; -@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename test.out $*.out -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* -all : clean nolog $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_GZIP) $(SCRIPT_GDIFF) +all : clean nolog $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_GZIP) $(SCRIPT_GDIFF) -@ write sys$output " " -@ write sys$output "-----------------------------------------------" -@ write sys$output " All done" @@ -113,6 +130,8 @@ nolog : -@ write sys$output "MAKE_VMS.MMS options:" -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" " -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" " + -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" " + -@ write sys$output " WANT_SPELL= ""$(WANT_SPELL)"" " -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" " -@ write sys$output " HAVE_GDIFF= ""$(HAVE_GDIFF)"" " -@ write sys$output "Default vimrc file is VMS.VIM: @@ -122,5 +141,13 @@ nolog : clean : -@ if "''F$SEARCH("*.out")'" .NES. "" then delete/noconfirm/nolog *.out.* -@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.* + -@ if "''F$SEARCH("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.* -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* -@ if "''F$SEARCH("*.*_sw*")'" .NES. "" then delete/noconfirm/nolog *.*_sw*.* + -@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.* + -@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.* + -@ if "''F$SEARCH("tiny.vim")'" .NES. "" then delete/noconfirm/nolog tiny.vim.* + -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.* + -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.* + -@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.* + diff --git a/src/testdir/test30.in b/src/testdir/test30.in index 2815c1a3c7..c2ee2f06df 100644 --- a/src/testdir/test30.in +++ b/src/testdir/test30.in @@ -24,10 +24,17 @@ STARTTEST :set nobin eol :bwipe XXUnix XXDos XXMac :" create mixed format files -:!cat XXUnix XXDos >XXUxDs -:!cat XXUnix XXMac >XXUxMac -:!cat XXDos XXMac >XXDosMac -:!cat XXUnix XXDos XXMac >XXUxDsMc +:if has("vms") +: !copy XXUnix,XXDos XXUxDs. +: !copy XXUnix,XXMac XXUxMac. +: !copy XXDos,XXMac XXDosMac. +: !copy XXUnix,XXDos,XXMac XXUxDsMc. +:else +: !cat XXUnix XXDos >XXUxDs +: !cat XXUnix XXMac >XXUxMac +: !cat XXDos XXMac >XXDosMac +: !cat XXUnix XXDos XXMac >XXUxDsMc +:endif :" :" try reading and writing with 'fileformats' empty :set fileformat=unix diff --git a/src/testdir/test54.in b/src/testdir/test54.in index 82a8bdd36d..9fc6537e08 100644 --- a/src/testdir/test54.in +++ b/src/testdir/test54.in @@ -3,8 +3,13 @@ Some tests for buffer-local autocommands STARTTEST :so small.vim :e xx -:!rm -f test.out -:au BufLeave :!echo buffer-local autommand in %>> test.out +:if has("vms") +: !del test.out.* +: au BufLeave :!write sys$output "buffer-local autommand in %" > test.out +:else +: !rm -f test.out +: au BufLeave :!echo buffer-local autommand in %>> test.out +:endif :e somefile " here, autocommand for xx shall write test.out : " but autocommand shall not apply to buffer named :bwipe xx " here, autocommand shall be auto-deleted diff --git a/src/version.c b/src/version.c index dc8fab6ec6..64370d0fa9 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 */ +/**/ + 7, /**/ 6, /**/ From 3e5bc79f11fc197f9fe96d4e5bb5e66cc82561db Mon Sep 17 00:00:00 2001 From: vimboss Date: Mon, 1 Sep 2008 15:33:17 +0000 Subject: [PATCH 08/22] updated for version 7.2-008 --- src/buffer.c | 7 ++++--- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index f1b4fd6916..173a0f80c1 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1351,11 +1351,12 @@ set_curbuf(buf, action) } } #ifdef FEAT_AUTOCMD + /* An autocommand may have deleted "buf", already entered it (e.g., when + * it did ":bunload") or aborted the script processing! */ # ifdef FEAT_EVAL - /* An autocommand may have deleted buf or aborted the script processing! */ - if (buf_valid(buf) && !aborting()) + if (buf_valid(buf) && buf != curbuf && !aborting()) # else - if (buf_valid(buf)) /* an autocommand may have deleted buf! */ + if (buf_valid(buf) && buf != curbuf) # endif #endif enter_buffer(buf); diff --git a/src/version.c b/src/version.c index 64370d0fa9..16a0cee28b 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 */ +/**/ + 8, /**/ 7, /**/ From b39b209d028848d6ab1146c83cdc1c1fd0c8abf7 Mon Sep 17 00:00:00 2001 From: vimboss Date: Mon, 1 Sep 2008 15:56:45 +0000 Subject: [PATCH 09/22] updated for version 7.2-009 --- src/if_perl.xs | 5 +++++ src/version.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/if_perl.xs b/src/if_perl.xs index 5b0449a112..78a91aafd5 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -136,6 +136,9 @@ EXTERN_C void boot_DynaLoader __ARGS((pTHX_ CV*)); # define Perl_newXS_flags dll_Perl_newXS_flags #endif # define Perl_sv_free dll_Perl_sv_free +# if (PERL_REVISION == 5) && (PERL_VERSION >= 10) +# define Perl_sv_free2 dll_Perl_sv_free2 +# endif # define Perl_sv_isa dll_Perl_sv_isa # define Perl_sv_magic dll_Perl_sv_magic # define Perl_sv_setiv dll_Perl_sv_setiv @@ -268,6 +271,7 @@ static SV* (*Perl_Isv_yes_ptr)(register PerlInterpreter*); static void (*boot_DynaLoader)_((pTHX_ CV*)); #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) +static void (*Perl_sv_free2)(pTHX_ SV*); static void (*Perl_sys_init3)(int* argc, char*** argv, char*** env); static void (*Perl_sys_term)(void); static SV** (*Perl_ISv_ptr)(register PerlInterpreter*); @@ -367,6 +371,7 @@ static struct { {"Perl_TXpv_ptr", (PERL_PROC*)&Perl_TXpv_ptr}, {"Perl_Tna_ptr", (PERL_PROC*)&Perl_Tna_ptr}, #else + {"Perl_sv_free2", (PERL_PROC*)&Perl_sv_free2}, {"Perl_sys_init3", (PERL_PROC*)&Perl_sys_init3}, {"Perl_sys_term", (PERL_PROC*)&Perl_sys_term}, {"Perl_ISv_ptr", (PERL_PROC*)&Perl_ISv_ptr}, diff --git a/src/version.c b/src/version.c index 16a0cee28b..cece550ecf 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 */ +/**/ + 9, /**/ 8, /**/ From 06c64fe88ce6b1d2b91761cb374a4cad1bd6037c Mon Sep 17 00:00:00 2001 From: vimboss Date: Sat, 6 Sep 2008 14:44:59 +0000 Subject: [PATCH 10/22] updated for version 7.2-010 --- src/mbyte.c | 2 -- src/misc2.c | 4 --- src/normal.c | 79 +++++++++++++++++++++++++++++++++------------------ src/version.c | 2 ++ 4 files changed, 54 insertions(+), 33 deletions(-) diff --git a/src/mbyte.c b/src/mbyte.c index bd4f090962..923571406a 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -2540,7 +2540,6 @@ utf_head_off(base, p) return (int)(p - q); } -#if defined(FEAT_EVAL) || defined(PROTO) /* * Copy a character from "*fp" to "*tp" and advance the pointers. */ @@ -2555,7 +2554,6 @@ mb_copy_char(fp, tp) *tp += l; *fp += l; } -#endif /* * Return the offset from "p" to the first byte of a character. When "p" is diff --git a/src/misc2.c b/src/misc2.c index bc9091f089..10c77a7529 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1257,7 +1257,6 @@ vim_strsave_escaped_ext(string, esc_chars, cc, bsl) return escaped_string; } -#if !defined(BACKSLASH_IN_FILENAME) || defined(FEAT_EVAL) || defined(PROTO) /* * Return TRUE when 'shell' has "csh" in the tail. */ @@ -1266,9 +1265,7 @@ csh_like_shell() { return (strstr((char *)gettail(p_sh), "csh") != NULL); } -#endif -#if defined(FEAT_EVAL) || defined(PROTO) /* * Escape "string" for use as a shell argument with system(). * This uses single quotes, except when we know we need to use double qoutes @@ -1391,7 +1388,6 @@ vim_strsave_shellescape(string, do_special) return escaped_string; } -#endif /* * Like vim_strsave(), but make all characters uppercase. diff --git a/src/normal.c b/src/normal.c index eb03a6a6de..462bd35f5c 100644 --- a/src/normal.c +++ b/src/normal.c @@ -5469,6 +5469,11 @@ nv_ident(cap) STRCPY(buf, "he! "); else { + /* An external command will probably use an argument starting + * with "-" as an option. To avoid trouble we skip the "-". */ + while (*ptr == '-') + ++ptr; + /* When a count is given, turn it into a range. Is this * really what we want? */ isman = (STRCMP(kp, "man") == 0); @@ -5511,37 +5516,57 @@ nv_ident(cap) /* * Now grab the chars in the identifier */ - if (cmdchar == '*') - aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\"); - else if (cmdchar == '#') - aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); - else if (cmdchar == 'K' && !kp_help) - aux_ptr = (char_u *)" \t\\\"|!"; - else - /* Don't escape spaces and Tabs in a tag with a backslash */ - aux_ptr = (char_u *)"\\|\""; - - p = buf + STRLEN(buf); - while (n-- > 0) + if (cmdchar == 'K' && !kp_help) { - /* put a backslash before \ and some others */ - if (vim_strchr(aux_ptr, *ptr) != NULL) - *p++ = '\\'; -#ifdef FEAT_MBYTE - /* When current byte is a part of multibyte character, copy all bytes - * of that character. */ - if (has_mbyte) + /* Escape the argument properly for a shell command */ + p = vim_strsave_shellescape(ptr, TRUE); + if (p == NULL) { - int i; - int len = (*mb_ptr2len)(ptr) - 1; - - for (i = 0; i < len && n >= 1; ++i, --n) - *p++ = *ptr++; + vim_free(buf); + return; } -#endif - *p++ = *ptr++; + buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1); + if (buf == NULL) + { + vim_free(buf); + vim_free(p); + return; + } + STRCAT(buf, p); + vim_free(p); + } + else + { + if (cmdchar == '*') + aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\"); + else if (cmdchar == '#') + aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); + else + /* Don't escape spaces and Tabs in a tag with a backslash */ + aux_ptr = (char_u *)"\\|\"\n*?["; + + p = buf + STRLEN(buf); + while (n-- > 0) + { + /* put a backslash before \ and some others */ + if (vim_strchr(aux_ptr, *ptr) != NULL) + *p++ = '\\'; +#ifdef FEAT_MBYTE + /* When current byte is a part of multibyte character, copy all + * bytes of that character. */ + if (has_mbyte) + { + int i; + int len = (*mb_ptr2len)(ptr) - 1; + + for (i = 0; i < len && n >= 1; ++i, --n) + *p++ = *ptr++; + } +#endif + *p++ = *ptr++; + } + *p = NUL; } - *p = NUL; /* * Execute the command. diff --git a/src/version.c b/src/version.c index cece550ecf..2ed3271920 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 */ +/**/ + 10, /**/ 9, /**/ From c53513d4ac72c6d506c107c06d742dd576847173 Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 7 Sep 2008 11:55:43 +0000 Subject: [PATCH 11/22] updated for version 7.2-011 --- src/eval.c | 16 +++++++++++++--- src/version.c | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/eval.c b/src/eval.c index 351f24c37d..9c8515e039 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1256,23 +1256,26 @@ skip_expr(pp) /* * Top level evaluation function, returning a string. + * When "convert" is TRUE convert a List into a sequence of lines and convert + * a Float to a String. * Return pointer to allocated memory, or NULL for failure. */ char_u * -eval_to_string(arg, nextcmd, dolist) +eval_to_string(arg, nextcmd, convert) char_u *arg; char_u **nextcmd; - int dolist; /* turn List into sequence of lines */ + int convert; { typval_T tv; char_u *retval; garray_T ga; + char_u numbuf[NUMBUFLEN]; if (eval0(arg, &tv, nextcmd, TRUE) == FAIL) retval = NULL; else { - if (dolist && tv.v_type == VAR_LIST) + if (convert && tv.v_type == VAR_LIST) { ga_init2(&ga, (int)sizeof(char), 80); if (tv.vval.v_list != NULL) @@ -1280,6 +1283,13 @@ eval_to_string(arg, nextcmd, dolist) ga_append(&ga, NUL); retval = (char_u *)ga.ga_data; } +#ifdef FEAT_FLOAT + else if (convert && tv.v_type == VAR_FLOAT) + { + vim_snprintf((char *)numbuf, NUMBUFLEN, "%g", tv.vval.v_float); + retval = vim_strsave(numbuf); + } +#endif else retval = vim_strsave(get_tv_string(&tv)); clear_tv(&tv); diff --git a/src/version.c b/src/version.c index 2ed3271920..cd13eb2c0d 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 */ +/**/ + 11, /**/ 10, /**/ From ea83ab3650c3e21f3d54cef53787890275863370 Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 7 Sep 2008 13:50:37 +0000 Subject: [PATCH 12/22] updated for version 7.2-012 --- src/ex_cmds2.c | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index f86e6ee6ab..ed3c45f6c7 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3145,8 +3145,8 @@ do_source(fname, check_other, is_vimrc) verbose_leave(); } #ifdef STARTUPTIME - vim_snprintf(IObuff, IOSIZE, "sourcing %s", fname); - time_msg(IObuff, &tv_start); + vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname); + time_msg((char *)IObuff, &tv_start); time_pop(&tv_rel); #endif diff --git a/src/version.c b/src/version.c index cd13eb2c0d..2b924604bf 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 */ +/**/ + 12, /**/ 11, /**/ From e76375a3e9785a1f2c51874eb73d4a2172eea04f Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 7 Sep 2008 19:48:53 +0000 Subject: [PATCH 13/22] updated for version 7.2-013 --- src/ui.c | 32 +++++++++++++++++++++++++++----- src/version.c | 2 ++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/ui.c b/src/ui.c index fc58920928..db8f04c140 100644 --- a/src/ui.c +++ b/src/ui.c @@ -2110,6 +2110,8 @@ clip_x11_request_selection(myShell, dpy, cbd) int i; int nbytes = 0; char_u *buffer; + time_t start_time; + int timed_out = FALSE; for (i = #ifdef FEAT_MBYTE @@ -2129,6 +2131,7 @@ clip_x11_request_selection(myShell, dpy, cbd) case 3: type = text_atom; break; default: type = XA_STRING; } + success = FALSE; XtGetSelectionValue(myShell, cbd->sel_atom, type, clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime); @@ -2141,27 +2144,46 @@ clip_x11_request_selection(myShell, dpy, cbd) * characters, then they will appear before the one that requested the * paste! Don't worry, we will catch up with any other events later. */ + start_time = time(NULL); for (;;) { if (XCheckTypedEvent(dpy, SelectionNotify, &event)) + { + /* this is where clip_x11_request_selection_cb() is actually + * called */ + XtDispatchEvent(&event); break; + } if (XCheckTypedEvent(dpy, SelectionRequest, &event)) /* We may get a SelectionRequest here and if we don't handle * it we hang. KDE klipper does this, for example. */ XtDispatchEvent(&event); + /* Time out after 2 to 3 seconds to avoid that we hang when the + * other process doesn't respond. Note that the SelectionNotify + * event may still come later when the selection owner comes back + * to life and the text gets inserted unexpectedly (by xterm). + * Don't know how to avoid that :-(. */ + if (time(NULL) > start_time + 2) + { + timed_out = TRUE; + break; + } + /* Do we need this? Probably not. */ XSync(dpy, False); - /* Bernhard Walle solved a slow paste response in an X terminal by - * adding: usleep(10000); here. */ + /* Wait for 1 msec to avoid that we eat up all CPU time. */ + ui_delay(1L, TRUE); } - /* this is where clip_x11_request_selection_cb() is actually called */ - XtDispatchEvent(&event); - if (success) return; + + /* don't do a retry with another type after timing out, otherwise we + * hang for 15 seconds. */ + if (timed_out) + break; } /* Final fallback position - use the X CUT_BUFFER0 store */ diff --git a/src/version.c b/src/version.c index 2b924604bf..d7b670124b 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 */ +/**/ + 13, /**/ 12, /**/ From e25a17541d262483254ec49a370359f1d93c1bd5 Mon Sep 17 00:00:00 2001 From: vimboss Date: Wed, 10 Sep 2008 13:39:10 +0000 Subject: [PATCH 14/22] updated for version 7.2-014 --- src/eval.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index 9c8515e039..447d3d7815 100644 --- a/src/eval.c +++ b/src/eval.c @@ -16667,7 +16667,7 @@ f_synstack(argvars, rettv) col = get_tv_number(&argvars[1]) - 1; /* -1 on type error */ if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count - && col >= 0 && col < (long)STRLEN(ml_get(lnum)) + && col >= 0 && (col == 0 || col < (long)STRLEN(ml_get(lnum))) && rettv_list_alloc(rettv) != FAIL) { (void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE); diff --git a/src/version.c b/src/version.c index d7b670124b..099f918f8a 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 */ +/**/ + 14, /**/ 13, /**/ From b2e17cca75a16e89b1ab44d593526bf13edd6cef Mon Sep 17 00:00:00 2001 From: vimboss Date: Wed, 10 Sep 2008 16:26:04 +0000 Subject: [PATCH 15/22] updated for version 7.2-015 --- src/testdir/Makefile | 18 ++++++++++-------- src/version.c | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/testdir/Makefile b/src/testdir/Makefile index c7d1b39fb7..3528bf6f3f 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -26,15 +26,17 @@ SCRIPTS_GUI = test16.out .SUFFIXES: .in .out -nongui: nolog $(SCRIPTS) - @echo - @cat test.log - @echo ALL DONE +nongui: nolog $(SCRIPTS) report -gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) +gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) report + +report: @echo - @cat test.log - @echo ALL DONE + @echo 'Test results:' + @/bin/sh -c "if test -f test.log; \ + then cat test.log; echo TEST FAILURE; exit 1; \ + else echo ALL DONE; \ + fi" $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) @@ -71,4 +73,4 @@ test49.out: test49.vim test60.out: test60.vim nolog: - -echo Test results: >test.log + -rm -f test.log diff --git a/src/version.c b/src/version.c index 099f918f8a..ac8ada8040 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 */ +/**/ + 15, /**/ 14, /**/ From bb36e94f24425c9a11b263a9c0bbe03332fb4932 Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 14 Sep 2008 12:42:29 +0000 Subject: [PATCH 16/22] updated for version 7.2-016 --- src/ex_getln.c | 32 +++++++++++++++++++++++++++++--- src/version.c | 2 ++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 994fe2aa34..8855f868ec 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -31,6 +31,8 @@ struct cmdline_info int cmdattr; /* attributes for prompt */ int overstrike; /* Typing mode on the command line. Shared by getcmdline() and put_on_cmdline(). */ + expand_T *xpc; /* struct being used for expansion, xp_pattern + may point into cmdbuff */ int xp_context; /* type of expansion */ # ifdef FEAT_EVAL char_u *xp_arg; /* user-defined expansion arg */ @@ -38,7 +40,11 @@ struct cmdline_info # endif }; -static struct cmdline_info ccline; /* current cmdline_info */ +/* The current cmdline_info. It is initialized in getcmdline() and after that + * used by other functions. When invoking getcmdline() recursively it needs + * to be saved with save_cmdline() and restored with restore_cmdline(). + * TODO: make it local to getcmdline() and pass it around. */ +static struct cmdline_info ccline; static int cmd_showtail; /* Only show path tail in lists ? */ @@ -238,6 +244,7 @@ getcmdline(firstc, count, indent) } ExpandInit(&xpc); + ccline.xpc = &xpc; #ifdef FEAT_RIGHTLEFT if (curwin->w_p_rl && *curwin->w_p_rlc == 's' @@ -408,9 +415,10 @@ getcmdline(firstc, count, indent) #endif /* - * works like CTRL-P (unless 'wc' is ). + * When there are matching completions to select works like + * CTRL-P (unless 'wc' is ). */ - if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles != -1) + if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles > 0) c = Ctrl_P; #ifdef FEAT_WILDMENU @@ -1513,6 +1521,7 @@ getcmdline(firstc, count, indent) int old_firstc; vim_free(ccline.cmdbuff); + xpc.xp_context = EXPAND_NOTHING; if (hiscnt == hislen) p = lookfor; /* back to the old one */ else @@ -1839,6 +1848,7 @@ returncmd: #endif ExpandCleanup(&xpc); + ccline.xpc = NULL; #ifdef FEAT_SEARCH_EXTRA if (did_incsearch) @@ -2508,6 +2518,20 @@ realloc_cmdbuff(len) } mch_memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen + 1); vim_free(p); + + if (ccline.xpc != NULL + && ccline.xpc->xp_pattern != NULL + && ccline.xpc->xp_context != EXPAND_NOTHING + && ccline.xpc->xp_context != EXPAND_UNSUCCESSFUL) + { + int i = ccline.xpc->xp_pattern - p; + + /* If xp_pattern points inside the old cmdbuff it needs to be adjusted + * to point into the newly allocated memory. */ + if (i >= 0 && i <= ccline.cmdlen) + ccline.xpc->xp_pattern = ccline.cmdbuff + i; + } + return OK; } @@ -2875,6 +2899,7 @@ save_cmdline(ccp) prev_ccline = ccline; ccline.cmdbuff = NULL; ccline.cmdprompt = NULL; + ccline.xpc = NULL; } /* @@ -3582,6 +3607,7 @@ ExpandOne(xp, str, orig, options, mode) ExpandInit(xp) expand_T *xp; { + xp->xp_pattern = NULL; xp->xp_backslash = XP_BS_NONE; #ifndef BACKSLASH_IN_FILENAME xp->xp_shell = FALSE; diff --git a/src/version.c b/src/version.c index ac8ada8040..d4f67c9351 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 */ +/**/ + 16, /**/ 15, /**/ From e5bae4cb22e9dab12c455c54e276b0743235ba9e Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 14 Sep 2008 13:58:34 +0000 Subject: [PATCH 17/22] updated for version 7.2-017 --- src/ui.c | 32 +++++++++++++++++--------------- src/version.c | 2 ++ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/ui.c b/src/ui.c index db8f04c140..6d408b0c19 100644 --- a/src/ui.c +++ b/src/ui.c @@ -2020,7 +2020,7 @@ clip_x11_request_selection_cb(w, success, sel_atom, type, value, length, if (value == NULL || *length == 0) { - clip_free_selection(cbd); /* ??? [what's the query?] */ + clip_free_selection(cbd); /* nothing received, clear register */ *(int *)success = FALSE; return; } @@ -2076,7 +2076,7 @@ clip_x11_request_selection_cb(w, success, sel_atom, type, value, length, text_prop.value = (unsigned char *)value; text_prop.encoding = *type; text_prop.format = *format; - text_prop.nitems = STRLEN(value); + text_prop.nitems = len; status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop, &text_list, &n_text); if (status != Success || n_text < 1) @@ -2131,7 +2131,7 @@ clip_x11_request_selection(myShell, dpy, cbd) case 3: type = text_atom; break; default: type = XA_STRING; } - success = FALSE; + success = MAYBE; XtGetSelectionValue(myShell, cbd->sel_atom, type, clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime); @@ -2145,25 +2145,27 @@ clip_x11_request_selection(myShell, dpy, cbd) * paste! Don't worry, we will catch up with any other events later. */ start_time = time(NULL); - for (;;) + while (success == MAYBE) { - if (XCheckTypedEvent(dpy, SelectionNotify, &event)) + if (XCheckTypedEvent(dpy, SelectionNotify, &event) + || XCheckTypedEvent(dpy, SelectionRequest, &event) + || XCheckTypedEvent(dpy, PropertyNotify, &event)) { - /* this is where clip_x11_request_selection_cb() is actually - * called */ + /* This is where clip_x11_request_selection_cb() should be + * called. It may actually happen a bit later, so we loop + * until "success" changes. + * We may get a SelectionRequest here and if we don't handle + * it we hang. KDE klipper does this, for example. + * We need to handle a PropertyNotify for large selections. */ XtDispatchEvent(&event); - break; + continue; } - if (XCheckTypedEvent(dpy, SelectionRequest, &event)) - /* We may get a SelectionRequest here and if we don't handle - * it we hang. KDE klipper does this, for example. */ - XtDispatchEvent(&event); /* Time out after 2 to 3 seconds to avoid that we hang when the * other process doesn't respond. Note that the SelectionNotify * event may still come later when the selection owner comes back - * to life and the text gets inserted unexpectedly (by xterm). - * Don't know how to avoid that :-(. */ + * to life and the text gets inserted unexpectedly. Don't know + * why that happens or how to avoid that :-(. */ if (time(NULL) > start_time + 2) { timed_out = TRUE; @@ -2177,7 +2179,7 @@ clip_x11_request_selection(myShell, dpy, cbd) ui_delay(1L, TRUE); } - if (success) + if (success == TRUE) return; /* don't do a retry with another type after timing out, otherwise we diff --git a/src/version.c b/src/version.c index d4f67c9351..c3803a1038 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 */ +/**/ + 17, /**/ 16, /**/ From d732c28bfc90bd77fb1be56f46d1c0acd564fb57 Mon Sep 17 00:00:00 2001 From: vimboss Date: Sun, 14 Sep 2008 19:41:30 +0000 Subject: [PATCH 18/22] updated for version 7.2-018 --- src/ex_cmds.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index c2dc267646..02d5b3ebe8 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5059,6 +5059,7 @@ skip: if (did_sub) ++sub_nlines; + vim_free(new_start); /* for when substitute was cancelled */ vim_free(sub_firstline); /* free the copy of the original line */ sub_firstline = NULL; } diff --git a/src/version.c b/src/version.c index c3803a1038..ccc1c0edb4 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 */ +/**/ + 18, /**/ 17, /**/ From 7d9d31e97d5c95a8add9796a7456e2e7a150e107 Mon Sep 17 00:00:00 2001 From: vimboss Date: Thu, 18 Sep 2008 10:44:28 +0000 Subject: [PATCH 19/22] updated for version 7.2-019 --- src/ex_cmds.h | 2 ++ src/ex_docmd.c | 1 + src/version.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 2e8374a004..e8fef0a0b0 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -635,6 +635,8 @@ EX(CMD_nnoremenu, "nnoremenu", ex_menu, RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), EX(CMD_noremap, "noremap", ex_map, BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), +EX(CMD_noautocmd, "noautocmd", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), EX(CMD_nohlsearch, "nohlsearch", ex_nohlsearch, TRLBAR|SBOXOK|CMDWIN), EX(CMD_noreabbrev, "noreabbrev", ex_abbreviate, diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 07dcb774ac..509805f86c 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2978,6 +2978,7 @@ static struct cmdmod {"keepmarks", 3, FALSE}, {"leftabove", 5, FALSE}, {"lockmarks", 3, FALSE}, + {"noautocmd", 3, FALSE}, {"rightbelow", 6, FALSE}, {"sandbox", 3, FALSE}, {"silent", 3, FALSE}, diff --git a/src/version.c b/src/version.c index ccc1c0edb4..6b8444ce70 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 */ +/**/ + 19, /**/ 18, /**/ From 1d73dbfbe53af8cec7575ce83224f10aee224b76 Mon Sep 17 00:00:00 2001 From: vimboss Date: Thu, 18 Sep 2008 18:57:10 +0000 Subject: [PATCH 20/22] updated for version 7.2-020 --- src/main.c | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index a9eb4609ca..0fc59412cd 100644 --- a/src/main.c +++ b/src/main.c @@ -1457,7 +1457,8 @@ parse_command_name(parmp) ++initstr; } - if (TOLOWER_ASC(initstr[0]) == 'g' || initstr[0] == 'k') + /* "gvim" starts the GUI. Also accept "Gvim" for MS-Windows. */ + if (TOLOWER_ASC(initstr[0]) == 'g') { main_start_gui(); #ifdef FEAT_GUI diff --git a/src/version.c b/src/version.c index 6b8444ce70..e842d4e8ca 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 */ +/**/ + 20, /**/ 19, /**/ From 99b9fe4a6de347dc6a12e819852f4cdddbf3dc59 Mon Sep 17 00:00:00 2001 From: vimboss Date: Thu, 18 Sep 2008 19:29:58 +0000 Subject: [PATCH 21/22] updated for version 7.2-021 --- src/ex_docmd.c | 9 +++++++++ src/fileio.c | 10 +++++++--- src/globals.h | 1 + src/version.c | 2 ++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 509805f86c..84099a7cf1 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -9542,6 +9542,15 @@ eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped) #ifdef FEAT_AUTOCMD case SPEC_AFILE: /* file name for autocommand */ result = autocmd_fname; + if (result != NULL && !autocmd_fname_full) + { + /* Still need to turn the fname into a full path. It is + * postponed to avoid a delay when is not used. */ + autocmd_fname_full = TRUE; + result = FullName_save(autocmd_fname, FALSE); + vim_free(autocmd_fname); + autocmd_fname = result; + } if (result == NULL) { *errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"\""); diff --git a/src/fileio.c b/src/fileio.c index ef39a2982e..c86f55dbbc 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -8523,6 +8523,7 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap) char_u *save_sourcing_name; linenr_T save_sourcing_lnum; char_u *save_autocmd_fname; + int save_autocmd_fname_full; int save_autocmd_bufnr; char_u *save_autocmd_match; int save_autocmd_busy; @@ -8601,6 +8602,7 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap) * Save the autocmd_* variables and info about the current buffer. */ save_autocmd_fname = autocmd_fname; + save_autocmd_fname_full = autocmd_fname_full; save_autocmd_bufnr = autocmd_bufnr; save_autocmd_match = autocmd_match; save_autocmd_busy = autocmd_busy; @@ -8618,14 +8620,15 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap) if (fname != NULL && *fname != NUL) autocmd_fname = fname; else if (buf != NULL) - autocmd_fname = buf->b_fname; + autocmd_fname = buf->b_ffname; else autocmd_fname = NULL; } else autocmd_fname = fname_io; if (autocmd_fname != NULL) - autocmd_fname = FullName_save(autocmd_fname, FALSE); + autocmd_fname = vim_strsave(autocmd_fname); + autocmd_fname_full = FALSE; /* call FullName_save() later */ /* * Set the buffer number to be used for . @@ -8810,6 +8813,7 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap) sourcing_lnum = save_sourcing_lnum; vim_free(autocmd_fname); autocmd_fname = save_autocmd_fname; + autocmd_fname_full = save_autocmd_fname_full; autocmd_bufnr = save_autocmd_bufnr; autocmd_match = save_autocmd_match; #ifdef FEAT_EVAL @@ -8918,7 +8922,7 @@ auto_next_pat(apc, stop_at_last) { apc->curpat = NULL; - /* only use a pattern when it has not been removed, has commands and + /* Only use a pattern when it has not been removed, has commands and * the group matches. For buffer-local autocommands only check the * buffer number. */ if (ap->pat != NULL && ap->cmds != NULL diff --git a/src/globals.h b/src/globals.h index dc3038d827..c03c693223 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1022,6 +1022,7 @@ EXTERN char_u *new_last_cmdline INIT(= NULL); /* new value for last_cmdline */ #endif #ifdef FEAT_AUTOCMD EXTERN char_u *autocmd_fname INIT(= NULL); /* fname for on cmdline */ +EXTERN int autocmd_fname_full; /* autocmd_fname is full path */ EXTERN int autocmd_bufnr INIT(= 0); /* fnum for on cmdline */ EXTERN char_u *autocmd_match INIT(= NULL); /* name for on cmdline */ EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */ diff --git a/src/version.c b/src/version.c index e842d4e8ca..7daa1d0d06 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 */ +/**/ + 21, /**/ 20, /**/ From 597590c414a9961e845c86c997f367d26aee2b3b Mon Sep 17 00:00:00 2001 From: vimboss Date: Sat, 20 Sep 2008 14:27:03 +0000 Subject: [PATCH 22/22] updated for version 7.2-022 --- Filelist | 1 + src/testdir/Make_ming.mak | 91 +++++++++++++++++++++++++++++++++++++++ src/version.c | 2 + 3 files changed, 94 insertions(+) create mode 100644 src/testdir/Make_ming.mak diff --git a/Filelist b/Filelist index f5bb36b34a..7e9f0bc3af 100644 --- a/Filelist +++ b/Filelist @@ -285,6 +285,7 @@ SRC_DOS = \ src/proto/os_win32.pro \ src/proto/os_mswin.pro \ src/testdir/Make_dos.mak \ + src/testdir/Make_ming.mak \ src/testdir/dos.vim \ src/uninstal.c \ src/vim.def \ diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak new file mode 100644 index 0000000000..e94dcaa6e3 --- /dev/null +++ b/src/testdir/Make_ming.mak @@ -0,0 +1,91 @@ +# Makefile to run tests for Vim, on Dos-like machines +# with sh.exe or zsh.exe in the path or not. +# +# Author: Bill McCarthy +# +# Note that test54 has been removed until it is fixed. +# +# Requires a set of Unix tools: echo, diff, etc. + +ifneq (sh.exe, $(SHELL)) +DEL = rm -f +MV = mv +CP = cp +DIRSLASH = / +else +DEL = del +MV = rename +CP = copy +DIRSLASH = \\ +endif + +VIMPROG = ..$(DIRSLASH)vim + +# Omitted: +# test2 "\\tmp" doesn't work. +# test10 'errorformat' is different +# test12 can't unlink a swap file +# test25 uses symbolic link +# test27 can't edit file with "*" in file name +# test31 16 bit version runs out of memory... + +SCRIPTS16 = test1.out test19.out test20.out test22.out \ + test23.out test24.out test28.out test29.out \ + test35.out test36.out test43.out \ + test44.out test45.out test46.out test47.out \ + test48.out test51.out test53.out \ + test55.out test56.out test57.out test58.out test59.out \ + test60.out test61.out test62.out test63.out test64.out + +# Had to remove test54 which doesn't work yet. +# test54.out + +SCRIPTS = test3.out test4.out test5.out test6.out test7.out \ + test8.out test9.out test11.out test13.out test14.out \ + test15.out test17.out test18.out test21.out test26.out \ + test30.out test31.out test32.out test33.out test34.out \ + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out + +SCRIPTS32 = test50.out + +SCRIPTS_GUI = test16.out + +.SUFFIXES: .in .out + +vimall: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS32) + echo ALL DONE + +nongui: fixff $(SCRIPTS16) $(SCRIPTS) + echo ALL DONE + +small: + echo ALL DONE + +gui: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) + echo ALL DONE + +win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) + echo ALL DONE + +fixff: + -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok + +clean: + -$(DEL) *.out + -$(DEL) test.ok + -$(DEL) small.vim + -$(DEL) tiny.vim + -$(DEL) mbyte.vim + -$(DEL) X* + -$(DEL) viminfo + +.in.out: + $(CP) $*.ok test.ok + $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in + diff test.out $*.ok + -$(DEL) $*.out + $(MV) test.out $*.out + -$(DEL) X* + -$(DEL) test.ok + -$(DEL) viminfo diff --git a/src/version.c b/src/version.c index 7daa1d0d06..c3c93477eb 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 */ +/**/ + 22, /**/ 21, /**/