Mercurial > vim
diff src/winclip.c @ 15868:7fad90423bd2 v8.1.0941
patch 8.1.0941: macros for MS-Windows are inconsistent
commit https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 17 17:44:42 2019 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Feb 2019 17:45:08 +0100 |
parents | 62b3805506b3 |
children | 209f65bb155f |
line wrap: on
line diff
--- a/src/winclip.c +++ b/src/winclip.c @@ -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 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 } 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 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 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]".