Mercurial > vim
diff src/os_mswin.c @ 16606:7e733046db1d v8.1.1306
patch 8.1.1306: Borland support is outdated and doesn't work
commit https://github.com/vim/vim/commit/eae1b91fea74842000fc055afc74fe2e7934c6ee
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 9 15:12:55 2019 +0200
patch 8.1.1306: Borland support is outdated and doesn't work
Problem: Borland support is outdated and doesn't work.
Solution: Remove Borland support, there are other (free) compilers
available. (Thomas Dziedzic, Ken Takata, closes #4364)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 May 2019 15:15:07 +0200 |
parents | 7ae2396cef62 |
children | ef00b6bc186b |
line wrap: on
line diff
--- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -172,26 +172,6 @@ int _chdrive(int drive) return !SetCurrentDirectory(temp); } # endif -#else -# ifdef __BORLANDC__ -/* being a more ANSI compliant compiler, BorlandC doesn't define _stricoll: - * but it does in BC 5.02! */ -# if __BORLANDC__ < 0x502 -int _stricoll(char *a, char *b) -{ -# if 1 - // this is fast but not correct: - return stricmp(a, b); -# else - // the ANSI-ish correct way is to use strxfrm(): - char a_buff[512], b_buff[512]; // file names, so this is enough on Win32 - strxfrm(a_buff, a, 512); - strxfrm(b_buff, b, 512); - return strcoll(a_buff, b_buff); -# endif -} -# endif -# endif #endif @@ -374,30 +354,22 @@ mch_FullName( int force UNUSED) { int nResult = FAIL; - -#ifdef __BORLANDC__ - if (*fname == NUL) /* Borland behaves badly here - make it consistent */ - nResult = mch_dirname(buf, len); - else -#endif + WCHAR *wname; + WCHAR wbuf[MAX_PATH]; + char_u *cname = NULL; + + wname = enc_to_utf16(fname, NULL); + if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL) { - WCHAR *wname; - WCHAR wbuf[MAX_PATH]; - char_u *cname = NULL; - - wname = enc_to_utf16(fname, NULL); - if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL) + cname = utf16_to_enc((short_u *)wbuf, NULL); + if (cname != NULL) { - cname = utf16_to_enc((short_u *)wbuf, NULL); - if (cname != NULL) - { - vim_strncpy(buf, cname, len - 1); - nResult = OK; - } + vim_strncpy(buf, cname, len - 1); + nResult = OK; } - vim_free(wname); - vim_free(cname); } + vim_free(wname); + vim_free(cname); #ifdef USE_FNAME_CASE fname_case(buf, len); @@ -2044,9 +2016,6 @@ serverSendEnc(HWND target) * Clean up on exit. This destroys the hidden message window. */ static void -#ifdef __BORLANDC__ - _RTLENTRYF -#endif CleanUpMessaging(void) { if (message_window != 0)