2 Subject: Patch 7.1.282 (extra)
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Win64: Edit with Vim context menu isn't installed correctly.
12 Compiler warnings and a few other things.
13 Solution: Add [ and ] to entry of class name. Use UINT_PTR instead of UINT.
14 And a fixes for the other things. (George V. Reilly)
15 Files: src/GvimExt/Makefile, src/dosinst.c, src/if_ole.cpp, src/if_ole.h,
16 src/if_ole.idl, src/INSTALLpc.txt, src/Make_mvc.mak,
20 *** ../vim-7.1.281/src/GvimExt/Makefile Sat May 5 12:51:46 2007
21 --- src/GvimExt/Makefile Tue Jul 10 16:18:18 2007
24 gvimext.obj: gvimext.h
27 ! $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsdll) $*.cpp
29 gvimext.res: gvimext.rc
30 $(rc) $(rcflags) $(rcvars) gvimext.rc
32 gvimext.obj: gvimext.h
35 ! $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp
37 gvimext.res: gvimext.rc
38 $(rc) $(rcflags) $(rcvars) gvimext.rc
39 *** ../vim-7.1.281/src/dosinst.c Thu May 10 20:54:39 2007
40 --- src/dosinst.c Tue Jul 10 16:07:16 2007
44 printf("Creating \"Edit with Vim\" popup menu entry\n");
46 ! fprintf(fd, "HKEY_CLASSES_ROOT\\CLSID\\%s\n", vim_ext_clsid);
47 fprintf(fd, "@=\"%s\"\n", vim_ext_name);
48 fprintf(fd, "[HKEY_CLASSES_ROOT\\CLSID\\%s\\InProcServer32]\n",
52 printf("Creating \"Edit with Vim\" popup menu entry\n");
54 ! fprintf(fd, "[HKEY_CLASSES_ROOT\\CLSID\\%s]\n", vim_ext_clsid);
55 fprintf(fd, "@=\"%s\"\n", vim_ext_name);
56 fprintf(fd, "[HKEY_CLASSES_ROOT\\CLSID\\%s\\InProcServer32]\n",
58 *** ../vim-7.1.281/src/if_ole.cpp Wed Aug 16 17:34:09 2006
59 --- src/if_ole.cpp Tue Sep 25 16:44:44 2007
63 extern HWND vim_parent_hwnd;
67 + /* Work around old versions of basetsd.h which wrongly declares
68 + * UINT_PTR as unsigned long */
69 + # define UINT_PTR UINT
72 #include "if_ole.h" // Interface definitions
73 #include "iid_ole.c" // UUID definitions (compile here)
77 STDMETHOD(SendKeys)(BSTR keys);
78 STDMETHOD(Eval)(BSTR expr, BSTR *result);
79 STDMETHOD(SetForeground)(void);
80 ! STDMETHOD(GetHwnd)(UINT *result);
83 // Constructor is private - create using CVim::Create()
85 STDMETHOD(SendKeys)(BSTR keys);
86 STDMETHOD(Eval)(BSTR expr, BSTR *result);
87 STDMETHOD(SetForeground)(void);
88 ! STDMETHOD(GetHwnd)(UINT_PTR *result);
91 // Constructor is private - create using CVim::Create()
97 ! CVim::GetHwnd(UINT *result)
99 ! *result = (UINT) s_hwnd;
107 ! CVim::GetHwnd(UINT_PTR *result)
109 ! *result = (UINT_PTR)s_hwnd;
113 *** ../vim-7.1.281/src/if_ole.h Sun Jun 13 17:46:29 2004
114 --- src/if_ole.h Tue Jul 10 16:21:18 2007
117 virtual HRESULT STDMETHODCALLTYPE SetForeground( void) = 0;
119 virtual HRESULT STDMETHODCALLTYPE GetHwnd(
120 ! /* [retval][out] */ UINT __RPC_FAR *result) = 0;
125 virtual HRESULT STDMETHODCALLTYPE SetForeground( void) = 0;
127 virtual HRESULT STDMETHODCALLTYPE GetHwnd(
128 ! /* [retval][out] */ UINT_PTR __RPC_FAR *result) = 0;
135 HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetHwnd )(
136 IVim __RPC_FAR * This,
137 ! /* [retval][out] */ UINT __RPC_FAR *result);
143 HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetHwnd )(
144 IVim __RPC_FAR * This,
145 ! /* [retval][out] */ UINT_PTR __RPC_FAR *result);
152 HRESULT STDMETHODCALLTYPE IVim_GetHwnd_Proxy(
153 IVim __RPC_FAR * This,
154 ! /* [retval][out] */ UINT __RPC_FAR *result);
157 void __RPC_STUB IVim_GetHwnd_Stub(
160 HRESULT STDMETHODCALLTYPE IVim_GetHwnd_Proxy(
161 IVim __RPC_FAR * This,
162 ! /* [retval][out] */ UINT_PTR __RPC_FAR *result);
165 void __RPC_STUB IVim_GetHwnd_Stub(
166 *** ../vim-7.1.281/src/if_ole.idl Sun Jun 13 17:22:03 2004
167 --- src/if_ole.idl Tue Jul 10 16:21:45 2007
170 HRESULT SendKeys([in]BSTR keys);
171 HRESULT Eval([in]BSTR expr, [out, retval]BSTR* result);
172 HRESULT SetForeground(void);
173 ! HRESULT GetHwnd([out, retval]UINT* result);
176 // Component and type library definitions
178 HRESULT SendKeys([in]BSTR keys);
179 HRESULT Eval([in]BSTR expr, [out, retval]BSTR* result);
180 HRESULT SetForeground(void);
181 ! HRESULT GetHwnd([out, retval]UINT_PTR* result);
184 // Component and type library definitions
185 *** ../vim-7.1.281/src/INSTALLpc.txt Sun Apr 30 20:29:26 2006
186 --- src/INSTALLpc.txt Wed Mar 12 15:01:37 2008
189 |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
190 and |windbg-download|.
192 ! It's easier to download Visual C++ 2005 Express Edition, |msvc-2005-express|.
193 ! The advantage of the VC 2003 Toolkit is that it will be freely available
194 ! long after VC 2005 Express Edition stops being free in November 2006.
196 The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
197 http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
199 |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
200 and |windbg-download|.
202 ! It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|,
203 ! which is freely available in perpetuity.
205 The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
206 http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
210 http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
213 + Visual C++ 2008 Express Edition *msvc-2008-express*
214 + -------------------------------
216 + Visual C++ 2008 Express Edition can be downloaded for free from:
217 + http://msdn2.microsoft.com/en-us/express/default.aspx
218 + This includes the IDE and the debugger. You can build Vim with Make_mvc.mak.
224 *** ../vim-7.1.281/src/Make_mvc.mak Wed Oct 3 13:28:40 2007
225 --- src/Make_mvc.mak Wed Mar 12 15:09:55 2008
228 # Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
229 # and Win64, using the Microsoft Visual C++ compilers. Known to work with
230 ! # VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), and VC8 (VS2005).
232 # To build using other Windows compilers, see INSTALLpc.txt
235 # Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
236 # and Win64, using the Microsoft Visual C++ compilers. Known to work with
237 ! # VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005),
238 ! # and VC9 (VS2008).
240 # To build using other Windows compilers, see INSTALLpc.txt
244 # need shell32.lib for ExtractIcon()
245 # gdi32.lib and comdlg32.lib for printing support
246 # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
247 ! CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
248 !if "$(DELAYLOAD)" == "yes"
249 CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
252 # need shell32.lib for ExtractIcon()
253 # gdi32.lib and comdlg32.lib for printing support
254 # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
255 ! CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
256 ! comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) /nodefaultlib
257 !if "$(DELAYLOAD)" == "yes"
258 CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
264 !if "$(_NMAKE_VER)" == "6.00.8168.0"
268 !if "$(_NMAKE_VER)" == "7.00.9466"
273 !if "$(_NMAKE_VER)" == "8.00.50727.762"
276 + !if "$(_NMAKE_VER)" == "9.00.20706.01"
281 # Abort bulding VIM if version of VC is unrecognised.
284 !message Cannot determine Visual C version being used. If you are using the
285 !message Windows SDK then you must have the environment variable MSVCVER set to
286 !message your version of the VC compiler. If you are not using the Express
287 ! !message version of Visual C you van either set MSVCVER or update this makefile
288 ! !message to handle the new value for _NMAKE_VER.
292 # Convert processor ID to MVC-compatible number
293 ! !if "$(MSVCVER)" != "8.0"
294 !if "$(CPUNR)" == "i386"
296 !elseif "$(CPUNR)" == "i486"
298 !message Cannot determine Visual C version being used. If you are using the
299 !message Windows SDK then you must have the environment variable MSVCVER set to
300 !message your version of the VC compiler. If you are not using the Express
301 ! !message version of Visual C, you can either set MSVCVER or update this makefile
302 ! !message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)".
306 # Convert processor ID to MVC-compatible number
307 ! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0")
308 !if "$(CPUNR)" == "i386"
310 !elseif "$(CPUNR)" == "i486"
316 ! # VC8 only allows specifying SSE architecture
317 !if "$(CPUNR)" == "pentium4"
324 ! # VC8/9 only allows specifying SSE architecture
325 !if "$(CPUNR)" == "pentium4"
333 ! !if "$(MSVCVER)" == "8.0"
334 # Use link time code generation if not worried about size
335 !if "$(OPTIMIZE)" != "SPACE"
336 OPTFLAG = $(OPTFLAG) /GL
341 ! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
342 # Use link time code generation if not worried about size
343 !if "$(OPTIMIZE)" != "SPACE"
344 OPTFLAG = $(OPTFLAG) /GL
350 ! CFLAGS = $(CFLAGS) /MT
354 ! ! if "$(CPU)" == "i386"
357 CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
362 ! CFLAGS = $(CFLAGS) /Zl /MT
366 ! ! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86")
369 CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
372 LIBC = $(LIBC) msvcrtd.lib
374 LIBC = $(LIBC) libcmtd.lib
375 ! CFLAGS = $(CFLAGS) /MTd
380 LIBC = $(LIBC) msvcrtd.lib
382 LIBC = $(LIBC) libcmtd.lib
383 ! CFLAGS = $(CFLAGS) /Zl /MTd
389 $(OUTDIR)\gui_w32.obj \
390 $(OUTDIR)\os_w32exe.obj
392 ! oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
393 winspool.lib comctl32.lib advapi32.lib shell32.lib \
394 /machine:$(CPU) /nodefaultlib
397 $(OUTDIR)\gui_w32.obj \
398 $(OUTDIR)\os_w32exe.obj
400 ! gdi32.lib version.lib $(IME_LIB) \
401 winspool.lib comctl32.lib advapi32.lib shell32.lib \
402 /machine:$(CPU) /nodefaultlib
407 # Report link time code generation progress if used.
409 ! !if "$(MSVCVER)" == "8.0"
410 !if "$(OPTIMIZE)" != "SPACE"
411 LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
415 # Report link time code generation progress if used.
417 ! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
418 !if "$(OPTIMIZE)" != "SPACE"
419 LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
421 *** ../vim-7.1.281/src/os_win32.c Tue Nov 20 17:21:28 2007
422 --- src/os_win32.c Wed Mar 12 15:24:33 2008
425 windgoto((int)Rows - 1, 0);
428 ! sprintf((char *)IObuff, _("Vim: Caught %s event\n"),
429 (dwCtrlType == CTRL_CLOSE_EVENT
431 : dwCtrlType == CTRL_LOGOFF_EVENT
433 windgoto((int)Rows - 1, 0);
436 ! vim_snprintf((char *)IObuff, IOSIZE, _("Vim: Caught %s event\n"),
437 (dwCtrlType == CTRL_CLOSE_EVENT
439 : dwCtrlType == CTRL_LOGOFF_EVENT
443 /* we use "command" or "cmd" to start the shell; slow but easy */
446 ! newcmd = lalloc((long_u) (
448 STRLEN(vimrun_path) +
450 ! STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10), TRUE);
453 char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd);
456 /* we use "command" or "cmd" to start the shell; slow but easy */
460 STRLEN(vimrun_path) +
462 ! STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
464 ! newcmd = lalloc(cmdlen, TRUE);
467 char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd);
470 if (!s_dont_use_vimrun)
471 /* Use vimrun to execute the command. It opens a console
472 * window, which can be closed without killing Vim. */
473 ! sprintf((char *)newcmd, "%s%s%s %s %s",
475 (msg_silent != 0 || (options & SHELL_DOOUT))
480 ! sprintf((char *)newcmd, "%s %s %s", p_sh, p_shcf, cmd);
481 x = mch_system((char *)newcmd, options);
485 if (!s_dont_use_vimrun)
486 /* Use vimrun to execute the command. It opens a console
487 * window, which can be closed without killing Vim. */
488 ! vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
490 (msg_silent != 0 || (options & SHELL_DOOUT))
495 ! vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
496 ! p_sh, p_shcf, cmd);
497 x = mch_system((char *)newcmd, options);
506 + # if defined(DEBUG) && _MSC_VER > 1200
507 + /* Work around an annoying assertion in the Microsoft debug CRT
508 + * when mode's text/binary setting doesn't match _get_fmode(). */
509 + char newMode = mode[strlen(mode) - 1];
512 + _get_fmode(&oldMode);
513 + if (newMode == 't')
514 + _set_fmode(_O_TEXT);
515 + else if (newMode == 'b')
516 + _set_fmode(_O_BINARY);
518 wn = enc_to_ucs2(name, NULL);
519 wm = enc_to_ucs2(mode, NULL);
520 if (wn != NULL && wm != NULL)
525 + # if defined(DEBUG) && _MSC_VER > 1200
526 + _set_fmode(oldMode);
531 /* Retry with non-wide function (for Windows 98). Can't use
532 *** ../vim-7.1.281/src/version.c Sun Mar 16 13:09:14 2008
533 --- src/version.c Sun Mar 16 14:49:21 2008
537 { /* Add new patch number below this line */
543 Amazing but true: If all the salmon caught in Canada in one year were laid
544 end to end across the Sahara Desert, the smell would be absolutely awful.
546 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
547 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
548 \\\ download, build and distribute -- http://www.A-A-P.org ///
549 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///