forked from aniani/vim
patch 8.1.0941: macros for MS-Windows are inconsistent
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes #3932)
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* posix environment.
|
||||
*/
|
||||
#ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
|
||||
# define WIN3264
|
||||
# define MSWIN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# include "winclip.pro"
|
||||
@@ -299,7 +299,7 @@ clip_mch_request_selection(VimClipboard *cbd)
|
||||
VimClipType_t metadata = { -1, -1, -1, -1 };
|
||||
HGLOBAL hMem = NULL;
|
||||
char_u *str = NULL;
|
||||
#if defined(WIN3264)
|
||||
#if defined(MSWIN)
|
||||
char_u *to_free = NULL;
|
||||
#endif
|
||||
HGLOBAL rawh = NULL;
|
||||
@@ -361,7 +361,7 @@ clip_mch_request_selection(VimClipboard *cbd)
|
||||
}
|
||||
if (str == NULL)
|
||||
{
|
||||
#if defined(WIN3264)
|
||||
#if defined(MSWIN)
|
||||
/* Try to get the clipboard in Unicode if it's not an empty string. */
|
||||
if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0)
|
||||
{
|
||||
@@ -417,7 +417,7 @@ clip_mch_request_selection(VimClipboard *cbd)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(WIN3264)
|
||||
#if defined(MSWIN)
|
||||
/* The text is in the active codepage. Convert to
|
||||
* 'encoding', going through UTF-16. */
|
||||
acp_to_enc(str, str_size, &to_free, &maxlen);
|
||||
@@ -454,7 +454,7 @@ clip_mch_request_selection(VimClipboard *cbd)
|
||||
if (rawh != NULL)
|
||||
GlobalUnlock(rawh);
|
||||
CloseClipboard();
|
||||
#if defined(WIN3264)
|
||||
#if defined(MSWIN)
|
||||
vim_free(to_free);
|
||||
#endif
|
||||
}
|
||||
@@ -471,7 +471,7 @@ clip_mch_set_selection(VimClipboard *cbd)
|
||||
HGLOBAL hMemRaw = NULL;
|
||||
HGLOBAL hMem = NULL;
|
||||
HGLOBAL hMemVim = NULL;
|
||||
# if defined(WIN3264)
|
||||
# if defined(MSWIN)
|
||||
HGLOBAL hMemW = NULL;
|
||||
# endif
|
||||
|
||||
@@ -508,7 +508,7 @@ clip_mch_set_selection(VimClipboard *cbd)
|
||||
metadata.rawlen = 0;
|
||||
}
|
||||
|
||||
# if defined(WIN3264)
|
||||
# if defined(MSWIN)
|
||||
{
|
||||
WCHAR *out;
|
||||
int len = metadata.txtlen;
|
||||
@@ -590,7 +590,7 @@ clip_mch_set_selection(VimClipboard *cbd)
|
||||
{
|
||||
SetClipboardData(cbd->format, hMemVim);
|
||||
hMemVim = 0;
|
||||
# if defined(WIN3264)
|
||||
# if defined(MSWIN)
|
||||
if (hMemW != NULL)
|
||||
{
|
||||
if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL)
|
||||
@@ -611,7 +611,7 @@ clip_mch_set_selection(VimClipboard *cbd)
|
||||
GlobalFree(hMemRaw);
|
||||
if (hMem)
|
||||
GlobalFree(hMem);
|
||||
# if defined(WIN3264)
|
||||
# if defined(MSWIN)
|
||||
if (hMemW)
|
||||
GlobalFree(hMemW);
|
||||
# endif
|
||||
@@ -746,7 +746,7 @@ utf16_to_enc(short_u *str, int *lenp)
|
||||
return enc_str;
|
||||
}
|
||||
|
||||
#if defined(WIN3264) || defined(PROTO)
|
||||
#if defined(MSWIN) || defined(PROTO)
|
||||
/*
|
||||
* Convert from the active codepage to 'encoding'.
|
||||
* Input is "str[str_size]".
|
||||
|
Reference in New Issue
Block a user