diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-09 15:12:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-09 15:12:55 +0200 |
commit | eae1b91fea74842000fc055afc74fe2e7934c6ee (patch) | |
tree | 71fe047a88c21932a4c919c47b5d19847ee65471 /src/os_mswin.c | |
parent | 691ddeefb545d8488e5a495af61caba2e57b3de9 (diff) |
patch 8.1.1306: Borland support is outdated and doesn't workv8.1.1306
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)
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r-- | src/os_mswin.c | 53 |
1 files changed, 11 insertions, 42 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c index 9179e9b2d9..fc6806d88b 100644 --- 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; + WCHAR *wname; + WCHAR wbuf[MAX_PATH]; + char_u *cname = NULL; -#ifdef __BORLANDC__ - if (*fname == NUL) /* Borland behaves badly here - make it consistent */ - nResult = mch_dirname(buf, len); - else -#endif + 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) |