comparison src/os_win32.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 29a0a549c790
children e3feaa3e5f10
comparison
equal deleted inserted replaced
16605:50115650f6c7 16606:7e733046db1d
144 typedef int PROCESS_INFORMATION; 144 typedef int PROCESS_INFORMATION;
145 typedef int LPSECURITY_ATTRIBUTES; 145 typedef int LPSECURITY_ATTRIBUTES;
146 # define __stdcall /* empty */ 146 # define __stdcall /* empty */
147 #endif 147 #endif
148 148
149 #if defined(__BORLANDC__)
150 /* Strangely Borland uses a non-standard name. */
151 # define wcsicmp(a, b) wcscmpi((a), (b))
152 #endif
153
154 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) 149 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
155 /* Win32 Console handles for input and output */ 150 /* Win32 Console handles for input and output */
156 static HANDLE g_hConIn = INVALID_HANDLE_VALUE; 151 static HANDLE g_hConIn = INVALID_HANDLE_VALUE;
157 static HANDLE g_hConOut = INVALID_HANDLE_VALUE; 152 static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
158 153
939 # define UChar uChar.UnicodeChar 934 # define UChar uChar.UnicodeChar
940 #endif 935 #endif
941 936
942 /* The return code indicates key code size. */ 937 /* The return code indicates key code size. */
943 static int 938 static int
944 #ifdef __BORLANDC__
945 __stdcall
946 #endif
947 win32_kbd_patch_key( 939 win32_kbd_patch_key(
948 KEY_EVENT_RECORD *pker) 940 KEY_EVENT_RECORD *pker)
949 { 941 {
950 UINT uMods = pker->dwControlKeyState; 942 UINT uMods = pker->dwControlKeyState;
951 static int s_iIsDead = 0; 943 static int s_iIsDead = 0;
6693 * Version of open() that may use UTF-16 file name. 6685 * Version of open() that may use UTF-16 file name.
6694 */ 6686 */
6695 int 6687 int
6696 mch_open(const char *name, int flags, int mode) 6688 mch_open(const char *name, int flags, int mode)
6697 { 6689 {
6698 /* _wopen() does not work with Borland C 5.5: creates a read-only file. */
6699 #ifndef __BORLANDC__
6700 WCHAR *wn; 6690 WCHAR *wn;
6701 int f; 6691 int f;
6702 6692
6703 wn = enc_to_utf16((char_u *)name, NULL); 6693 wn = enc_to_utf16((char_u *)name, NULL);
6704 if (wn == NULL) 6694 if (wn == NULL)
6705 return -1; 6695 return -1;
6706 6696
6707 f = _wopen(wn, flags, mode); 6697 f = _wopen(wn, flags, mode);
6708 vim_free(wn); 6698 vim_free(wn);
6709 return f; 6699 return f;
6710 #else
6711 /* open() can open a file which name is longer than _MAX_PATH bytes
6712 * and shorter than _MAX_PATH characters successfully, but sometimes it
6713 * causes unexpected error in another part. We make it an error explicitly
6714 * here. */
6715 if (strlen(name) >= _MAX_PATH)
6716 return -1;
6717
6718 return open(name, flags, mode);
6719 #endif
6720 } 6700 }
6721 6701
6722 /* 6702 /*
6723 * Version of fopen() that uses UTF-16 file name. 6703 * Version of fopen() that uses UTF-16 file name.
6724 */ 6704 */