]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.282
- new
[packages/vim.git] / 7.1.282
1 To: vim-dev@vim.org
2 Subject: Patch 7.1.282 (extra)
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.282 (extra)
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,
17             src/os_win32.c,
18
19
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
22 ***************
23 *** 24,30 ****
24   gvimext.obj: gvimext.h
25   
26   .cpp.obj:
27 !     $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsdll) $*.cpp
28   
29   gvimext.res: gvimext.rc
30       $(rc) $(rcflags) $(rcvars)  gvimext.rc
31 --- 24,30 ----
32   gvimext.obj: gvimext.h
33   
34   .cpp.obj:
35 !     $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp
36   
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
41 ***************
42 *** 1365,1371 ****
43   
44             printf("Creating \"Edit with Vim\" popup menu entry\n");
45   
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",
49                                                                vim_ext_clsid);
50 --- 1365,1371 ----
51   
52             printf("Creating \"Edit with Vim\" popup menu entry\n");
53   
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",
57                                                                vim_ext_clsid);
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
60 ***************
61 *** 34,39 ****
62 --- 34,45 ----
63   extern HWND vim_parent_hwnd;
64   }
65   
66 + #if _MSC_VER < 1300
67 + /* Work around old versions of basetsd.h which wrongly declares
68 +  * UINT_PTR as unsigned long */
69 + # define UINT_PTR UINT
70 + #endif
71
72   #include "if_ole.h"   // Interface definitions
73   #include "iid_ole.c"  // UUID definitions (compile here)
74   
75 ***************
76 *** 107,113 ****
77       STDMETHOD(SendKeys)(BSTR keys);
78       STDMETHOD(Eval)(BSTR expr, BSTR *result);
79       STDMETHOD(SetForeground)(void);
80 !     STDMETHOD(GetHwnd)(UINT *result);
81   
82   private:
83       // Constructor is private - create using CVim::Create()
84 --- 113,119 ----
85       STDMETHOD(SendKeys)(BSTR keys);
86       STDMETHOD(Eval)(BSTR expr, BSTR *result);
87       STDMETHOD(SetForeground)(void);
88 !     STDMETHOD(GetHwnd)(UINT_PTR *result);
89   
90   private:
91       // Constructor is private - create using CVim::Create()
92 ***************
93 *** 288,296 ****
94   }
95   
96   STDMETHODIMP
97 ! CVim::GetHwnd(UINT *result)
98   {
99 !     *result = (UINT) s_hwnd;
100       return S_OK;
101   }
102   
103 --- 294,302 ----
104   }
105   
106   STDMETHODIMP
107 ! CVim::GetHwnd(UINT_PTR *result)
108   {
109 !     *result = (UINT_PTR)s_hwnd;
110       return S_OK;
111   }
112   
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
115 ***************
116 *** 79,85 ****
117         virtual HRESULT STDMETHODCALLTYPE SetForeground( void) = 0;
118   
119         virtual HRESULT STDMETHODCALLTYPE GetHwnd(
120 !           /* [retval][out] */ UINT __RPC_FAR *result) = 0;
121   
122       };
123   
124 --- 79,85 ----
125         virtual HRESULT STDMETHODCALLTYPE SetForeground( void) = 0;
126   
127         virtual HRESULT STDMETHODCALLTYPE GetHwnd(
128 !           /* [retval][out] */ UINT_PTR __RPC_FAR *result) = 0;
129   
130       };
131   
132 ***************
133 *** 143,149 ****
134   
135         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetHwnd )(
136             IVim __RPC_FAR * This,
137 !           /* [retval][out] */ UINT __RPC_FAR *result);
138   
139         END_INTERFACE
140       } IVimVtbl;
141 --- 143,149 ----
142   
143         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetHwnd )(
144             IVim __RPC_FAR * This,
145 !           /* [retval][out] */ UINT_PTR __RPC_FAR *result);
146   
147         END_INTERFACE
148       } IVimVtbl;
149 ***************
150 *** 236,242 ****
151   
152   HRESULT STDMETHODCALLTYPE IVim_GetHwnd_Proxy(
153       IVim __RPC_FAR * This,
154 !     /* [retval][out] */ UINT __RPC_FAR *result);
155   
156   
157   void __RPC_STUB IVim_GetHwnd_Stub(
158 --- 236,242 ----
159   
160   HRESULT STDMETHODCALLTYPE IVim_GetHwnd_Proxy(
161       IVim __RPC_FAR * This,
162 !     /* [retval][out] */ UINT_PTR __RPC_FAR *result);
163   
164   
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
168 ***************
169 *** 20,26 ****
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);
174   };
175   
176   // Component and type library definitions
177 --- 20,26 ----
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);
182   };
183   
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
187 ***************
188 *** 82,90 ****
189   |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
190   and |windbg-download|.
191   
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.
195   
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
198 --- 82,89 ----
199   |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
200   and |windbg-download|.
201   
202 ! It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|,
203 ! which is freely available in perpetuity.
204   
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
207 ***************
208 *** 152,157 ****
209 --- 151,164 ----
210       http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
211   
212   
213 + Visual C++ 2008 Express Edition       *msvc-2008-express*
214 + -------------------------------
215
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.
219
220
221   2. MinGW
222   ========
223   
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
226 ***************
227 *** 1,6 ****
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).
231   #
232   # To build using other Windows compilers, see INSTALLpc.txt
233   #
234 --- 1,7 ----
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).
239   #
240   # To build using other Windows compilers, see INSTALLpc.txt
241   #
242 ***************
243 *** 285,291 ****
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
250   !endif
251 --- 286,293 ----
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
259   !endif
260 ***************
261 *** 331,336 ****
262 --- 333,339 ----
263   !endif
264   !if "$(_NMAKE_VER)" == "6.00.8168.0"
265   MSVCVER = 6.0
266 + CPU = ix86
267   !endif
268   !if "$(_NMAKE_VER)" == "7.00.9466"
269   MSVCVER = 7.0
270 ***************
271 *** 344,349 ****
272 --- 347,355 ----
273   !if "$(_NMAKE_VER)" == "8.00.50727.762"
274   MSVCVER = 8.0
275   !endif
276 + !if "$(_NMAKE_VER)" == "9.00.20706.01"
277 + MSVCVER = 9.0
278 + !endif
279   !endif
280   
281   # Abort bulding VIM if version of VC is unrecognised.
282 ***************
283 *** 352,364 ****
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.
289   !error Make aborted.
290   !endif
291   
292   # Convert processor ID to MVC-compatible number
293 ! !if "$(MSVCVER)" != "8.0"
294   !if "$(CPUNR)" == "i386"
295   CPUARG = /G3
296   !elseif "$(CPUNR)" == "i486"
297 --- 358,370 ----
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)".
303   !error Make aborted.
304   !endif
305   
306   # Convert processor ID to MVC-compatible number
307 ! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0")
308   !if "$(CPUNR)" == "i386"
309   CPUARG = /G3
310   !elseif "$(CPUNR)" == "i486"
311 ***************
312 *** 373,379 ****
313   CPUARG =
314   !endif
315   !else
316 ! # VC8 only allows specifying SSE architecture
317   !if "$(CPUNR)" == "pentium4"
318   CPUARG = /arch:SSE2
319   !endif
320 --- 379,385 ----
321   CPUARG =
322   !endif
323   !else
324 ! # VC8/9 only allows specifying SSE architecture
325   !if "$(CPUNR)" == "pentium4"
326   CPUARG = /arch:SSE2
327   !endif
328 ***************
329 *** 391,397 ****
330   !else # MAXSPEED
331   OPTFLAG = /Ox
332   !endif
333 ! !if "$(MSVCVER)" == "8.0"
334   # Use link time code generation if not worried about size
335   !if "$(OPTIMIZE)" != "SPACE"
336   OPTFLAG = $(OPTFLAG) /GL
337 --- 397,403 ----
338   !else # MAXSPEED
339   OPTFLAG = /Ox
340   !endif
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
345 ***************
346 *** 404,414 ****
347   LIBC = msvcrt.lib
348   ! else
349   LIBC = libcmt.lib
350 ! CFLAGS = $(CFLAGS) /MT
351   ! endif
352   !else  # DEBUG
353   VIM = vimd
354 ! ! if "$(CPU)" == "i386"
355   DEBUGINFO = /ZI
356   ! endif
357   CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
358 --- 410,420 ----
359   LIBC = msvcrt.lib
360   ! else
361   LIBC = libcmt.lib
362 ! CFLAGS = $(CFLAGS) /Zl /MT
363   ! endif
364   !else  # DEBUG
365   VIM = vimd
366 ! ! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86")
367   DEBUGINFO = /ZI
368   ! endif
369   CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
370 ***************
371 *** 424,430 ****
372   LIBC = $(LIBC) msvcrtd.lib
373   ! else
374   LIBC = $(LIBC) libcmtd.lib
375 ! CFLAGS = $(CFLAGS) /MTd
376   ! endif
377   !endif # DEBUG
378   
379 --- 430,436 ----
380   LIBC = $(LIBC) msvcrtd.lib
381   ! else
382   LIBC = $(LIBC) libcmtd.lib
383 ! CFLAGS = $(CFLAGS) /Zl /MTd
384   ! endif
385   !endif # DEBUG
386   
387 ***************
388 *** 534,540 ****
389         $(OUTDIR)\gui_w32.obj \
390         $(OUTDIR)\os_w32exe.obj
391   GUI_LIB = \
392 !       oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
393         winspool.lib comctl32.lib advapi32.lib shell32.lib \
394         /machine:$(CPU) /nodefaultlib
395   !else
396 --- 540,546 ----
397         $(OUTDIR)\gui_w32.obj \
398         $(OUTDIR)\os_w32exe.obj
399   GUI_LIB = \
400 !       gdi32.lib version.lib $(IME_LIB) \
401         winspool.lib comctl32.lib advapi32.lib shell32.lib \
402         /machine:$(CPU) /nodefaultlib
403   !else
404 ***************
405 *** 757,763 ****
406   
407   # Report link time code generation progress if used. 
408   !ifdef NODEBUG
409 ! !if "$(MSVCVER)" == "8.0"
410   !if "$(OPTIMIZE)" != "SPACE"
411   LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
412   !endif
413 --- 763,769 ----
414   
415   # Report link time code generation progress if used. 
416   !ifdef NODEBUG
417 ! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
418   !if "$(OPTIMIZE)" != "SPACE"
419   LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
420   !endif
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
423 ***************
424 *** 2856,2862 ****
425         windgoto((int)Rows - 1, 0);
426         g_fForceExit = TRUE;
427   
428 !       sprintf((char *)IObuff, _("Vim: Caught %s event\n"),
429                 (dwCtrlType == CTRL_CLOSE_EVENT
430                      ? _("close")
431                      : dwCtrlType == CTRL_LOGOFF_EVENT
432 --- 2856,2862 ----
433         windgoto((int)Rows - 1, 0);
434         g_fForceExit = TRUE;
435   
436 !       vim_snprintf((char *)IObuff, IOSIZE, _("Vim: Caught %s event\n"),
437                 (dwCtrlType == CTRL_CLOSE_EVENT
438                      ? _("close")
439                      : dwCtrlType == CTRL_LOGOFF_EVENT
440 ***************
441 *** 3282,3293 ****
442       {
443         /* we use "command" or "cmd" to start the shell; slow but easy */
444         char_u *newcmd;
445
446 !       newcmd = lalloc((long_u) (
447   #ifdef FEAT_GUI_W32
448                 STRLEN(vimrun_path) +
449   #endif
450 !               STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10), TRUE);
451         if (newcmd != NULL)
452         {
453             char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd);
454 --- 3282,3294 ----
455       {
456         /* we use "command" or "cmd" to start the shell; slow but easy */
457         char_u *newcmd;
458 !       long_u cmdlen =  (
459   #ifdef FEAT_GUI_W32
460                 STRLEN(vimrun_path) +
461   #endif
462 !               STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
463
464 !       newcmd = lalloc(cmdlen, TRUE);
465         if (newcmd != NULL)
466         {
467             char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd);
468 ***************
469 *** 3373,3386 ****
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",
474                             vimrun_path,
475                             (msg_silent != 0 || (options & SHELL_DOOUT))
476                                                                  ? "-s " : "",
477                             p_sh, p_shcf, cmd);
478                 else
479   #endif
480 !                   sprintf((char *)newcmd, "%s %s %s", p_sh, p_shcf, cmd);
481                 x = mch_system((char *)newcmd, options);
482             }
483             vim_free(newcmd);
484 --- 3374,3388 ----
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",
489                             vimrun_path,
490                             (msg_silent != 0 || (options & SHELL_DOOUT))
491                                                                  ? "-s " : "",
492                             p_sh, p_shcf, cmd);
493                 else
494   #endif
495 !                     vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
496 !                                                          p_sh, p_shcf, cmd);
497                 x = mch_system((char *)newcmd, options);
498             }
499             vim_free(newcmd);
500 ***************
501 *** 4664,4675 ****
502 --- 4666,4694 ----
503   # endif
504          )
505       {
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];
510 +       int oldMode = 0;
511
512 +       _get_fmode(&oldMode);
513 +       if (newMode == 't')
514 +           _set_fmode(_O_TEXT);
515 +       else if (newMode == 'b')
516 +           _set_fmode(_O_BINARY);
517 + # endif
518         wn = enc_to_ucs2(name, NULL);
519         wm = enc_to_ucs2(mode, NULL);
520         if (wn != NULL && wm != NULL)
521             f = _wfopen(wn, wm);
522         vim_free(wn);
523         vim_free(wm);
524
525 + # if defined(DEBUG) && _MSC_VER > 1200
526 +       _set_fmode(oldMode);
527 + # endif
528
529         if (f != NULL)
530             return f;
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
534 ***************
535 *** 668,669 ****
536 --- 668,671 ----
537   {   /* Add new patch number below this line */
538 + /**/
539 +     282,
540   /**/
541
542 -- 
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.
545
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    ///
This page took 0.066923 seconds and 3 git commands to generate.