From f609dcf8c1094f6fc95f4fc36321a1fb08a7110c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 3 Dec 2015 17:43:17 +0100 Subject: [PATCH 1/7] patch 7.4.954 Problem: When using Lua there may be a crash. (issue #468) Solution: Avoid using an unitialized tv. (Yukihiro Nakadaira) --- src/if_lua.c | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/if_lua.c b/src/if_lua.c index bc2d6c3678..e94c96dff1 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -1561,14 +1561,15 @@ luaV_setref (lua_State *L) { tv.v_type = VAR_LIST; tv.vval.v_list = (list_T *) lua_touserdata(L, 4); /* key */ + abort = set_ref_in_item(&tv, copyID, NULL, NULL); } else if (lua_rawequal(L, -1, 3)) /* dict? */ { tv.v_type = VAR_DICT; tv.vval.v_dict = (dict_T *) lua_touserdata(L, 4); /* key */ + abort = set_ref_in_item(&tv, copyID, NULL, NULL); } lua_pop(L, 2); /* metatable and value */ - abort = set_ref_in_item(&tv, copyID, NULL, NULL); } lua_pushinteger(L, abort); return 1; diff --git a/src/version.c b/src/version.c index 3cdc86fa74..b459c87b1e 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 954, /**/ 953, /**/ From 3b8fcd945c5f0ee104eaabcf969fb6f973e79c77 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 3 Dec 2015 20:14:12 +0100 Subject: [PATCH 2/7] patch 7.4.955 Problem: Vim doesn't recognize .pl6 and .pod6 files. Solution: Recognize them as perl6 and pod6. (Mike Eve, closes #511) --- runtime/filetype.vim | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 4d2ffe8769..2efc13f766 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1400,7 +1400,7 @@ else au BufNewFile,BufRead *.pl call s:FTpl() endif au BufNewFile,BufRead *.plx,*.al setf perl -au BufNewFile,BufRead *.p6,*.pm6 setf perl6 +au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6 func! s:FTpl() if exists("g:filetype_pl") @@ -1429,6 +1429,7 @@ au BufNewFile,BufRead *.pm " Perl POD au BufNewFile,BufRead *.pod setf pod +au BufNewFile,BufRead *.pod6 setf pod6 " Php, php3, php4, etc. " Also Phtml (was used for PHP 2 in the past) diff --git a/src/version.c b/src/version.c index b459c87b1e..1e6322284d 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 955, /**/ 954, /**/ From f882d9f89dbe24ab1ba4bc88529bef28242fd2ed Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 3 Dec 2015 20:18:24 +0100 Subject: [PATCH 3/7] patch 7.4.956 Problem: A few more file name extensions not recognized. Solution: Add .asciidoc, .bzl, .gradle, etc. --- runtime/filetype.vim | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 2efc13f766..813db93ca3 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2015 Oct 13 +" Last Change: 2015 Dec 03 " Listen very carefully, I will say this only once if exists("did_load_filetypes") diff --git a/src/version.c b/src/version.c index 1e6322284d..7f99e81de9 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 956, /**/ 955, /**/ From bc96c29ffc753daef302d20322d1e3d560094f44 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 3 Dec 2015 20:46:20 +0100 Subject: [PATCH 4/7] patch 7.4.957 Problem: Test_tagcase fails when using another language than English. Solution: Set the messages language to C. (Kenichi Ito) --- src/testdir/test_tagcase.in | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/testdir/test_tagcase.in b/src/testdir/test_tagcase.in index 6e68111925..d76dbab997 100644 --- a/src/testdir/test_tagcase.in +++ b/src/testdir/test_tagcase.in @@ -2,6 +2,7 @@ Tests for 'tagcase' option STARTTEST :so small.vim +:lang mess C :/^start text$/+1,/^end text$/w! Xtext :/^start tags$/+1,/^end tags$/-1w! Xtags :set tags=Xtags diff --git a/src/version.c b/src/version.c index 7f99e81de9..3a3d34a99f 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 957, /**/ 956, /**/ From e1a61991d9b6fd5f65636d17583f93118268cda5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 3 Dec 2015 21:02:27 +0100 Subject: [PATCH 5/7] patch 7.4.958 Problem: Vim checks if the directory "$TMPDIR" exists. Solution: Do not check if the name starts with "$". --- src/fileio.c | 6 ++++-- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index ded95b728a..b3fc287504 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -7388,10 +7388,12 @@ vim_tempname(extra_char, keep) long off; # endif - /* expand $TMP, leave room for "/v1100000/999999999" */ + /* Expand $TMP, leave room for "/v1100000/999999999". + * Skip the directory check if the expansion fails. */ expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20); - if (mch_isdir(itmp)) /* directory exists */ + if (itmp[0] != '$' && mch_isdir(itmp)) { + /* directory exists */ # ifdef __EMX__ /* If $TMP contains a forward slash (perhaps using bash or * tcsh), don't add a backslash, use a forward slash! diff --git a/src/version.c b/src/version.c index 3a3d34a99f..0de1ef56be 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 958, /**/ 957, /**/ From 0379d01c52e7930ccfc9133f229fba54a2024a42 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 3 Dec 2015 21:17:24 +0100 Subject: [PATCH 6/7] patch 7.4.959 Problem: When setting 'term' the clipboard ownership is lost. Solution: Do not call clip_init(). (James McCoy) --- src/term.c | 8 -------- src/version.c | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/term.c b/src/term.c index 8488126324..b3201feb10 100644 --- a/src/term.c +++ b/src/term.c @@ -1880,14 +1880,6 @@ set_termname(term) p = (char_u *)""; # ifdef FEAT_MOUSE_XTERM -# ifdef FEAT_CLIPBOARD -# ifdef FEAT_GUI - if (!gui.in_use) -# endif -# ifndef FEAT_CYGWIN_WIN32_CLIPBOARD - clip_init(FALSE); -# endif -# endif if (use_xterm_like_mouse(term)) { if (use_xterm_mouse()) diff --git a/src/version.c b/src/version.c index 0de1ef56be..6185923c2f 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 959, /**/ 958, /**/ From 90f5d0a5c3bbfeefcbc4d6eac59cf225ec714b28 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 3 Dec 2015 22:37:21 +0100 Subject: [PATCH 7/7] patch 7.4.960 Problem: Detecting every version of nmake is clumsy. Solution: Use a tiny C program to get the version of _MSC_VER. (Ken Takata) --- src/Make_mvc.mak | 117 +++++++++++------------------------------------ src/version.c | 2 + 2 files changed, 29 insertions(+), 90 deletions(-) diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 7cb7245398..c7b28d59c1 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -117,8 +117,6 @@ # Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes # doesn't work) # -# Visual C Version: MSVCVER=m.n (default derived from nmake if undefined) -# # Static Code Analysis: ANALYZE=yes (works with VS2012 only) # # You can combine any of these interfaces @@ -379,91 +377,29 @@ DEL_TREE = deltree /y INTDIR=$(OBJDIR) OUTDIR=$(OBJDIR) -# Derive version of VC being used from nmake if not specified -!if "$(MSVCVER)" == "" -!if "$(_NMAKE_VER)" == "" -MSVCVER = 4.0 -!endif -!if "$(_NMAKE_VER)" == "162" -MSVCVER = 5.0 -!endif -!if "$(_NMAKE_VER)" == "6.00.8168.0" -MSVCVER = 6.0 -CPU = ix86 -!endif -!if "$(_NMAKE_VER)" == "6.00.9782.0" -MSVCVER = 6.0 -CPU = ix86 -!endif -!if "$(_NMAKE_VER)" == "7.00.9466" -MSVCVER = 7.0 -!endif -!if "$(_NMAKE_VER)" == "7.10.3077" -MSVCVER = 7.1 -!endif -!if "$(_NMAKE_VER)" == "8.00.50727.42" -MSVCVER = 8.0 -!endif -!if "$(_NMAKE_VER)" == "8.00.50727.762" -MSVCVER = 8.0 -!endif -!if "$(_NMAKE_VER)" == "9.00.20706.01" -MSVCVER = 9.0 -!endif -!if "$(_NMAKE_VER)" == "9.00.21022.08" -MSVCVER = 9.0 -!endif -!if "$(_NMAKE_VER)" == "9.00.30729.01" -MSVCVER = 9.0 -!endif -!if "$(_NMAKE_VER)" == "10.00.20506.01" -MSVCVER = 10.0 -!endif -!if "$(_NMAKE_VER)" == "10.00.30128.01" -MSVCVER = 10.0 -!endif -!if "$(_NMAKE_VER)" == "10.00.30319.01" -MSVCVER = 10.0 -!endif -!if "$(_NMAKE_VER)" == "10.00.40219.01" -MSVCVER = 10.0 -!endif -!if "$(_NMAKE_VER)" == "11.00.50727.1" -MSVCVER = 11.0 -!endif -!if "$(_NMAKE_VER)" == "11.00.51106.1" -MSVCVER = 11.0 -!endif -!if "$(_NMAKE_VER)" == "11.00.60315.1" -MSVCVER = 11.0 -!endif -!if "$(_NMAKE_VER)" == "11.00.60610.1" -MSVCVER = 11.0 -!endif -!if "$(_NMAKE_VER)" == "11.00.61030.0" -MSVCVER = 11.0 -!endif -!if "$(_NMAKE_VER)" == "12.00.21005.1" -MSVCVER = 12.0 -!endif -!if ("$(_NMAKE_VER)" == "14.00.22609.0") || ("$(_NMAKE_VER)" == "14.00.22816.0") || ("$(_NMAKE_VER)" == "14.00.23026.0") -MSVCVER = 14.0 +!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul] +!message *** ERROR +!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. +!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. +!error Make aborted. +!else +!include msvcver.~ +!if [del msvcver.c msvcver.~] !endif !endif -# Abort building VIM if version of VC is unrecognised. -!ifndef MSVCVER -!message *** ERROR -!message Cannot determine Visual C version being used. If you are using the -!message Windows SDK then you must have the environment variable MSVCVER set to -!message your version of the VC compiler. If you are not using the Express -!message version of Visual C, you can either set MSVCVER or update this makefile -!message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)". -!error Make aborted. +!if $(MSVCVER) < 1900 +MSVC_MAJOR = ($(MSVCVER) / 100 - 6) +!else +MSVC_MAJOR = ($(MSVCVER) / 100 - 5) +!endif + +!if $(MSVC_MAJOR) == 6 +CPU = ix86 !endif # Convert processor ID to MVC-compatible number -!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0") && ("$(MSVCVER)" != "14.0") +!if $(MSVC_MAJOR) < 8 !if "$(CPUNR)" == "i386" CPUARG = /G3 !elseif "$(CPUNR)" == "i486" @@ -488,7 +424,7 @@ LIBC = DEBUGINFO = /Zi # Don't use /nodefaultlib on MSVC 14 -!if "$(MSVCVER)" == "14.0" +!if $(MSVC_MAJOR) >= 14 NODEFAULTLIB = !else NODEFAULTLIB = /nodefaultlib @@ -504,7 +440,7 @@ OPTFLAG = /O2 OPTFLAG = /Ox !endif -!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0") +!if $(MSVC_MAJOR) >= 8 # Use link time code generation if not worried about size !if "$(OPTIMIZE)" != "SPACE" OPTFLAG = $(OPTFLAG) /GL @@ -512,12 +448,13 @@ OPTFLAG = $(OPTFLAG) /GL !endif # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.) -!if ("$(MSVCVER)" == "7.0") || ("$(MSVCVER)" == "7.1") || ("$(MSVCVER)" == "8.0") +!if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8) CFLAGS=$(CFLAGS) $(WP64CHECK) !endif -# Static code analysis generally available starting with VS2012 -!if ("$(ANALYZE)" == "yes") && (("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")) +# Static code analysis generally available starting with VS2012 (VC11) or +# Windows SDK 7.1 (VC10) +!if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10) CFLAGS=$(CFLAGS) /analyze !endif @@ -538,7 +475,7 @@ DEBUGINFO = /ZI CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG # The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0. -! if "$(MSVCVER)" == "4.0" +! if $(MSVC_MAJOR) == 4 LIBC = ! else LIBC = /fixed:no @@ -993,7 +930,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib # Report link time code generation progress if used. !ifdef NODEBUG -!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0") +!if $(MSVC_MAJOR) >= 8 !if "$(OPTIMIZE)" != "SPACE" LINKARGS1 = $(LINKARGS1) /LTCG:STATUS !endif @@ -1090,7 +1027,7 @@ testclean: # Create a default rule for transforming .c files to .obj files in $(OUTDIR) # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later) -!IF "$(MSVCVER)" == "4.0" +!IF "$(_NMAKE_VER)" == "" .c{$(OUTDIR)/}.obj: !ELSE .c{$(OUTDIR)/}.obj:: @@ -1099,7 +1036,7 @@ testclean: # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR) # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later) -!IF "$(MSVCVER)" == "4.0" +!IF "$(_NMAKE_VER)" == "" .cpp{$(OUTDIR)/}.obj: !ELSE .cpp{$(OUTDIR)/}.obj:: diff --git a/src/version.c b/src/version.c index 6185923c2f..052bbc9fb3 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 960, /**/ 959, /**/