To: [email protected]
Subject: Patch 6.3b.003 (extra)
Fcc: outbox
From: Bram Moolenaar <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.3b.003 (extra)
Problem:    Win32: When compiling with Borland C 5.5 and 'encoding' is "utf-8"
           then Vim can't open files under MS-Windows 98. (Antoine J.
           Mechelynck)
Solution:   Don't use _wstat(), _wopen() and _wfopen() in this situation.
Files:      src/os_mswin.c, src/os_win32.c


*** ../vim-6.3b.002/src/os_mswin.c      Sun May 16 22:38:45 2004
--- src/os_mswin.c      Tue May 25 17:42:22 2004
***************
*** 451,457 ****
     if (p > buf && (*p == '\\' || *p == '/') && p[-1] != ':')
       *p = NUL;
 #ifdef FEAT_MBYTE
!     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
     {
       WCHAR   *wp = enc_to_ucs2(buf, NULL);
       int     n;
--- 451,462 ----
     if (p > buf && (*p == '\\' || *p == '/') && p[-1] != ':')
       *p = NUL;
 #ifdef FEAT_MBYTE
!     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
! # ifdef __BORLANDC__
!           /* Wide functions of Borland C 5.5 do not work on Windows 98. */
!           && g_PlatformId == VER_PLATFORM_WIN32_NT
! # endif
!        )
     {
       WCHAR   *wp = enc_to_ucs2(buf, NULL);
       int     n;
*** ../vim-6.3b.002/src/os_win32.c      Sun May 16 22:38:45 2004
--- src/os_win32.c      Tue May 25 17:43:31 2004
***************
*** 4463,4469 ****
     WCHAR     *wn;
     int               f;

!     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
     {
       wn = enc_to_ucs2(name, NULL);
       if (wn != NULL)
--- 4463,4474 ----
     WCHAR     *wn;
     int               f;

!     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
! # ifdef __BORLANDC__
!           /* Wide functions of Borland C 5.5 do not work on Windows 98. */
!           && g_PlatformId == VER_PLATFORM_WIN32_NT
! # endif
!        )
     {
       wn = enc_to_ucs2(name, NULL);
       if (wn != NULL)
***************
*** 4490,4496 ****
     WCHAR     *wn, *wm;
     FILE      *f = NULL;

!     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
     {
       wn = enc_to_ucs2(name, NULL);
       wm = enc_to_ucs2(mode, NULL);
--- 4495,4506 ----
     WCHAR     *wn, *wm;
     FILE      *f = NULL;

!     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
! # ifdef __BORLANDC__
!           /* Wide functions of Borland C 5.5 do not work on Windows 98. */
!           && g_PlatformId == VER_PLATFORM_WIN32_NT
! # endif
!        )
     {
       wn = enc_to_ucs2(name, NULL);
       wm = enc_to_ucs2(mode, NULL);
*** ../vim-6.3b.002/src/version.c       Fri May 21 13:40:43 2004
--- src/version.c       Tue May 25 17:45:15 2004
***************
*** 643,644 ****
--- 643,646 ----
 {   /* Add new patch number below this line */
+ /**/
+     3,
 /**/

--
Mrs Abbott: I'm a paediatrician.
    Basil: Feet?
Mrs Abbott: Children.
    Sybil: Oh, Basil!
    Basil: Well, children have feet, don't they? That's how they move
           around, my dear. You must take a look next time, it's most
           interesting.                               (Fawlty Towers)

/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
\\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///