mirror of
https://github.com/vim/vim.git
synced 2025-10-13 06:54:15 -04:00
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:
@@ -123,7 +123,7 @@ static void f_cosh(typval_T *argvars, typval_T *rettv);
|
||||
static void f_count(typval_T *argvars, typval_T *rettv);
|
||||
static void f_cscope_connection(typval_T *argvars, typval_T *rettv);
|
||||
static void f_cursor(typval_T *argsvars, typval_T *rettv);
|
||||
#ifdef WIN3264
|
||||
#ifdef MSWIN
|
||||
static void f_debugbreak(typval_T *argvars, typval_T *rettv);
|
||||
#endif
|
||||
static void f_deepcopy(typval_T *argvars, typval_T *rettv);
|
||||
@@ -599,7 +599,7 @@ static struct fst
|
||||
{"count", 2, 4, f_count},
|
||||
{"cscope_connection",0,3, f_cscope_connection},
|
||||
{"cursor", 1, 3, f_cursor},
|
||||
#ifdef WIN3264
|
||||
#ifdef MSWIN
|
||||
{"debugbreak", 1, 1, f_debugbreak},
|
||||
#endif
|
||||
{"deepcopy", 1, 2, f_deepcopy},
|
||||
@@ -2884,7 +2884,7 @@ f_cursor(typval_T *argvars, typval_T *rettv)
|
||||
rettv->vval.v_number = 0;
|
||||
}
|
||||
|
||||
#ifdef WIN3264
|
||||
#ifdef MSWIN
|
||||
/*
|
||||
* "debugbreak()" function
|
||||
*/
|
||||
@@ -4137,7 +4137,7 @@ f_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
if (gui.in_use)
|
||||
gui_mch_set_foreground();
|
||||
#else
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
win32_set_foreground();
|
||||
# endif
|
||||
#endif
|
||||
@@ -6152,7 +6152,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef VMS
|
||||
"vms",
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#ifdef MSWIN
|
||||
"win32",
|
||||
#endif
|
||||
#if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__))
|
||||
@@ -6182,7 +6182,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#endif
|
||||
#ifdef FEAT_BEVAL_GUI
|
||||
"balloon_eval",
|
||||
# ifndef FEAT_GUI_W32 /* other GUIs always have multiline balloons */
|
||||
# ifndef FEAT_GUI_MSWIN /* other GUIs always have multiline balloons */
|
||||
"balloon_multiline",
|
||||
# endif
|
||||
#endif
|
||||
@@ -6196,7 +6196,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
# endif
|
||||
#endif
|
||||
#if defined(FEAT_BROWSE) && (defined(USE_FILE_CHOOSER) \
|
||||
|| defined(FEAT_GUI_W32) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MOTIF))
|
||||
"browsefilter",
|
||||
#endif
|
||||
@@ -6322,7 +6322,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef FEAT_GUI_PHOTON
|
||||
"gui_photon",
|
||||
#endif
|
||||
#ifdef FEAT_GUI_W32
|
||||
#ifdef FEAT_GUI_MSWIN
|
||||
"gui_win32",
|
||||
#endif
|
||||
#ifdef FEAT_HANGULIN
|
||||
@@ -6526,7 +6526,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
"termguicolors",
|
||||
#endif
|
||||
#if defined(FEAT_TERMINAL) && !defined(WIN3264)
|
||||
#if defined(FEAT_TERMINAL) && !defined(MSWIN)
|
||||
"terminal",
|
||||
#endif
|
||||
#ifdef TERMINFO
|
||||
@@ -6658,7 +6658,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
n = stdout_isatty;
|
||||
else if (STRICMP(name, "multi_byte_encoding") == 0)
|
||||
n = has_mbyte;
|
||||
#if defined(FEAT_BEVAL) && defined(FEAT_GUI_W32)
|
||||
#if defined(FEAT_BEVAL) && defined(FEAT_GUI_MSWIN)
|
||||
else if (STRICMP(name, "balloon_multiline") == 0)
|
||||
n = multiline_balloon_available();
|
||||
#endif
|
||||
@@ -6731,11 +6731,11 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
else if (STRICMP(name, "netbeans_enabled") == 0)
|
||||
n = netbeans_active();
|
||||
#endif
|
||||
#if defined(FEAT_TERMINAL) && defined(WIN3264)
|
||||
#if defined(FEAT_TERMINAL) && defined(MSWIN)
|
||||
else if (STRICMP(name, "terminal") == 0)
|
||||
n = terminal_enabled();
|
||||
#endif
|
||||
#if defined(FEAT_TERMINAL) && defined(WIN3264)
|
||||
#if defined(FEAT_TERMINAL) && defined(MSWIN)
|
||||
else if (STRICMP(name, "conpty") == 0)
|
||||
n = use_conpty();
|
||||
#endif
|
||||
@@ -9309,7 +9309,7 @@ list2proftime(typval_T *arg, proftime_T *tm)
|
||||
return FAIL;
|
||||
n1 = list_find_nr(arg->vval.v_list, 0L, &error);
|
||||
n2 = list_find_nr(arg->vval.v_list, 1L, &error);
|
||||
# ifdef WIN3264
|
||||
# ifdef MSWIN
|
||||
tm->HighPart = n1;
|
||||
tm->LowPart = n2;
|
||||
# else
|
||||
@@ -9354,7 +9354,7 @@ f_reltime(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
long n1, n2;
|
||||
|
||||
# ifdef WIN3264
|
||||
# ifdef MSWIN
|
||||
n1 = res.HighPart;
|
||||
n2 = res.LowPart;
|
||||
# else
|
||||
@@ -9443,7 +9443,7 @@ remote_common(typval_T *argvars, typval_T *rettv, int expr)
|
||||
char_u *r = NULL;
|
||||
char_u buf[NUMBUFLEN];
|
||||
int timeout = 0;
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
HWND w;
|
||||
# else
|
||||
Window w;
|
||||
@@ -9464,7 +9464,7 @@ remote_common(typval_T *argvars, typval_T *rettv, int expr)
|
||||
if (server_name == NULL)
|
||||
return; /* type error; errmsg already given */
|
||||
keys = tv_get_string_buf(&argvars[1], buf);
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
if (serverSendToVim(server_name, keys, &r, &w, expr, timeout, TRUE) < 0)
|
||||
# else
|
||||
if (serverSendToVim(X_DISPLAY, server_name, keys, &r, &w, expr, timeout,
|
||||
@@ -9522,7 +9522,7 @@ f_remote_expr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
f_remote_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
/* On Win32 it's done in this application. */
|
||||
{
|
||||
char_u *server_name = tv_get_string_chk(&argvars[0]);
|
||||
@@ -9549,7 +9549,7 @@ f_remote_peek(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
dictitem_T v;
|
||||
char_u *s = NULL;
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
long_u n = 0;
|
||||
# endif
|
||||
char_u *serverid;
|
||||
@@ -9565,7 +9565,7 @@ f_remote_peek(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
rettv->vval.v_number = -1;
|
||||
return; /* type error; errmsg already given */
|
||||
}
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
sscanf((const char *)serverid, SCANF_HEX_LONG_U, &n);
|
||||
if (n == 0)
|
||||
rettv->vval.v_number = -1;
|
||||
@@ -9609,7 +9609,7 @@ f_remote_read(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
if (serverid != NULL && !check_restricted() && !check_secure())
|
||||
{
|
||||
int timeout = 0;
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
/* The server's HWND is encoded in the 'id' parameter */
|
||||
long_u n = 0;
|
||||
# endif
|
||||
@@ -9617,7 +9617,7 @@ f_remote_read(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
timeout = tv_get_number(&argvars[1]);
|
||||
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
|
||||
if (n != 0)
|
||||
r = serverGetReply((HWND)n, FALSE, TRUE, TRUE, timeout);
|
||||
@@ -10789,7 +10789,7 @@ f_serverlist(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
char_u *r = NULL;
|
||||
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
# ifdef WIN32
|
||||
# ifdef MSWIN
|
||||
r = serverGetVimNames();
|
||||
# else
|
||||
make_connection();
|
||||
|
Reference in New Issue
Block a user