home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.1 / 7.1.282 < prev    next >
Encoding:
Internet Message Format  |  2008-03-15  |  15.9 KB

  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.   #include "if_ole.h"    // Interface definitions
  72.   #include "iid_ole.c"    // UUID definitions (compile here)
  73.   
  74. ***************
  75. *** 107,113 ****
  76.       STDMETHOD(SendKeys)(BSTR keys);
  77.       STDMETHOD(Eval)(BSTR expr, BSTR *result);
  78.       STDMETHOD(SetForeground)(void);
  79. !     STDMETHOD(GetHwnd)(UINT *result);
  80.   
  81.   private:
  82.       // Constructor is private - create using CVim::Create()
  83. --- 113,119 ----
  84.       STDMETHOD(SendKeys)(BSTR keys);
  85.       STDMETHOD(Eval)(BSTR expr, BSTR *result);
  86.       STDMETHOD(SetForeground)(void);
  87. !     STDMETHOD(GetHwnd)(UINT_PTR *result);
  88.   
  89.   private:
  90.       // Constructor is private - create using CVim::Create()
  91. ***************
  92. *** 288,296 ****
  93.   }
  94.   
  95.   STDMETHODIMP
  96. ! CVim::GetHwnd(UINT *result)
  97.   {
  98. !     *result = (UINT) s_hwnd;
  99.       return S_OK;
  100.   }
  101.   
  102. --- 294,302 ----
  103.   }
  104.   
  105.   STDMETHODIMP
  106. ! CVim::GetHwnd(UINT_PTR *result)
  107.   {
  108. !     *result = (UINT_PTR)s_hwnd;
  109.       return S_OK;
  110.   }
  111.   
  112. *** ../vim-7.1.281/src/if_ole.h    Sun Jun 13 17:46:29 2004
  113. --- src/if_ole.h    Tue Jul 10 16:21:18 2007
  114. ***************
  115. *** 79,85 ****
  116.       virtual HRESULT STDMETHODCALLTYPE SetForeground( void) = 0;
  117.   
  118.       virtual HRESULT STDMETHODCALLTYPE GetHwnd(
  119. !         /* [retval][out] */ UINT __RPC_FAR *result) = 0;
  120.   
  121.       };
  122.   
  123. --- 79,85 ----
  124.       virtual HRESULT STDMETHODCALLTYPE SetForeground( void) = 0;
  125.   
  126.       virtual HRESULT STDMETHODCALLTYPE GetHwnd(
  127. !         /* [retval][out] */ UINT_PTR __RPC_FAR *result) = 0;
  128.   
  129.       };
  130.   
  131. ***************
  132. *** 143,149 ****
  133.   
  134.       HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetHwnd )(
  135.           IVim __RPC_FAR * This,
  136. !         /* [retval][out] */ UINT __RPC_FAR *result);
  137.   
  138.       END_INTERFACE
  139.       } IVimVtbl;
  140. --- 143,149 ----
  141.   
  142.       HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetHwnd )(
  143.           IVim __RPC_FAR * This,
  144. !         /* [retval][out] */ UINT_PTR __RPC_FAR *result);
  145.   
  146.       END_INTERFACE
  147.       } IVimVtbl;
  148. ***************
  149. *** 236,242 ****
  150.   
  151.   HRESULT STDMETHODCALLTYPE IVim_GetHwnd_Proxy(
  152.       IVim __RPC_FAR * This,
  153. !     /* [retval][out] */ UINT __RPC_FAR *result);
  154.   
  155.   
  156.   void __RPC_STUB IVim_GetHwnd_Stub(
  157. --- 236,242 ----
  158.   
  159.   HRESULT STDMETHODCALLTYPE IVim_GetHwnd_Proxy(
  160.       IVim __RPC_FAR * This,
  161. !     /* [retval][out] */ UINT_PTR __RPC_FAR *result);
  162.   
  163.   
  164.   void __RPC_STUB IVim_GetHwnd_Stub(
  165. *** ../vim-7.1.281/src/if_ole.idl    Sun Jun 13 17:22:03 2004
  166. --- src/if_ole.idl    Tue Jul 10 16:21:45 2007
  167. ***************
  168. *** 20,26 ****
  169.       HRESULT SendKeys([in]BSTR keys);
  170.       HRESULT Eval([in]BSTR expr, [out, retval]BSTR* result);
  171.       HRESULT SetForeground(void);
  172. !     HRESULT GetHwnd([out, retval]UINT* result);
  173.   };
  174.   
  175.   // Component and type library definitions
  176. --- 20,26 ----
  177.       HRESULT SendKeys([in]BSTR keys);
  178.       HRESULT Eval([in]BSTR expr, [out, retval]BSTR* result);
  179.       HRESULT SetForeground(void);
  180. !     HRESULT GetHwnd([out, retval]UINT_PTR* result);
  181.   };
  182.   
  183.   // Component and type library definitions
  184. *** ../vim-7.1.281/src/INSTALLpc.txt    Sun Apr 30 20:29:26 2006
  185. --- src/INSTALLpc.txt    Wed Mar 12 15:01:37 2008
  186. ***************
  187. *** 82,90 ****
  188.   |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
  189.   and |windbg-download|.
  190.   
  191. ! It's easier to download Visual C++ 2005 Express Edition, |msvc-2005-express|.
  192. ! The advantage of the VC 2003 Toolkit is that it will be freely available
  193. ! long after VC 2005 Express Edition stops being free in November 2006.
  194.   
  195.   The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
  196.       http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
  197. --- 82,89 ----
  198.   |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
  199.   and |windbg-download|.
  200.   
  201. ! It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|,
  202. ! which is freely available in perpetuity.
  203.   
  204.   The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
  205.       http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
  206. ***************
  207. *** 152,157 ****
  208. --- 151,164 ----
  209.       http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
  210.   
  211.   
  212. + Visual C++ 2008 Express Edition       *msvc-2008-express*
  213. + -------------------------------
  214. + Visual C++ 2008 Express Edition can be downloaded for free from:
  215. +     http://msdn2.microsoft.com/en-us/express/default.aspx
  216. + This includes the IDE and the debugger. You can build Vim with Make_mvc.mak.
  217.   2. MinGW
  218.   ========
  219.   
  220. *** ../vim-7.1.281/src/Make_mvc.mak    Wed Oct  3 13:28:40 2007
  221. --- src/Make_mvc.mak    Wed Mar 12 15:09:55 2008
  222. ***************
  223. *** 1,6 ****
  224.   # Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
  225.   # and Win64, using the Microsoft Visual C++ compilers. Known to work with
  226. ! # VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), and VC8 (VS2005).
  227.   #
  228.   # To build using other Windows compilers, see INSTALLpc.txt
  229.   #
  230. --- 1,7 ----
  231.   # Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
  232.   # and Win64, using the Microsoft Visual C++ compilers. Known to work with
  233. ! # VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005),
  234. ! # and VC9 (VS2008).
  235.   #
  236.   # To build using other Windows compilers, see INSTALLpc.txt
  237.   #
  238. ***************
  239. *** 285,291 ****
  240.   # need shell32.lib for ExtractIcon()
  241.   # gdi32.lib and comdlg32.lib for printing support
  242.   # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
  243. ! CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
  244.   !if "$(DELAYLOAD)" == "yes"
  245.   CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
  246.   !endif
  247. --- 286,293 ----
  248.   # need shell32.lib for ExtractIcon()
  249.   # gdi32.lib and comdlg32.lib for printing support
  250.   # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
  251. ! CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
  252. !           comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) /nodefaultlib
  253.   !if "$(DELAYLOAD)" == "yes"
  254.   CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
  255.   !endif
  256. ***************
  257. *** 331,336 ****
  258. --- 333,339 ----
  259.   !endif
  260.   !if "$(_NMAKE_VER)" == "6.00.8168.0"
  261.   MSVCVER = 6.0
  262. + CPU = ix86
  263.   !endif
  264.   !if "$(_NMAKE_VER)" == "7.00.9466"
  265.   MSVCVER = 7.0
  266. ***************
  267. *** 344,349 ****
  268. --- 347,355 ----
  269.   !if "$(_NMAKE_VER)" == "8.00.50727.762"
  270.   MSVCVER = 8.0
  271.   !endif
  272. + !if "$(_NMAKE_VER)" == "9.00.20706.01"
  273. + MSVCVER = 9.0
  274. + !endif
  275.   !endif
  276.   
  277.   # Abort bulding VIM if version of VC is unrecognised.
  278. ***************
  279. *** 352,364 ****
  280.   !message Cannot determine Visual C version being used.  If you are using the
  281.   !message Windows SDK then you must have the environment variable MSVCVER set to
  282.   !message your version of the VC compiler.  If you are not using the Express
  283. ! !message version of Visual C you van either set MSVCVER or update this makefile
  284. ! !message to handle the new value for _NMAKE_VER.
  285.   !error Make aborted.
  286.   !endif
  287.   
  288.   # Convert processor ID to MVC-compatible number
  289. ! !if "$(MSVCVER)" != "8.0"
  290.   !if "$(CPUNR)" == "i386"
  291.   CPUARG = /G3
  292.   !elseif "$(CPUNR)" == "i486"
  293. --- 358,370 ----
  294.   !message Cannot determine Visual C version being used.  If you are using the
  295.   !message Windows SDK then you must have the environment variable MSVCVER set to
  296.   !message your version of the VC compiler.  If you are not using the Express
  297. ! !message version of Visual C, you can either set MSVCVER or update this makefile
  298. ! !message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)".
  299.   !error Make aborted.
  300.   !endif
  301.   
  302.   # Convert processor ID to MVC-compatible number
  303. ! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0")
  304.   !if "$(CPUNR)" == "i386"
  305.   CPUARG = /G3
  306.   !elseif "$(CPUNR)" == "i486"
  307. ***************
  308. *** 373,379 ****
  309.   CPUARG =
  310.   !endif
  311.   !else
  312. ! # VC8 only allows specifying SSE architecture
  313.   !if "$(CPUNR)" == "pentium4"
  314.   CPUARG = /arch:SSE2
  315.   !endif
  316. --- 379,385 ----
  317.   CPUARG =
  318.   !endif
  319.   !else
  320. ! # VC8/9 only allows specifying SSE architecture
  321.   !if "$(CPUNR)" == "pentium4"
  322.   CPUARG = /arch:SSE2
  323.   !endif
  324. ***************
  325. *** 391,397 ****
  326.   !else # MAXSPEED
  327.   OPTFLAG = /Ox
  328.   !endif
  329. ! !if "$(MSVCVER)" == "8.0"
  330.   # Use link time code generation if not worried about size
  331.   !if "$(OPTIMIZE)" != "SPACE"
  332.   OPTFLAG = $(OPTFLAG) /GL
  333. --- 397,403 ----
  334.   !else # MAXSPEED
  335.   OPTFLAG = /Ox
  336.   !endif
  337. ! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
  338.   # Use link time code generation if not worried about size
  339.   !if "$(OPTIMIZE)" != "SPACE"
  340.   OPTFLAG = $(OPTFLAG) /GL
  341. ***************
  342. *** 404,414 ****
  343.   LIBC = msvcrt.lib
  344.   ! else
  345.   LIBC = libcmt.lib
  346. ! CFLAGS = $(CFLAGS) /MT
  347.   ! endif
  348.   !else  # DEBUG
  349.   VIM = vimd
  350. ! ! if "$(CPU)" == "i386"
  351.   DEBUGINFO = /ZI
  352.   ! endif
  353.   CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
  354. --- 410,420 ----
  355.   LIBC = msvcrt.lib
  356.   ! else
  357.   LIBC = libcmt.lib
  358. ! CFLAGS = $(CFLAGS) /Zl /MT
  359.   ! endif
  360.   !else  # DEBUG
  361.   VIM = vimd
  362. ! ! if ("$(CPU)" == "i386") || ("$(CPU)" == "ix86")
  363.   DEBUGINFO = /ZI
  364.   ! endif
  365.   CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
  366. ***************
  367. *** 424,430 ****
  368.   LIBC = $(LIBC) msvcrtd.lib
  369.   ! else
  370.   LIBC = $(LIBC) libcmtd.lib
  371. ! CFLAGS = $(CFLAGS) /MTd
  372.   ! endif
  373.   !endif # DEBUG
  374.   
  375. --- 430,436 ----
  376.   LIBC = $(LIBC) msvcrtd.lib
  377.   ! else
  378.   LIBC = $(LIBC) libcmtd.lib
  379. ! CFLAGS = $(CFLAGS) /Zl /MTd
  380.   ! endif
  381.   !endif # DEBUG
  382.   
  383. ***************
  384. *** 534,540 ****
  385.       $(OUTDIR)\gui_w32.obj \
  386.       $(OUTDIR)\os_w32exe.obj
  387.   GUI_LIB = \
  388. !     oldnames.lib kernel32.lib gdi32.lib version.lib $(IME_LIB) \
  389.       winspool.lib comctl32.lib advapi32.lib shell32.lib \
  390.       /machine:$(CPU) /nodefaultlib
  391.   !else
  392. --- 540,546 ----
  393.       $(OUTDIR)\gui_w32.obj \
  394.       $(OUTDIR)\os_w32exe.obj
  395.   GUI_LIB = \
  396. !     gdi32.lib version.lib $(IME_LIB) \
  397.       winspool.lib comctl32.lib advapi32.lib shell32.lib \
  398.       /machine:$(CPU) /nodefaultlib
  399.   !else
  400. ***************
  401. *** 757,763 ****
  402.   
  403.   # Report link time code generation progress if used. 
  404.   !ifdef NODEBUG
  405. ! !if "$(MSVCVER)" == "8.0"
  406.   !if "$(OPTIMIZE)" != "SPACE"
  407.   LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
  408.   !endif
  409. --- 763,769 ----
  410.   
  411.   # Report link time code generation progress if used. 
  412.   !ifdef NODEBUG
  413. ! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
  414.   !if "$(OPTIMIZE)" != "SPACE"
  415.   LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
  416.   !endif
  417. *** ../vim-7.1.281/src/os_win32.c    Tue Nov 20 17:21:28 2007
  418. --- src/os_win32.c    Wed Mar 12 15:24:33 2008
  419. ***************
  420. *** 2856,2862 ****
  421.       windgoto((int)Rows - 1, 0);
  422.       g_fForceExit = TRUE;
  423.   
  424. !     sprintf((char *)IObuff, _("Vim: Caught %s event\n"),
  425.           (dwCtrlType == CTRL_CLOSE_EVENT
  426.                ? _("close")
  427.                : dwCtrlType == CTRL_LOGOFF_EVENT
  428. --- 2856,2862 ----
  429.       windgoto((int)Rows - 1, 0);
  430.       g_fForceExit = TRUE;
  431.   
  432. !     vim_snprintf((char *)IObuff, IOSIZE, _("Vim: Caught %s event\n"),
  433.           (dwCtrlType == CTRL_CLOSE_EVENT
  434.                ? _("close")
  435.                : dwCtrlType == CTRL_LOGOFF_EVENT
  436. ***************
  437. *** 3282,3293 ****
  438.       {
  439.       /* we use "command" or "cmd" to start the shell; slow but easy */
  440.       char_u *newcmd;
  441. !     newcmd = lalloc((long_u) (
  442.   #ifdef FEAT_GUI_W32
  443.           STRLEN(vimrun_path) +
  444.   #endif
  445. !         STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10), TRUE);
  446.       if (newcmd != NULL)
  447.       {
  448.           char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd);
  449. --- 3282,3294 ----
  450.       {
  451.       /* we use "command" or "cmd" to start the shell; slow but easy */
  452.       char_u *newcmd;
  453. !     long_u cmdlen =  (
  454.   #ifdef FEAT_GUI_W32
  455.           STRLEN(vimrun_path) +
  456.   #endif
  457. !         STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
  458. !     newcmd = lalloc(cmdlen, TRUE);
  459.       if (newcmd != NULL)
  460.       {
  461.           char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd);
  462. ***************
  463. *** 3373,3386 ****
  464.           if (!s_dont_use_vimrun)
  465.               /* Use vimrun to execute the command.  It opens a console
  466.                * window, which can be closed without killing Vim. */
  467. !             sprintf((char *)newcmd, "%s%s%s %s %s",
  468.                   vimrun_path,
  469.                   (msg_silent != 0 || (options & SHELL_DOOUT))
  470.                                    ? "-s " : "",
  471.                   p_sh, p_shcf, cmd);
  472.           else
  473.   #endif
  474. !             sprintf((char *)newcmd, "%s %s %s", p_sh, p_shcf, cmd);
  475.           x = mch_system((char *)newcmd, options);
  476.           }
  477.           vim_free(newcmd);
  478. --- 3374,3388 ----
  479.           if (!s_dont_use_vimrun)
  480.               /* Use vimrun to execute the command.  It opens a console
  481.                * window, which can be closed without killing Vim. */
  482. !                     vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
  483.                   vimrun_path,
  484.                   (msg_silent != 0 || (options & SHELL_DOOUT))
  485.                                    ? "-s " : "",
  486.                   p_sh, p_shcf, cmd);
  487.           else
  488.   #endif
  489. !                     vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
  490. !                                p_sh, p_shcf, cmd);
  491.           x = mch_system((char *)newcmd, options);
  492.           }
  493.           vim_free(newcmd);
  494. ***************
  495. *** 4664,4675 ****
  496. --- 4666,4694 ----
  497.   # endif
  498.          )
  499.       {
  500. + # if defined(DEBUG) && _MSC_VER > 1200
  501. +     /* Work around an annoying assertion in the Microsoft debug CRT
  502. +      * when mode's text/binary setting doesn't match _get_fmode(). */
  503. +     char newMode = mode[strlen(mode) - 1];
  504. +     int oldMode = 0;
  505. +     _get_fmode(&oldMode);
  506. +     if (newMode == 't')
  507. +         _set_fmode(_O_TEXT);
  508. +     else if (newMode == 'b')
  509. +         _set_fmode(_O_BINARY);
  510. + # endif
  511.       wn = enc_to_ucs2(name, NULL);
  512.       wm = enc_to_ucs2(mode, NULL);
  513.       if (wn != NULL && wm != NULL)
  514.           f = _wfopen(wn, wm);
  515.       vim_free(wn);
  516.       vim_free(wm);
  517. + # if defined(DEBUG) && _MSC_VER > 1200
  518. +     _set_fmode(oldMode);
  519. + # endif
  520.       if (f != NULL)
  521.           return f;
  522.       /* Retry with non-wide function (for Windows 98). Can't use
  523. *** ../vim-7.1.281/src/version.c    Sun Mar 16 13:09:14 2008
  524. --- src/version.c    Sun Mar 16 14:49:21 2008
  525. ***************
  526. *** 668,669 ****
  527. --- 668,671 ----
  528.   {   /* Add new patch number below this line */
  529. + /**/
  530. +     282,
  531.   /**/
  532.  
  533. -- 
  534. Amazing but true: If all the salmon caught in Canada in one year were laid
  535. end to end across the Sahara Desert, the smell would be absolutely awful.
  536.  
  537.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  538. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  539. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  540.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  541.