summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-17 17:44:42 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-17 17:44:42 +0100
commit4f97475d326c2773a78561fb874e4f23c25cbcd9 (patch)
tree7e066bc70556dfbb415ddb9f364e8432e8aaf189
parent78d21dae9c3a39efb30316d3e38dce120bc1abbd (diff)
downloadvim-git-4f97475d326c2773a78561fb874e4f23c25cbcd9.tar.gz
patch 8.1.0941: macros for MS-Windows are inconsistentv8.1.0941
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)
-rw-r--r--src/GvimExt/gvimext.h2
-rw-r--r--src/Make_bc5.mak2
-rw-r--r--src/Make_cyg_ming.mak2
-rw-r--r--src/Make_ivc.mak24
-rw-r--r--src/Make_mvc.mak4
-rw-r--r--src/beval.h6
-rw-r--r--src/blowfish.c2
-rw-r--r--src/channel.c56
-rw-r--r--src/edit.c6
-rw-r--r--src/eval.c18
-rw-r--r--src/evalfunc.c44
-rw-r--r--src/ex_cmds.c10
-rw-r--r--src/ex_cmds2.c46
-rw-r--r--src/ex_docmd.c6
-rw-r--r--src/ex_getln.c6
-rw-r--r--src/feature.h48
-rw-r--r--src/fileio.c54
-rw-r--r--src/getchar.c6
-rw-r--r--src/glbl_ime.cpp2
-rw-r--r--src/globals.h10
-rw-r--r--src/gui.c18
-rw-r--r--src/gui.h4
-rw-r--r--src/gui_beval.c12
-rw-r--r--src/gui_gtk.c2
-rw-r--r--src/gui_gtk_f.c2
-rw-r--r--src/gui_gtk_x11.c2
-rw-r--r--src/if_cscope.c24
-rw-r--r--src/if_cscope.h4
-rw-r--r--src/if_lua.c2
-rw-r--r--src/if_mzsch.c12
-rw-r--r--src/if_ole.cpp2
-rw-r--r--src/if_perl.xs6
-rw-r--r--src/if_python.c4
-rw-r--r--src/if_python3.c4
-rw-r--r--src/if_ruby.c10
-rw-r--r--src/if_tcl.c6
-rw-r--r--src/macros.h8
-rw-r--r--src/main.c62
-rw-r--r--src/mbyte.c40
-rw-r--r--src/memfile.c4
-rw-r--r--src/memline.c22
-rw-r--r--src/menu.c46
-rw-r--r--src/message.c14
-rw-r--r--src/misc1.c18
-rw-r--r--src/misc2.c14
-rw-r--r--src/nbdebug.c2
-rw-r--r--src/netbeans.c6
-rw-r--r--src/normal.c2
-rw-r--r--src/option.c62
-rw-r--r--src/option.h14
-rw-r--r--src/os_mswin.c4
-rw-r--r--src/os_unix.c2
-rw-r--r--src/os_w32exe.c4
-rw-r--r--src/os_win32.c72
-rw-r--r--src/os_win32.h4
-rw-r--r--src/proto.h4
-rw-r--r--src/screen.c4
-rw-r--r--src/search.c2
-rw-r--r--src/structs.h16
-rw-r--r--src/syntax.c8
-rw-r--r--src/term.c15
-rw-r--r--src/terminal.c50
-rw-r--r--src/ui.c8
-rw-r--r--src/undo.c4
-rw-r--r--src/version.c18
-rw-r--r--src/vim.h55
-rw-r--r--src/vim.rc4
-rw-r--r--src/winclip.c20
68 files changed, 537 insertions, 539 deletions
diff --git a/src/GvimExt/gvimext.h b/src/GvimExt/gvimext.h
index e17f2ac2c..7a4e009fd 100644
--- a/src/GvimExt/gvimext.h
+++ b/src/GvimExt/gvimext.h
@@ -31,7 +31,7 @@
# define STRICT
#endif
-#define INC_OLE2 // WIN32, get ole2 from windows.h
+#define INC_OLE2 // MS-Windows, get ole2 from windows.h
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if defined(_MSC_VER) && _MSC_VER >= 1400
diff --git a/src/Make_bc5.mak b/src/Make_bc5.mak
index 30fe727b2..04f78854d 100644
--- a/src/Make_bc5.mak
+++ b/src/Make_bc5.mak
@@ -405,7 +405,7 @@ DEFINES = $(DEFINES) -DFEAT_CSCOPE
!endif
!if ("$(GUI)"=="yes")
-DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
+DEFINES = $(DEFINES) -DFEAT_GUI -DFEAT_CLIPBOARD
!if ("$(DEBUG)"=="yes")
TARGET = gvimd.exe
!else
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
index f6ae85316..06bf07a10 100644
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
@@ -491,7 +491,7 @@ endif # RUBY
# See feature.h for a list of options.
# Any other defines can be included here.
-DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
+DEF_GUI=-DFEAT_GUI -DFEAT_CLIPBOARD
DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
-DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
ifeq ($(ARCH),x86-64)
diff --git a/src/Make_ivc.mak b/src/Make_ivc.mak
index 26367e096..02910bcf4 100644
--- a/src/Make_ivc.mak
+++ b/src/Make_ivc.mak
@@ -92,8 +92,8 @@ LINK32_FLAGS= oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg3
# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib version.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo /machine:I386 /nodefaultlib
# SUBTRACT LINK32 /incremental:yes
-RSC_PROJ= /l 0x409 /d "FEAT_GUI_W32"
-# ADD RSC /l 0x409 /d "FEAT_GUI_W32"
+RSC_PROJ= /l 0x409 /d "FEAT_GUI"
+# ADD RSC /l 0x409 /d "FEAT_GUI"
!IF "$(CFG)" == "Vim - Win32 Release gvim OLE"
@@ -105,8 +105,8 @@ INTDIR=.\oleRel
VIM=gvim
EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
-CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
-# ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
+# ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/
RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
# ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
@@ -124,8 +124,8 @@ INTDIR=.\oleDbg
VIM=gvimd
EXTRAS="$(INTDIR)/if_ole.obj" "$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
-CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
-# ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
+# ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "DYNAMIC_GETTEXT" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/
RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
# ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
@@ -144,8 +144,8 @@ INTDIR=.\gRel
VIM=gvim
EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
-CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /Fd.\gRel/ /Fo.\gRel/
-# ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /Fd.\gRel/ /Fo.\gRel/
+CPP_PROJ=$(CPP_PROJ) /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /Fd.\gRel/ /Fo.\gRel/
+# ADD CPP /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /Fd.\gRel/ /Fo.\gRel/
RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
# ADD RSC /d "NDEBUG" /fo.\gRel\vim.res
@@ -163,8 +163,8 @@ INTDIR=.\gDbg
VIM=gvimd
EXTRAS="$(INTDIR)/vim.res" "$(INTDIR)/gui.obj" "$(INTDIR)/gui_w32.obj" "$(INTDIR)/gui_beval.obj" "$(INTDIR)/os_w32exe.obj"
-CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /Fd.\gDbg/ /Fo.\gDbg/
-# ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /Fd.\gDbg/ /Fo.\gDbg/
+CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /Fd.\gDbg/ /Fo.\gDbg/
+# ADD CPP /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /Fd.\gDbg/ /Fo.\gDbg/
RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
# ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res
@@ -508,7 +508,7 @@ SOURCE=.\if_ole.cpp
# Begin Custom Build
"$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
- cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /O2 /D "NDEBUG" /D "FEAT_GUI_W32" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/ /I ".\oleRel" .\if_ole.cpp
+ cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /O2 /D "NDEBUG" /D "FEAT_GUI" /D "FEAT_OLE" /Fd.\oleRel/ /Fo.\oleRel/ /I ".\oleRel" .\if_ole.cpp
@rem This is the default rule with /I "$(IntDir)" added
# End Custom Build
@@ -519,7 +519,7 @@ SOURCE=.\if_ole.cpp
# Begin Custom Build
"$(INTDIR)\if_ole.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\if_ole.h"
- cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /Od /D "_DEBUG" /D "FEAT_GUI_W32" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/ /I ".\oleDbg" .\if_ole.cpp
+ cl.exe /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c /Zi /Od /D "_DEBUG" /D "FEAT_GUI" /D "FEAT_OLE" /Fd.\oleDbg/ /Fo.\oleDbg/ /I ".\oleDbg" .\if_ole.cpp
@rem This is the default rule with /I "$(IntDir)" added
# End Custom Build
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index c81fbd296..391277fe7 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -791,8 +791,8 @@ OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTDIR)\glbl_ime.obj
!if "$(GUI)" == "yes"
SUBSYSTEM = windows
-CFLAGS = $(CFLAGS) -DFEAT_GUI_W32
-RCFLAGS = $(RCFLAGS) -DFEAT_GUI_W32
+CFLAGS = $(CFLAGS) -DFEAT_GUI
+RCFLAGS = $(RCFLAGS) -DFEAT_GUI
VIM = g$(VIM)
GUI_INCL = \
gui.h
diff --git a/src/beval.h b/src/beval.h
index 21900c5ad..090c5fb55 100644
--- a/src/beval.h
+++ b/src/beval.h
@@ -43,7 +43,7 @@ typedef struct BalloonEvalStruct
int y;
unsigned int state; /* Button/Modifier key state */
# else
-# if !defined(FEAT_GUI_W32)
+# if !defined(FEAT_GUI_MSWIN)
Widget target; /* widget we are monitoring */
Widget balloonShell;
Widget balloonLabel;
@@ -63,7 +63,7 @@ typedef struct BalloonEvalStruct
BeState showState; /* tells us whats currently going on */
# endif
# endif
-# if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
+# if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)
Dimension screen_width; /* screen width in pixels */
Dimension screen_height; /* screen height in pixels */
# endif
@@ -76,7 +76,7 @@ typedef struct BalloonEvalStruct
int *vts; // vartabstop setting for this buffer
#endif
char_u *msg;
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
void *tofree;
#endif
} BalloonEval;
diff --git a/src/blowfish.c b/src/blowfish.c
index 8ca0e2848..7bc3e31d3 100644
--- a/src/blowfish.c
+++ b/src/blowfish.c
@@ -34,7 +34,7 @@ typedef union {
char_u uc[8];
} block8;
-#if defined(WIN3264)
+#if defined(MSWIN)
/* MS-Windows is always little endian */
#else
# ifdef HAVE_CONFIG_H
diff --git a/src/channel.c b/src/channel.c
index d728c77d9..57bb4ccff 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -20,7 +20,7 @@
#endif
/* Note: when making changes here also adjust configure.ac. */
-#ifdef WIN32
+#ifdef MSWIN
/* WinSock API is separated from C API, thus we can't use read(), write(),
* errno... */
# define SOCK_ERRNO errno = WSAGetLastError()
@@ -65,7 +65,7 @@ static int safe_to_invoke_callback = 0;
static char *part_names[] = {"sock", "out", "err", "in"};
-#ifdef WIN32
+#ifdef MSWIN
static int
fd_read(sock_T fd, char *buf, size_t len)
{
@@ -234,7 +234,7 @@ ch_error(channel_T *ch, const char *fmt, ...)
}
}
-#ifdef _WIN32
+#ifdef MSWIN
# undef PERROR
# define PERROR(msg) (void)semsg("%s: %s", msg, strerror_win32(errno))
@@ -687,7 +687,7 @@ channel_open(
int sd = -1;
struct sockaddr_in server;
struct hostent *host;
-#ifdef WIN32
+#ifdef MSWIN
u_short port = port_in;
u_long val = 1;
#else
@@ -696,7 +696,7 @@ channel_open(
channel_T *channel;
int ret;
-#ifdef WIN32
+#ifdef MSWIN
channel_init_winsock();
#endif
@@ -758,7 +758,7 @@ channel_open(
{
/* Make connect() non-blocking. */
if (
-#ifdef _WIN32
+#ifdef MSWIN
ioctlsocket(sd, FIONBIO, &val) < 0
#else
fcntl(sd, F_SETFL, O_NONBLOCK) < 0
@@ -804,14 +804,14 @@ channel_open(
/* If connect() didn't finish then try using select() to wait for the
* connection to be made. For Win32 always use select() to wait. */
-#ifndef WIN32
+#ifndef MSWIN
if (errno != ECONNREFUSED)
#endif
{
struct timeval tv;
fd_set rfds;
fd_set wfds;
-#ifndef WIN32
+#ifndef MSWIN
int so_error = 0;
socklen_t so_error_len = sizeof(so_error);
struct timeval start_tv;
@@ -824,7 +824,7 @@ channel_open(
tv.tv_sec = waitnow / 1000;
tv.tv_usec = (waitnow % 1000) * 1000;
-#ifndef WIN32
+#ifndef MSWIN
gettimeofday(&start_tv, NULL);
#endif
ch_log(channel,
@@ -842,7 +842,7 @@ channel_open(
return NULL;
}
-#ifdef WIN32
+#ifdef MSWIN
/* On Win32: select() is expected to work and wait for up to
* "waitnow" msec for the socket to be open. */
if (FD_ISSET(sd, &wfds))
@@ -893,7 +893,7 @@ channel_open(
#endif
}
-#ifndef WIN32
+#ifndef MSWIN
if (waittime > 1 && elapsed_msec < waittime)
{
/* The port isn't ready but we also didn't get an error.
@@ -930,7 +930,7 @@ channel_open(
if (waittime >= 0)
{
-#ifdef _WIN32
+#ifdef MSWIN
val = 0;
ioctlsocket(sd, FIONBIO, &val);
#else
@@ -1029,7 +1029,7 @@ ch_close_part(channel_T *channel, ch_part_T part)
&& (part == PART_OUT || channel->CH_OUT_FD != *fd)
&& (part == PART_ERR || channel->CH_ERR_FD != *fd))
{
-#ifdef WIN32
+#ifdef MSWIN
if (channel->ch_named_pipe)
DisconnectNamedPipe((HANDLE)fd);
#endif
@@ -1427,7 +1427,7 @@ can_write_buf_line(channel_T *channel)
in_part->ch_block_write = 1;
/* TODO: Win32 implementation, probably using WaitForMultipleObjects() */
-#ifndef WIN32
+#ifndef MSWIN
{
# if defined(HAVE_SELECT)
struct timeval tval;
@@ -1759,7 +1759,7 @@ channel_get_all(channel_T *channel, ch_part_T part, int *outlen)
{
if (*p == NUL)
*p = NL;
-#ifdef WIN32
+#ifdef MSWIN
else if (*p == 0x1b)
{
// crush the escape sequence OSC 0/1/2: ESC ]0;
@@ -2064,7 +2064,7 @@ channel_parse_json(channel_T *channel, ch_part_T part)
(int)buflen);
reader.js_used = 0;
chanpart->ch_wait_len = buflen;
-#ifdef WIN32
+#ifdef MSWIN
chanpart->ch_deadline = GetTickCount() + 100L;
#else
gettimeofday(&chanpart->ch_deadline, NULL);
@@ -2079,7 +2079,7 @@ channel_parse_json(channel_T *channel, ch_part_T part)
else
{
int timeout;
-#ifdef WIN32
+#ifdef MSWIN
timeout = GetTickCount() > chanpart->ch_deadline;
#else
{
@@ -3198,7 +3198,7 @@ channel_wait(channel_T *channel, sock_T fd, int timeout)
if (timeout > 0)
ch_log(channel, "Waiting for up to %d msec", timeout);
-# ifdef WIN32
+# ifdef MSWIN
if (fd != channel->CH_SOCK_FD)
{
DWORD nread;
@@ -3554,7 +3554,7 @@ channel_read_json_block(
timeout = timeout_arg;
if (chanpart->ch_wait_len > 0)
{
-#ifdef WIN32
+#ifdef MSWIN
timeout = chanpart->ch_deadline - GetTickCount() + 1;
#else
{
@@ -3680,7 +3680,7 @@ theend:
free_job_options(&opt);
}
-# if defined(WIN32) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
+# if defined(MSWIN) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
|| defined(PROTO)
/*
* Lookup the channel from the socket. Set "partp" to the fd index.
@@ -3707,7 +3707,7 @@ channel_fd2channel(sock_T fd, ch_part_T *partp)
}
# endif
-# if defined(WIN32) || defined(FEAT_GUI) || defined(PROTO)
+# if defined(MSWIN) || defined(FEAT_GUI) || defined(PROTO)
/*
* Check the channels for anything that is ready to be read.
* The data is put in the read queue.
@@ -3772,7 +3772,7 @@ channel_set_nonblock(channel_T *channel, ch_part_T part)
if (fd != INVALID_FD)
{
-#ifdef _WIN32
+#ifdef MSWIN
u_long val = 1;
ioctlsocket(fd, FIONBIO, &val);
@@ -3853,7 +3853,7 @@ channel_send(
else
{
res = fd_write(fd, (char *)buf, len);
-#ifdef WIN32
+#ifdef MSWIN
if (channel->ch_named_pipe && res < 0)
{
DisconnectNamedPipe((HANDLE)fd);
@@ -4213,7 +4213,7 @@ channel_poll_check(int ret_in, void *fds_in)
}
# endif /* UNIX && !HAVE_SELECT */
-# if (!defined(WIN32) && defined(HAVE_SELECT)) || defined(PROTO)
+# if (!defined(MSWIN) && defined(HAVE_SELECT)) || defined(PROTO)
/*
* The "fd_set" type is hidden to avoid problems with the function proto.
@@ -4313,7 +4313,7 @@ channel_select_check(int ret_in, void *rfds_in, void *wfds_in)
return ret;
}
-# endif /* !WIN32 && HAVE_SELECT */
+# endif /* !MSWIN && HAVE_SELECT */
/*
* Execute queued up commands.
@@ -5039,7 +5039,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
break;
opt->jo_cwd = tv_get_string_buf_chk(item, opt->jo_cwd_buf);
if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)
-#ifndef WIN32 // Win32 directories don't have the concept of "executable"
+#ifndef MSWIN // Win32 directories don't have the concept of "executable"
|| mch_access((char *)opt->jo_cwd, X_OK) != 0
#endif
)
@@ -5199,7 +5199,7 @@ job_free_contents(job_T *job)
#ifdef UNIX
vim_free(job->jv_termsig);
#endif
-#ifdef WIN3264
+#ifdef MSWIN
vim_free(job->jv_tty_type);
#endif
free_callback(job->jv_exit_cb, job->jv_exit_partial);
@@ -5971,7 +5971,7 @@ job_info(job_T *job, dict_T *dict)
#ifdef UNIX
dict_add_string(dict, "termsig", job->jv_termsig);
#endif
-#ifdef WIN3264
+#ifdef MSWIN
dict_add_string(dict, "tty_type", job->jv_tty_type);
#endif
diff --git a/src/edit.c b/src/edit.c
index 62ff03d96..2f81b52df 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1247,9 +1247,9 @@ doESCkey:
did_cursorhold = TRUE;
break;
-#ifdef FEAT_GUI_W32
- /* On Win32 ignore <M-F4>, we get it when closing the window was
- * cancelled. */
+#ifdef FEAT_GUI_MSWIN
+ /* On MS-Windows ignore <M-F4>, we get it when closing the window
+ * was cancelled. */
case K_F4:
if (mod_mask != MOD_MASK_ALT)
goto normalchar;
diff --git a/src/eval.c b/src/eval.c
index 56a26b1ae..f66d29650 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7460,7 +7460,7 @@ tv_get_string_buf_chk(typval_T *varp, char_u *buf)
# ifdef UNIX
vim_snprintf((char *)buf, NUMBUFLEN,
"process %ld %s", (long)job->jv_pid, status);
-# elif defined(WIN32)
+# elif defined(MSWIN)
vim_snprintf((char *)buf, NUMBUFLEN,
"process %ld %s",
(long)job->jv_proc_info.dwProcessId,
@@ -9956,7 +9956,7 @@ var_exists(char_u *var)
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO)
-#ifdef WIN3264
+#ifdef MSWIN
/*
* Functions for ":8" filename modifier: get 8.3 version of a filename.
*/
@@ -10191,7 +10191,7 @@ shortpath_for_partial(
return OK;
}
-#endif /* WIN3264 */
+#endif // MSWIN
/*
* Adjust a filename, according to a string of modifiers.
@@ -10215,7 +10215,7 @@ modify_fname(
char_u dirname[MAXPATHL];
int c;
int has_fullname = 0;
-#ifdef WIN3264
+#ifdef MSWIN
char_u *fname_start = *fnamep;
int has_shortname = 0;
#endif
@@ -10270,7 +10270,7 @@ repeat:
return -1;
}
-#ifdef WIN3264
+#ifdef MSWIN
# if _WIN32_WINNT >= 0x0500
if (vim_strchr(*fnamep, '~') != NULL)
{
@@ -10313,7 +10313,7 @@ repeat:
*usedlen += 2;
if (c == '8')
{
-#ifdef WIN3264
+#ifdef MSWIN
has_shortname = 1; /* Postpone this. */
#endif
continue;
@@ -10406,12 +10406,12 @@ repeat:
if (src[*usedlen] == ':' && src[*usedlen + 1] == '8')
{
*usedlen += 2;
-#ifdef WIN3264
+#ifdef MSWIN
has_shortname = 1;
#endif
}
-#ifdef WIN3264
+#ifdef MSWIN
/*
* Handle ":8" after we have done 'heads' and before we do 'tails'.
*/
@@ -10455,7 +10455,7 @@ repeat:
*fnamelen = l;
}
}
-#endif /* WIN3264 */
+#endif // MSWIN
/* ":t" - tail, just the basename */
if (src[*usedlen] == ':' && src[*usedlen + 1] == 't')
diff --git a/src/evalfunc.c b/src/evalfunc.c
index e9f63423a..e94d875da 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -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();
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 79b9bc11d..da10c1291 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1618,7 +1618,7 @@ do_shell(
*/
#ifndef FEAT_GUI_MSWIN
if (cmd == NULL
-# ifdef WIN3264
+# ifdef MSWIN
|| (winstart && !need_wait_return)
# endif
)
@@ -1643,7 +1643,7 @@ do_shell(
# endif
no_wait_return = save_nwr;
}
-#endif /* FEAT_GUI_W32 */
+#endif /* FEAT_GUI_MSWIN */
#ifdef MSWIN
if (!winstart) /* if winstart==TRUE, never stopped termcap! */
@@ -1935,7 +1935,7 @@ write_viminfo(char_u *file, int forceit)
int shortname = FALSE; /* use 8.3 file name */
stat_T st_old; /* mch_stat() of existing viminfo file */
#endif
-#ifdef WIN3264
+#ifdef MSWIN
int hidden = FALSE;
#endif
@@ -1999,7 +1999,7 @@ write_viminfo(char_u *file, int forceit)
goto end;
}
#endif
-#ifdef WIN3264
+#ifdef MSWIN
/* Get the file attributes of the existing viminfo file. */
hidden = mch_ishidden(fname);
#endif
@@ -2195,7 +2195,7 @@ write_viminfo(char_u *file, int forceit)
++viminfo_errcnt;
semsg(_("E886: Can't rename viminfo file to %s!"), fname);
}
-# ifdef WIN3264
+# ifdef MSWIN
/* If the viminfo file was hidden then also hide the new file. */
else if (hidden)
mch_hide(fname);
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 4bf207272..5418804c5 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1048,7 +1048,7 @@ dbg_breakpoint(char_u *name, linenr_T lnum)
void
profile_start(proftime_T *tm)
{
-# ifdef WIN3264
+# ifdef MSWIN
QueryPerformanceCounter(tm);
# else
gettimeofday(tm, NULL);
@@ -1063,7 +1063,7 @@ profile_end(proftime_T *tm)
{
proftime_T now;
-# ifdef WIN3264
+# ifdef MSWIN
QueryPerformanceCounter(&now);
tm->QuadPart = now.QuadPart - tm->QuadPart;
# else
@@ -1084,7 +1084,7 @@ profile_end(proftime_T *tm)
void
profile_sub(proftime_T *tm, proftime_T *tm2)
{
-# ifdef WIN3264
+# ifdef MSWIN
tm->QuadPart -= tm2->QuadPart;
# else
tm->tv_usec -= tm2->tv_usec;
@@ -1106,7 +1106,7 @@ profile_msg(proftime_T *tm)
{
static char buf[50];
-# ifdef WIN3264
+# ifdef MSWIN
LARGE_INTEGER fr;
QueryPerformanceFrequency(&fr);
@@ -1124,7 +1124,7 @@ profile_msg(proftime_T *tm)
float_T
profile_float(proftime_T *tm)
{
-# ifdef WIN3264
+# ifdef MSWIN
LARGE_INTEGER fr;
QueryPerformanceFrequency(&fr);
@@ -1145,7 +1145,7 @@ profile_setlimit(long msec, proftime_T *tm)
profile_zero(tm);
else
{
-# ifdef WIN3264
+# ifdef MSWIN
LARGE_INTEGER fr;
QueryPerformanceCounter(tm);
@@ -1170,7 +1170,7 @@ profile_passed_limit(proftime_T *tm)
{
proftime_T now;
-# ifdef WIN3264
+# ifdef MSWIN
if (tm->QuadPart == 0) /* timer was not set */
return FALSE;
QueryPerformanceCounter(&now);
@@ -1190,7 +1190,7 @@ profile_passed_limit(proftime_T *tm)
void
profile_zero(proftime_T *tm)
{
-# ifdef WIN3264
+# ifdef MSWIN
tm->QuadPart = 0;
# else
tm->tv_usec = 0;
@@ -1207,7 +1207,7 @@ static long last_timer_id = 0;
long
proftime_time_left(proftime_T *due, proftime_T *now)
{
-# ifdef WIN3264
+# ifdef MSWIN
LARGE_INTEGER fr;
if (now->QuadPart > due->QuadPart)
@@ -1592,7 +1592,7 @@ profile_divide(proftime_T *tm, int count, proftime_T *tm2)
profile_zero(tm2);
else
{
-# ifdef WIN3264
+# ifdef MSWIN
tm2->QuadPart = tm->QuadPart / count;
# else
double usec = (tm->tv_sec * 1000000.0 + tm->tv_usec) / count;
@@ -1617,7 +1617,7 @@ static proftime_T prof_wait_time;
void
profile_add(proftime_T *tm, proftime_T *tm2)
{
-# ifdef WIN3264
+# ifdef MSWIN
tm->QuadPart += tm2->QuadPart;
# else
tm->tv_usec += tm2->tv_usec;
@@ -1638,7 +1638,7 @@ profile_self(proftime_T *self, proftime_T *total, proftime_T *children)
{
/* Check that the result won't be negative. Can happen with recursive
* calls. */
-#ifdef WIN3264
+#ifdef MSWIN
if (total->QuadPart <= children->QuadPart)
return;
#else
@@ -1678,7 +1678,7 @@ profile_sub_wait(proftime_T *tm, proftime_T *tma)
int
profile_equal(proftime_T *tm1, proftime_T *tm2)
{
-# ifdef WIN3264
+# ifdef MSWIN
return (tm1->QuadPart == tm2->QuadPart);
# else
return (tm1->tv_usec == tm2->tv_usec && tm1->tv_sec == tm2->tv_sec);
@@ -1691,7 +1691,7 @@ profile_equal(proftime_T *tm1, proftime_T *tm2)
int
profile_cmp(const proftime_T *tm1, const proftime_T *tm2)
{
-# ifdef WIN3264
+# ifdef MSWIN
return (int)(tm2->QuadPart - tm1->QuadPart);
# else
if (tm1->tv_sec == tm2->tv_sec)
@@ -4286,7 +4286,7 @@ source_level(void *cookie)
static char_u *get_one_sourceline(struct source_cookie *sp);
-#if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
+#if (defined(MSWIN) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
# define USE_FOPEN_NOINH
/*
* Special function to open a file without handle inheritance.
@@ -4295,7 +4295,7 @@ static char_u *get_one_sourceline(struct source_cookie *sp);
static FILE *
fopen_noinh_readbin(char *filename)
{
-# ifdef WIN32
+# ifdef MSWIN
int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
# else
int fd_tmp = mch_open(filename, O_RDONLY, 0);
@@ -5201,7 +5201,7 @@ get_locale_val(int what)
/* Obtain the locale value from the libraries. */
loc = (char_u *)setlocale(what, NULL);
-# ifdef WIN32
+# ifdef MSWIN
if (loc != NULL)
{
char_u *p;
@@ -5230,7 +5230,7 @@ get_locale_val(int what)
#endif
-#ifdef WIN32
+#ifdef MSWIN
/*
* On MS-Windows locale names are strings like "German_Germany.1252", but
* gettext expects "de". Try to translate one into another here for a few
@@ -5307,7 +5307,7 @@ get_mess_lang(void)
p = mch_getenv((char_u *)"LANG");
}
# endif
-# ifdef WIN32
+# ifdef MSWIN
p = gettext_lang(p);
# endif
return is_valid_mess_lang(p) ? p : NULL;
@@ -5479,7 +5479,7 @@ ex_language(exarg_T *eap)
/* Clear $LANGUAGE because GNU gettext uses it. */
vim_setenv((char_u *)"LANGUAGE", (char_u *)"");
-# ifdef WIN32
+# ifdef MSWIN
/* Apparently MS-Windows printf() may cause a crash when
* we give it 8-bit text while it's expecting text in the
* current locale. This call avoids that. */
@@ -5489,7 +5489,7 @@ ex_language(exarg_T *eap)
if (what != LC_CTYPE)
{
char_u *mname;
-#ifdef WIN32
+#ifdef MSWIN
mname = gettext_lang(name);
#else
mname = name;
@@ -5516,7 +5516,7 @@ ex_language(exarg_T *eap)
static char_u **locales = NULL; /* Array of all available locales */
-# ifndef WIN32
+# ifndef MSWIN
static int did_init_locales = FALSE;
/* Return an array of strings for all available locales + NULL for the
@@ -5567,7 +5567,7 @@ find_locales(void)
static void
init_locales(void)
{
-# ifndef WIN32
+# ifndef MSWIN
if (!did_init_locales)
{
did_init_locales = TRUE;
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 8cdb04674..6e61cca9b 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -177,7 +177,7 @@ static void ex_edit(exarg_T *eap);
# define ex_gui ex_nogui
static void ex_nogui(exarg_T *eap);
#endif
-#if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
static void ex_tearoff(exarg_T *eap);
#else
# define ex_tearoff ex_ni
@@ -8866,7 +8866,7 @@ ex_nogui(exarg_T *eap)
}
#endif
-#if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
static void
ex_tearoff(exarg_T *eap)
{
@@ -9853,7 +9853,7 @@ ex_redraw(exarg_T *eap)
if (need_maketitle)
maketitle();
#endif
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
resize_console_buf();
#endif
RedrawingDisabled = r;
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 0096737b0..3d38d2c74 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1899,9 +1899,9 @@ getcmdline_int(
/* Ignore mouse event or open_cmdwin() result. */
goto cmdline_not_changed;
-#ifdef FEAT_GUI_W32
- /* On Win32 ignore <M-F4>, we get it when closing the window was
- * cancelled. */
+#ifdef FEAT_GUI_MSWIN
+ /* On MS-Windows ignore <M-F4>, we get it when closing the window
+ * was cancelled. */
case K_F4:
if (mod_mask == MOD_MASK_ALT)
{
diff --git a/src/feature.h b/src/feature.h
index a41e79f6f..1be1833bf 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -61,7 +61,7 @@
*/
#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
&& !defined(FEAT_BIG) && !defined(FEAT_HUGE)
-# if defined(UNIX) || defined(WIN3264) || defined(MACOS_X)
+# if defined(UNIX) || defined(MSWIN) || defined(MACOS_X)
# define FEAT_HUGE
# else
# if defined(MSWIN) || defined(VMS) || defined(AMIGA)
@@ -343,10 +343,10 @@
*/
#ifdef FEAT_NORMAL
# define FEAT_EVAL
-# if defined(HAVE_FLOAT_FUNCS) || defined(WIN3264) || defined(MACOS_X)
+# if defined(HAVE_FLOAT_FUNCS) || defined(MSWIN) || defined(MACOS_X)
# define FEAT_FLOAT
# endif
-# if defined(HAVE_STDINT_H) || defined(WIN3264) || (VIM_SIZEOF_LONG >= 8)
+# if defined(HAVE_STDINT_H) || defined(MSWIN) || (VIM_SIZEOF_LONG >= 8)
# define FEAT_NUM64
# endif
#endif
@@ -361,7 +361,7 @@
#if defined(FEAT_HUGE) \
&& defined(FEAT_EVAL) \
&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
- || defined(WIN3264))
+ || defined(MSWIN))
# define FEAT_PROFILE
#endif
@@ -371,14 +371,14 @@
#if defined(FEAT_NORMAL) \
&& defined(FEAT_EVAL) \
&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
- || defined(WIN3264))
+ || defined(MSWIN))
# define FEAT_RELTIME
#endif
/*
* +timers timer_start()
*/
-#if defined(FEAT_RELTIME) && (defined(UNIX) || defined(WIN32) || defined(VMS) )
+#if defined(FEAT_RELTIME) && (defined(UNIX) || defined(MSWIN) || defined(VMS) )
# define FEAT_TIMERS
#endif
@@ -603,7 +603,7 @@
* +multi_byte_ime Win32 IME input method. Only for far-east Windows, so
* IME can be used to input chars. Not tested much!
*/
-#if defined(FEAT_GUI_W32) && !defined(FEAT_MBYTE_IME)
+#if defined(FEAT_GUI_MSWIN) && !defined(FEAT_MBYTE_IME)
/* #define FEAT_MBYTE_IME */
# endif
@@ -659,7 +659,7 @@
#if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM)
# define USE_DLOPEN
#endif
-#if defined(FEAT_EVAL) && (defined(WIN3264) || ((defined(UNIX) || defined(VMS)) \
+#if defined(FEAT_EVAL) && (defined(MSWIN) || ((defined(UNIX) || defined(VMS)) \
&& (defined(USE_DLOPEN) || defined(HAVE_SHL_LOAD))))
# define FEAT_LIBCALL
#endif
@@ -669,7 +669,7 @@
*/
#ifdef FEAT_NORMAL
# define FEAT_MENU
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
# define FEAT_TEAROFF
# endif
#endif
@@ -757,7 +757,7 @@
#endif
#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
- || defined(FEAT_GUI_W32))
+ || defined(FEAT_GUI_MSWIN))
/* need a dialog to show error messages when starting from the desktop */
# define FEAT_GUI_DIALOG
#endif
@@ -828,7 +828,7 @@
*/
#if defined(FEAT_NORMAL) \
&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
- || defined(WIN3264))
+ || defined(MSWIN))
# define STARTUPTIME 1
#endif
@@ -1039,7 +1039,7 @@
# ifdef FEAT_BIG
# define FEAT_MOUSE_SGR
# endif
-# if defined(FEAT_NORMAL) && defined(WIN3264)
+# if defined(FEAT_NORMAL) && defined(MSWIN)
# define DOS_MOUSE
# endif
# if defined(FEAT_NORMAL) && defined(__QNX__)
@@ -1136,7 +1136,7 @@
* +clientserver Remote control via the remote_send() function
* and the --remote argument
*/
-#if (defined(WIN32) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL)
+#if (defined(MSWIN) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL)
# define FEAT_CLIENTSERVER
#endif
@@ -1145,7 +1145,7 @@
* when --servername is not passed on the command line.
*/
#if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
-# ifdef WIN3264
+# ifdef MSWIN
/* Always enabled on MS-Windows. */
# define FEAT_AUTOSERVERNAME
# else
@@ -1169,10 +1169,10 @@
*/
#ifdef FEAT_NORMAL
/* MS-DOS console and Win32 console can change cursor shape */
-# if defined(WIN3264) && !defined(FEAT_GUI_W32)
+# if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
# define MCH_CURSOR_SHAPE
# endif
-# if defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \
+# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON)
# define FEAT_MOUSESHAPE
@@ -1189,7 +1189,7 @@
# define CURSOR_SHAPE
#endif
-#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_GTK) \
+#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_MAC))
# define MZSCHEME_GUI_THREADS
@@ -1263,7 +1263,7 @@
# if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
&& defined(HAVE_X11_XPM_H)) \
|| defined(FEAT_GUI_GTK) \
- || (defined(WIN32) && defined(FEAT_GUI))
+ || (defined(MSWIN) && defined(FEAT_GUI))
# define FEAT_SIGN_ICONS
# endif
#endif
@@ -1274,13 +1274,13 @@
* Only for GUIs where it was implemented.
*/
#if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
- || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)) \
+ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)) \
&& ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \
- && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)) \
+ && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)) \
|| defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL))
# define FEAT_BEVAL_GUI
# if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
- && !defined(FEAT_GUI_W32)
+ && !defined(FEAT_GUI_MSWIN)
# define FEAT_XFONTSET
# endif
#endif
@@ -1293,7 +1293,7 @@
* +balloon_eval_term Allow balloon expression evaluation in the terminal.
*/
#if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
- (defined(UNIX) || defined(VMS) || (defined(WIN32) && !defined(FEAT_GUI_W32)))
+ (defined(UNIX) || defined(VMS) || (defined(MSWIN) && !defined(FEAT_GUI_MSWIN)))
# define FEAT_BEVAL_TERM
#endif
@@ -1340,13 +1340,13 @@
* +filterpipe
*/
#if (defined(UNIX) && !defined(USE_SYSTEM)) \
- || (defined(WIN3264) && defined(FEAT_GUI_W32))
+ || (defined(MSWIN) && defined(FEAT_GUI_MSWIN))
# define FEAT_FILTERPIPE
#endif
/*
* +vtp: Win32 virtual console.
*/
-#if !defined(FEAT_GUI) && defined(WIN3264)
+#if !defined(FEAT_GUI) && defined(MSWIN)
# define FEAT_VTP
#endif
diff --git a/src/fileio.c b/src/fileio.c
index 85d2df3bb..841de1cf0 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -49,7 +49,7 @@ static int time_differs(long t1, long t2);
#define FIO_UCS2 0x04 /* convert UCS-2 */
#define FIO_UCS4 0x08 /* convert UCS-4 */
#define FIO_UTF16 0x10 /* convert UTF-16 */
-#ifdef WIN3264
+#ifdef MSWIN
# define FIO_CODEPAGE 0x20 /* convert MS-Windows codepage */
# define FIO_PUT_CP(x) (((x) & 0xffff) << 16) /* put codepage in top word */
# define FIO_GET_CP(x) (((x)>>16) & 0xffff) /* get codepage from top word */
@@ -106,7 +106,7 @@ static int need_conversion(char_u *fenc);
static int get_fio_flags(char_u *ptr);
static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
static int make_bom(char_u *buf, char_u *name);
-#ifdef WIN3264
+#ifdef MSWIN
static int get_win_fio_flags(char_u *ptr);
#endif
#ifdef MACOS_CONVERT
@@ -1038,7 +1038,7 @@ retry:
else if (enc_utf8 || STRCMP(p_enc, "latin1") == 0)
fio_flags = get_fio_flags(fenc);
-#ifdef WIN3264
+#ifdef MSWIN
/*
* Conversion from an MS-Windows codepage to UTF-8 or another codepage
* is handled with MultiByteToWideChar().
@@ -1229,7 +1229,7 @@ retry:
size = (size * 2 / 3) & ~3;
else if (fio_flags == FIO_UCSBOM)
size = size / ICONV_MULT; /* worst case */
-#ifdef WIN3264
+#ifdef MSWIN
else if (fio_flags & FIO_CODEPAGE)
size = size / ICONV_MULT; /* also worst case */
#endif
@@ -1590,7 +1590,7 @@ retry:
}
#endif
-#ifdef WIN3264
+#ifdef MSWIN
if (fio_flags & FIO_CODEPAGE)
{
char_u *src, *dst;
@@ -2559,7 +2559,7 @@ failed:
curbuf->b_op_end.lnum = from + linecnt;
curbuf->b_op_end.col = 0;
-#ifdef WIN32
+#ifdef MSWIN
/*
* Work around a weird problem: When a file has two links (only
* possible on NTFS) and we write through one link, then stat() it
@@ -3601,13 +3601,13 @@ buf_write(
*/
if (!(append && *p_pm == NUL) && !filtering && perm >= 0 && dobackup)
{
-#if defined(UNIX) || defined(WIN32)
+#if defined(UNIX) || defined(MSWIN)
stat_T st;
#endif
if ((bkc & BKC_YES) || append) /* "yes" */
backup_copy = TRUE;
-#if defined(UNIX) || defined(WIN32)
+#if defined(UNIX) || defined(MSWIN)
else if ((bkc & BKC_AUTO)) /* "auto" */
{
int i;
@@ -3632,7 +3632,7 @@ buf_write(
backup_copy = TRUE;
else
# else
-# ifdef WIN32
+# ifdef MSWIN
/* On NTFS file systems hard links are possible. */
if (mch_is_linked(fname))
backup_copy = TRUE;
@@ -3715,7 +3715,7 @@ buf_write(
&& (lstat_res != 0 || st.st_ino == st_old.st_ino))
backup_copy = FALSE;
# else
-# if defined(WIN32)
+# if defined(MSWIN)
/* Symlinks. */
if ((bkc & BKC_BREAKSYMLINK) && mch_is_symbolic_link(fname))
backup_copy = FALSE;
@@ -3744,7 +3744,7 @@ buf_write(
stat_T st_new;
char_u *dirp;
char_u *rootname;
-#if defined(UNIX) || defined(WIN3264)
+#if defined(UNIX) || defined(MSWIN)
char_u *p;
#endif
#if defined(UNIX)
@@ -3785,7 +3785,7 @@ buf_write(
*/
(void)copy_option_part(&dirp, copybuf, BUFSIZE, ",");
-#if defined(UNIX) || defined(WIN3264)
+#if defined(UNIX) || defined(MSWIN)
p = copybuf + STRLEN(copybuf);
if (after_pathsep(copybuf, p) && p[-1] == p[-2])
// Ends with '//', use full path
@@ -4018,7 +4018,7 @@ buf_write(
*/
(void)copy_option_part(&dirp, IObuff, IOSIZE, ",");
-#if defined(UNIX) || defined(WIN3264)
+#if defined(UNIX) || defined(MSWIN)
p = IObuff + STRLEN(IObuff);
if (after_pathsep(IObuff, p) && p[-1] == p[-2])
// path ends with '//', use full path
@@ -4177,7 +4177,7 @@ buf_write(
}
}
-#ifdef WIN3264
+#ifdef MSWIN
if (converted && wb_flags == 0 && (wb_flags = get_win_fio_flags(fenc)) != 0)
{
/* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
@@ -4416,7 +4416,7 @@ restore_backup:
vim_ignored = ftruncate(fd, (off_t)0);
#endif
-#if defined(WIN3264)
+#if defined(MSWIN)
if (backup != NULL && overwriting && !append)
{
if (backup_copy)
@@ -5430,7 +5430,7 @@ buf_write_bytes(struct bw_info *ip)
}
}
-#ifdef WIN3264
+#ifdef MSWIN
else if (flags & FIO_CODEPAGE)
{
/*
@@ -5869,7 +5869,7 @@ get_fio_flags(char_u *ptr)
return 0;
}
-#ifdef WIN3264
+#ifdef MSWIN
/*
* Check "ptr" for a MS-Windows codepage name and return the FIO_ flags needed
* for the conversion MS-Windows can do for us. Also accept "utf-8".
@@ -6041,9 +6041,9 @@ shorten_fname(char_u *full_path, char_u *dir_name)
p = full_path + len;
#if defined(MSWIN)
/*
- * MSWIN: when a file is in the root directory, dir_name will end in a
- * slash, since C: by itself does not define a specific dir. In this
- * case p may already be correct. <negri>
+ * MS-Windows: when a file is in the root directory, dir_name will end
+ * in a slash, since C: by itself does not define a specific dir. In
+ * this case p may already be correct. <negri>
*/
if (!((len > 2) && (*(p - 2) == ':')))
#endif
@@ -6298,7 +6298,7 @@ buf_modname(
else if ((int)STRLEN(e) + extlen > 4)
s = e + 4 - extlen;
}
-#ifdef WIN3264
+#ifdef MSWIN
/*
* If there is no file name, and the extension starts with '.', put a
* '_' before the dot, because just ".ext" may be invalid if it's on a
@@ -6427,7 +6427,7 @@ vim_rename(char_u *from, char_u *to)
use_tmp_file = TRUE;
}
#endif
-#ifdef WIN3264
+#ifdef MSWIN
{
BY_HANDLE_FILE_INFORMATION info1, info2;
@@ -7189,7 +7189,7 @@ delete_recursive(char_u *name)
/* A symbolic link to a directory itself is deleted, not the directory it
* points to. */
if (
-# if defined(UNIX) || defined(WIN32)
+# if defined(UNIX) || defined(MSWIN)
mch_isrealdir(name)
# else
mch_isdir(name)
@@ -7276,7 +7276,7 @@ vim_tempname(
{
#ifdef USE_TMPNAM
char_u itmp[L_tmpnam]; /* use tmpnam() */
-#elif defined(WIN3264)
+#elif defined(MSWIN)
WCHAR itmp[TEMPNAMELEN];
#else
char_u itmp[TEMPNAMELEN];
@@ -7398,7 +7398,7 @@ vim_tempname(
#else /* TEMPDIRNAMES */
-# ifdef WIN3264
+# ifdef MSWIN
WCHAR wszTempFile[_MAX_PATH + 1];
WCHAR buf4[4];
char_u *retval;
@@ -7428,7 +7428,7 @@ vim_tempname(
*p = '/';
return retval;
-# else /* WIN3264 */
+# else // MSWIN
# ifdef USE_TMPNAM
char_u *p;
@@ -7466,7 +7466,7 @@ vim_tempname(
# endif
return vim_strsave(itmp);
-# endif /* WIN3264 */
+# endif // MSWIN
#endif /* TEMPDIRNAMES */
}
diff --git a/src/getchar.c b/src/getchar.c
index eaef1ab7e..7039c9c76 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1623,7 +1623,7 @@ vgetc(void)
}
c = TO_SPECIAL(c2, c);
-#if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
/* Handle K_TEAROFF here, the caller of vgetc() doesn't need to
* know that a menu was torn off */
if (c == K_TEAROFF)
@@ -1679,7 +1679,7 @@ vgetc(void)
case K_KMULTIPLY: c = '*'; break;
case K_KENTER: c = CAR; break;
case K_KPOINT:
-#ifdef WIN32
+#ifdef MSWIN
// Can be either '.' or a ',',
// depending on the type of keypad.
c = MapVirtualKey(VK_DECIMAL, 2); break;
@@ -3107,7 +3107,7 @@ fix_input_buffer(char_u *buf, int len)
if (p[0] == NUL || (p[0] == K_SPECIAL
/* timeout may generate K_CURSORHOLD */
&& (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
-#if defined(WIN3264) && !defined(FEAT_GUI)
+#if defined(MSWIN) && !defined(FEAT_GUI)
/* Win32 console passes modifiers */
&& (i < 2 || p[1] != KS_MODIFIER)
#endif
diff --git a/src/glbl_ime.cpp b/src/glbl_ime.cpp
index 91d52edf1..166199074 100644
--- a/src/glbl_ime.cpp
+++ b/src/glbl_ime.cpp
@@ -134,7 +134,7 @@ global_ime_DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
if (pIApp == NULL || pIApp->OnDefWindowProc(hWnd, Msg,
wParam, lParam, &lResult) != S_OK)
{
-#if defined(WIN3264)
+#if defined(MSWIN)
if (wide_WindowProc)
lResult = DefWindowProcW(hWnd, Msg, wParam, lParam);
else
diff --git a/src/globals.h b/src/globals.h
index 82e663e9c..729a269d0 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -19,7 +19,7 @@
*/
EXTERN long Rows /* nr of rows in the screen */
#ifdef DO_INIT
-# if defined(WIN3264)
+# if defined(MSWIN)
= 25L
# else
= 24L
@@ -818,7 +818,7 @@ EXTERN int enc_dbcs INIT(= 0); /* One of DBCS_xxx values if
EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */
EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */
EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */
-#if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+#if defined(MSWIN) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
/* Codepage nr of 'encoding'. Negative means it's not been set yet, zero
* means 'encoding' is not a valid codepage. */
EXTERN int enc_codepage INIT(= -1);
@@ -826,7 +826,7 @@ EXTERN int enc_latin9 INIT(= FALSE); /* 'encoding' is latin9 */
#endif
EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */
-#if defined(WIN3264)
+#if defined(MSWIN)
EXTERN int wide_WindowProc INIT(= FALSE); /* use wide WindowProc() */
#endif
@@ -1296,7 +1296,7 @@ EXTERN guint32 gtk_socket_id INIT(= 0);
EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */
#endif
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
/*
* The value of the --windowid argument.
* For embedding gvim inside another application.
@@ -1645,7 +1645,7 @@ EXTERN int did_echo_string_emsg INIT(= FALSE);
EXTERN int *eval_lavars_used INIT(= NULL);
#endif
-#ifdef WIN3264
+#ifdef MSWIN
EXTERN int ctrl_break_was_pressed INIT(= FALSE);
#endif
diff --git a/src/gui.c b/src/gui.c
index d993bc6b0..ada338f7f 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -749,7 +749,7 @@ gui_init(void)
&general_beval_cb, NULL);
}
# else
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
balloonEval = gui_mch_create_beval_area(NULL, NULL,
&general_beval_cb, NULL);
# endif
@@ -2432,7 +2432,7 @@ gui_outstr_nowrap(
int curr_wide = FALSE; /* use 'guifontwide' */
int prev_wide = FALSE;
int wide_changed;
-# ifdef WIN3264
+# ifdef MSWIN
int sep_comp = FALSE; /* Don't separate composing chars. */
# else
int sep_comp = TRUE; /* Separate composing chars. */
@@ -2568,7 +2568,7 @@ gui_outstr_nowrap(
/* Draw the sign on top of the spaces. */
gui_mch_drawsign(gui.row, col, gui.highlight_mask);
# if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \
- || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32))
+ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN))
if (multi_sign)
netbeans_draw_multisign_indicator(gui.row);
# endif
@@ -3561,7 +3561,7 @@ gui_init_which_components(char_u *oldval UNUSED)
fix_size = TRUE;
}
#endif
-#if defined(FEAT_MENU) && !(defined(WIN3264) && !defined(FEAT_TEAROFF))
+#if defined(FEAT_MENU) && !(defined(MSWIN) && !defined(FEAT_TEAROFF))
if (using_tearoff != prev_tearoff)
{
gui_mch_toggle_tearoffs(using_tearoff);
@@ -4125,7 +4125,7 @@ gui_update_scrollbars(
/* Update the horizontal scrollbar */
gui_update_horiz_scrollbar(force);
-#ifndef WIN3264
+#ifndef MSWIN
/* Return straight away if there is neither a left nor right scrollbar.
* On MS-Windows this is required anyway for scrollwheel messages. */
if (!gui.which_scrollbars[SBAR_LEFT] && !gui.which_scrollbars[SBAR_RIGHT])
@@ -4879,9 +4879,10 @@ gui_mouse_correct(void)
/*
* Find window where the mouse pointer "x" / "y" coordinate is in.
+ * As a side effect update the shape of the mouse pointer.
*/
static win_T *
-xy2win(int x UNUSED, int y UNUSED)
+xy2win(int x, int y)
{
int row;
int col;
@@ -4951,8 +4952,9 @@ ex_gui(exarg_T *eap)
ex_next(eap);
}
-#if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32) \
- || defined(FEAT_GUI_PHOTON)) && defined(FEAT_TOOLBAR)) || defined(PROTO)
+#if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
+ || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_PHOTON)) \
+ && defined(FEAT_TOOLBAR)) || defined(PROTO)
/*
* This is shared between Athena, Motif and GTK.
*/
diff --git a/src/gui.h b/src/gui.h
index a57b0a340..f5f05706f 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -90,7 +90,7 @@
* X_2_COL - Convert X pixel coord into character column.
* Y_2_ROW - Convert Y pixel coord into character row.
*/
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
# define TEXT_X(col) ((col) * gui.char_width)
# define TEXT_Y(row) ((row) * gui.char_height + gui.char_ascent)
# define FILL_X(col) ((col) * gui.char_width)
@@ -406,7 +406,7 @@ typedef struct Gui
#endif /* FEAT_GUI_GTK */
#if defined(FEAT_GUI_TABLINE) \
- && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \
+ && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_MAC))
int tabline_height;
#endif
diff --git a/src/gui_beval.c b/src/gui_beval.c
index 3a282181a..e1e093f37 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -13,7 +13,7 @@
#if defined(FEAT_BEVAL_GUI) || defined(PROTO)
/* on Win32 only get_beval_info() is required */
-#if !defined(FEAT_GUI_W32) || defined(PROTO)
+#if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
#ifdef FEAT_GUI_GTK
# if GTK_CHECK_VERSION(3,0,0)
@@ -197,10 +197,10 @@ gui_mch_currently_showing_beval(void)
return current_beval;
}
#endif
-#endif /* !FEAT_GUI_W32 */
+#endif /* !FEAT_GUI_MSWIN */
#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL) || defined(PROTO)
-# if !defined(FEAT_GUI_W32) || defined(PROTO)
+# if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
/*
* Show a balloon with "mesg".
@@ -214,10 +214,10 @@ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
else
undrawBalloon(beval);
}
-# endif /* !FEAT_GUI_W32 */
+# endif /* !FEAT_GUI_MSWIN */
#endif /* FEAT_NETBEANS_INTG || PROTO */
-#if !defined(FEAT_GUI_W32) || defined(PROTO)
+#if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
#if defined(FEAT_BEVAL_TIP) || defined(PROTO)
/*
* Hide the given balloon.
@@ -1220,6 +1220,6 @@ createBalloonEvalWindow(BalloonEval *beval)
}
#endif /* !FEAT_GUI_GTK */
-#endif /* !FEAT_GUI_W32 */
+#endif /* !FEAT_GUI_MSWIN */
#endif /* FEAT_BEVAL_GUI */
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index 3d0893484..ba8fd9dc1 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -76,7 +76,7 @@
# include <gdk/gdkkeysyms.h>
# endif
# include <gdk/gdk.h>
-# ifdef WIN3264
+# ifdef MSWIN
# include <gdk/gdkwin32.h>
# else
# include <gdk/gdkx.h>
diff --git a/src/gui_gtk_f.c b/src/gui_gtk_f.c
index 3f376c048..d81474b3f 100644
--- a/src/gui_gtk_f.c
+++ b/src/gui_gtk_f.c
@@ -32,7 +32,7 @@
#if !GTK_CHECK_VERSION(3,0,0)
# include <gtk/gtksignal.h>
#endif
-#ifdef WIN3264
+#ifdef MSWIN
# include <gdk/gdkwin32.h>
#else
# include <gdk/gdkx.h>
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index b76aacd9c..5e74adceb 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -86,7 +86,7 @@ extern void bonobo_dock_item_set_behavior(BonoboDockItem *dock_item, BonoboDockI
# include <gdk/gdkkeysyms.h>
# endif
# include <gdk/gdk.h>
-# ifdef WIN3264
+# ifdef MSWIN
# include <gdk/gdkwin32.h>
# else
# include <gdk/gdkx.h>
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 4cc053ed0..03346749c 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -548,7 +548,7 @@ staterr:
goto add_err;
while (fname[strlen(fname)-1] == '/'
-#ifdef WIN32
+#ifdef MSWIN
|| fname[strlen(fname)-1] == '\\'
#endif
)
@@ -790,7 +790,7 @@ cs_create_connection(int i)
#endif
int len;
char *prog, *cmd, *ppath = NULL;
-#ifdef WIN32
+#ifdef MSWIN
int fd;
SECURITY_ATTRIBUTES sa;
PROCESS_INFORMATION pi;
@@ -844,7 +844,7 @@ err_closing:
(void)close(to_cs[1]);
(void)close(from_cs[0]);
#else
- /* WIN32 */
+ /* MSWIN */
/* Create pipes to communicate with cscope */
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = TRUE;
@@ -874,7 +874,7 @@ err_closing:
#ifdef UNIX
return CSCOPE_FAILURE;
#else
- /* WIN32 */
+ /* MSWIN */
goto err_closing;
#endif
}
@@ -891,7 +891,7 @@ err_closing:
#ifdef UNIX
return CSCOPE_FAILURE;
#else
- /* WIN32 */
+ /* MSWIN */
goto err_closing;
#endif
}
@@ -910,7 +910,7 @@ err_closing:
#ifdef UNIX
return CSCOPE_FAILURE;
#else
- /* WIN32 */
+ /* MSWIN */
goto err_closing;
#endif
}
@@ -919,7 +919,7 @@ err_closing:
#if defined(UNIX)
(void)sprintf(cmd, "exec %s -dl -f %s", prog, csinfo[i].fname);
#else
- /* WIN32 */
+ /* MSWIN */
(void)sprintf(cmd, "%s -dl -f %s", prog, csinfo[i].fname);
#endif
if (csinfo[i].ppath != NULL)
@@ -971,7 +971,7 @@ err_closing:
}
#else
- /* WIN32 */
+ /* MSWIN */
/* Create a new process to run cscope and use pipes to talk with it */
GetStartupInfo(&si);
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
@@ -1330,7 +1330,7 @@ clear_csinfo(int i)
csinfo[i].pid = 0;
csinfo[i].fr_fp = NULL;
csinfo[i].to_fp = NULL;
-#if defined(WIN32)
+#if defined(MSWIN)
csinfo[i].hProc = NULL;
#endif
}
@@ -1940,13 +1940,13 @@ cs_pathcomponents(char *path)
s = path + strlen(path) - 1;
for (i = 0; i < p_cspc; ++i)
while (s > path && *--s != '/'
-#ifdef WIN32
+#ifdef MSWIN
&& *--s != '\\'
#endif
)
;
if ((s > path && *s == '/')
-#ifdef WIN32
+#ifdef MSWIN
|| (s > path && *s == '\\')
#endif
)
@@ -2433,7 +2433,7 @@ cs_resolve_file(int i, char *name)
if (csinfo[i].ppath != NULL
&& (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0)
&& (name[0] != '/')
-#ifdef WIN32
+#ifdef MSWIN
&& name[0] != '\\' && name[1] != ':'
#endif
)
diff --git a/src/if_cscope.h b/src/if_cscope.h
index 419c46946..6f3b02dbd 100644
--- a/src/if_cscope.h
+++ b/src/if_cscope.h
@@ -11,7 +11,7 @@
#if defined(FEAT_CSCOPE) || defined(PROTO)
-#if defined (WIN32)
+#if defined (MSWIN)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
@@ -45,7 +45,7 @@ typedef struct csi {
dev_t st_dev; /* ID of dev containing cscope db */
ino_t st_ino; /* inode number of cscope db */
#else
-# if defined(WIN32)
+# if defined(MSWIN)
DWORD pid; /* PID of the connected cscope process. */
HANDLE hProc; /* cscope process handle */
DWORD nVolume; /* Volume serial number, instead of st_dev */
diff --git a/src/if_lua.c b/src/if_lua.c
index e650e5e7d..12643f90c 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -80,7 +80,7 @@ static luaV_Funcref *luaV_pushfuncref(lua_State *L, typval_T *tv);
#ifdef DYNAMIC_LUA
-#ifndef WIN3264
+#ifndef MSWIN
# include <dlfcn.h>
# define HANDLE void*
# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 16c4c88df..27925afb3 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -47,7 +47,7 @@ typedef int HINSTANCE;
* racket-6.3. See
* http://docs.racket-lang.org/inside/im_memoryalloc.html?q=scheme_register_tls_space
*/
-#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) \
+#if MZSCHEME_VERSION_MAJOR >= 500 && defined(MSWIN) \
&& defined(USE_THREAD_LOCAL) \
&& (!defined(_WIN64) || MZSCHEME_VERSION_MAJOR >= 603)
# define HAVE_TLS_SPACE 1
@@ -807,7 +807,7 @@ static long range_end;
/* MzScheme threads scheduling stuff */
static int mz_threads_allow = 0;
-#if defined(FEAT_GUI_W32)
+#if defined(FEAT_GUI_MSWIN)
static void CALLBACK timer_proc(HWND, UINT, UINT_PTR, DWORD);
static UINT timer_id = 0;
#elif defined(FEAT_GUI_GTK)
@@ -822,7 +822,7 @@ static EventLoopTimerRef timer_id = NULL;
static EventLoopTimerUPP timerUPP;
#endif
-#ifndef FEAT_GUI_W32 /* Win32 console and Unix */
+#ifndef FEAT_GUI_MSWIN /* Win32 console and Unix */
void
mzvim_check_threads(void)
{
@@ -847,7 +847,7 @@ static void setup_timer(void);
static void remove_timer(void);
/* timers are presented in GUI only */
-# if defined(FEAT_GUI_W32)
+# if defined(FEAT_GUI_MSWIN)
static void CALLBACK
timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT_PTR idEvent UNUSED, DWORD dwTime UNUSED)
# elif defined(FEAT_GUI_GTK)
@@ -875,7 +875,7 @@ timer_proc(EventLoopTimerRef theTimer UNUSED, void *userData UNUSED)
static void
setup_timer(void)
{
-# if defined(FEAT_GUI_W32)
+# if defined(FEAT_GUI_MSWIN)
timer_id = SetTimer(NULL, 0, p_mzq, timer_proc);
# elif defined(FEAT_GUI_GTK)
timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL);
@@ -891,7 +891,7 @@ setup_timer(void)
static void
remove_timer(void)
{
-# if defined(FEAT_GUI_W32)
+# if defined(FEAT_GUI_MSWIN)
KillTimer(NULL, timer_id);
# elif defined(FEAT_GUI_GTK)
g_source_remove(timer_id);
diff --git a/src/if_ole.cpp b/src/if_ole.cpp
index 088888363..8ee348d66 100644
--- a/src/if_ole.cpp
+++ b/src/if_ole.cpp
@@ -6,7 +6,7 @@
* Do ":help credits" in Vim to see a list of people who contributed.
*/
-#if defined(FEAT_OLE) && defined(FEAT_GUI_W32)
+#if defined(FEAT_OLE) && defined(WIN32) && defined(FEAT_GUI)
/*
* OLE server implementation.
*
diff --git a/src/if_perl.xs b/src/if_perl.xs
index 67d0b9488..265564075 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -100,7 +100,7 @@
// Work around for ActivePerl 5.20.3+: Avoid generating (g)vim.lib.
#if defined(ACTIVEPERL_VERSION) && (ACTIVEPERL_VERSION >= 2003) \
- && defined(WIN32) && defined(USE_DYNAMIC_LOADING)
+ && defined(MSWIN) && defined(USE_DYNAMIC_LOADING)
# undef XS_EXTERNAL
# define XS_EXTERNAL(name) XSPROTO(name)
#endif
@@ -154,7 +154,7 @@ EXTERN_C void boot_DynaLoader(pTHX_ CV*);
#if defined(DYNAMIC_PERL) || defined(PROTO)
# ifndef DYNAMIC_PERL /* just generating prototypes */
-# ifdef WIN3264
+# ifdef MSWIN
typedef int HANDLE;
# endif
typedef int XSINIT_t;
@@ -164,7 +164,7 @@ typedef int XSUBADDR_t;
typedef int perl_key;
# endif
-# ifndef WIN3264
+# ifndef MSWIN
# include <dlfcn.h>
# define HANDLE void*
# define PERL_PROC void*
diff --git a/src/if_python.c b/src/if_python.c
index 343804668..06c46bc37 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -35,7 +35,7 @@
# undef _POSIX_THREADS
#endif
-#if defined(_WIN32) && defined(HAVE_FCNTL_H)
+#if defined(MSWIN) && defined(HAVE_FCNTL_H)
# undef HAVE_FCNTL_H
#endif
@@ -127,7 +127,7 @@ struct PyMethodDef { Py_ssize_t a; };
# define HINSTANCE long_u /* for generating prototypes */
# endif
-# ifndef WIN3264
+# ifndef MSWIN
# include <dlfcn.h>
# define FARPROC void*
# define HINSTANCE void*
diff --git a/src/if_python3.c b/src/if_python3.c
index 4bbbdd196..8b4bee9f7 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -34,7 +34,7 @@
#include <limits.h>
-#if defined(_WIN32) && defined(HAVE_FCNTL_H)
+#if defined(MSWIN) && defined(HAVE_FCNTL_H)
# undef HAVE_FCNTL_H
#endif
@@ -112,7 +112,7 @@ typedef PySliceObject PySliceObject_T;
#if defined(DYNAMIC_PYTHON3) || defined(PROTO)
-# ifndef WIN3264
+# ifndef MSWIN
# include <dlfcn.h>
# define FARPROC void*
# define HINSTANCE void*
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 24814a232..85f94c4f0 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -64,7 +64,7 @@
# define RUBY_EXPORT
# endif
-#if !(defined(WIN32) || defined(_WIN64))
+#if !defined(MSWIN)
# include <dlfcn.h>
# define HINSTANCE void*
# define RUBY_PROC void*
@@ -331,7 +331,7 @@ static void ruby_vim_init(void);
# endif
# define ruby_init dll_ruby_init
# define ruby_init_loadpath dll_ruby_init_loadpath
-# ifdef WIN3264
+# ifdef MSWIN
# ifdef RUBY19_OR_LATER
# define ruby_sysinit dll_ruby_sysinit
# else
@@ -447,7 +447,7 @@ static VALUE *dll_ruby_errinfo;
# endif
static void (*dll_ruby_init) (void);
static void (*dll_ruby_init_loadpath) (void);
-# ifdef WIN3264
+# ifdef MSWIN
# ifdef RUBY19_OR_LATER
static void (*dll_ruby_sysinit) (int*, char***);
# else
@@ -666,7 +666,7 @@ static struct
# endif
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
-# ifdef WIN3264
+# ifdef MSWIN
# ifdef RUBY19_OR_LATER
{"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit},
# else
@@ -949,7 +949,7 @@ static int ensure_ruby_initialized(void)
if (ruby_enabled(TRUE))
{
#endif
-#ifdef _WIN32
+#ifdef MSWIN
/* suggested by Ariya Mizutani */
int argc = 1;
char *argv[] = {"gvim.exe"};
diff --git a/src/if_tcl.c b/src/if_tcl.c
index eb6684c8f..46378a27f 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -160,7 +160,7 @@ static struct ref refsdeleted; /* dummy object for deleted ref list */
typedef int HANDLE;
# endif
-# ifndef WIN3264
+# ifndef MSWIN
# include <dlfcn.h>
# define HANDLE void*
# define TCL_PROC void*
@@ -1741,11 +1741,11 @@ tclinit(exarg_T *eap)
#endif
Tcl_SetChannelOption(interp, ch1, "-buffering", "line");
-#ifdef WIN3264
+#ifdef MSWIN
Tcl_SetChannelOption(interp, ch1, "-translation", "lf");
#endif
Tcl_SetChannelOption(interp, ch2, "-buffering", "line");
-#ifdef WIN3264
+#ifdef MSWIN
Tcl_SetChannelOption(interp, ch2, "-translation", "lf");
#endif
diff --git a/src/macros.h b/src/macros.h
index 29607db17..b81af8c60 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -160,11 +160,11 @@
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
#else
-# ifndef WIN32
+# ifndef MSWIN
# define mch_access(n, p) access((n), (p))
# endif
# define mch_fstat(n, p) fstat((n), (p))
-# ifdef MSWIN /* has its own mch_stat() function */
+# ifdef MSWIN // has its own mch_stat() function
# define mch_stat(n, p) vim_stat((n), (p))
# else
# ifdef STAT_IGNORES_SLASH
@@ -194,7 +194,7 @@
#if defined(UNIX) || defined(VMS) /* open in rw------- mode */
# define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600)
#else
-# if defined(MSWIN) /* open read/write */
+# if defined(MSWIN) // open read/write
# define mch_open_rw(n, f) mch_open((n), (f), S_IREAD | S_IWRITE)
# else
# define mch_open_rw(n, f) mch_open((n), (f), 0)
@@ -269,7 +269,7 @@
# include <math.h>
# endif
# ifdef USING_FLOAT_STUFF
-# if defined(WIN32)
+# ifdef MSWIN
# ifndef isnan
# define isnan(x) _isnan(x)
static __inline int isinf(double x) { return !_finite(x) && !_isnan(x); }
diff --git a/src/main.c b/src/main.c
index 6ad6fff7c..d4e034963 100644
--- a/src/main.c
+++ b/src/main.c
@@ -11,7 +11,7 @@
#include "vim.h"
#ifdef __CYGWIN__
-# ifndef WIN32
+# ifndef MSWIN
# include <cygwin/version.h>
# include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() and/or
* cygwin_conv_path() */
@@ -19,7 +19,7 @@
# include <limits.h>
#endif
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
# include "iscygpty.h"
#endif
@@ -119,7 +119,7 @@ main
*/
mch_early_init();
-#if defined(WIN32)
+#ifdef MSWIN
/*
* MinGW expands command line arguments, which confuses our code to
* convert when 'encoding' changes. Get the unexpanded arguments.
@@ -250,7 +250,7 @@ main
params.fname = alist_name(&GARGLIST[0]);
}
-#if defined(WIN32)
+#ifdef MSWIN
{
extern void set_alist_count(void);
@@ -854,7 +854,7 @@ vim_main2(void)
}
#endif
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
mch_set_winsize_now(); /* Allow winsize changes from now on */
#endif
@@ -880,7 +880,7 @@ vim_main2(void)
{
# ifdef FEAT_GUI
# if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
- && !defined(FEAT_GUI_W32)
+ && !defined(FEAT_GUI_MSWIN)
if (gui.in_use)
{
mch_errmsg(_("netbeans is not supported with this GUI\n"));
@@ -1534,7 +1534,7 @@ getout(int exitval)
if (garbage_collect_at_exit)
garbage_collect(FALSE);
#endif
-#if defined(WIN32)
+#ifdef MSWIN
free_cmd_argsW();
#endif
@@ -1559,7 +1559,7 @@ init_locale(void)
setlocale(LC_NUMERIC, "C");
# endif
-# ifdef WIN32
+# ifdef MSWIN
/* Apparently MS-Windows printf() may cause a crash when we give it 8-bit
* text while it's expecting text in the current locale. This call avoids
* that. */
@@ -1642,8 +1642,8 @@ early_arg_scan(mparm_T *parmp UNUSED)
}
# endif
-# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
-# ifdef FEAT_GUI_W32
+# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
+# ifdef FEAT_GUI_MSWIN
else if (STRICMP(argv[i], "--windowid") == 0)
# else
else if (STRICMP(argv[i], "--socketid") == 0)
@@ -1661,7 +1661,7 @@ early_arg_scan(mparm_T *parmp UNUSED)
if (count != 1)
mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
else
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
win_socket_id = id;
# else
gtk_socket_id = id;
@@ -1942,7 +1942,7 @@ command_line_scan(mparm_T *parmp)
}
}
#endif
-#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
# ifdef FEAT_GUI_GTK
else if (STRNICMP(argv[0] + argv_idx, "socketid", 8) == 0)
# else
@@ -2237,7 +2237,7 @@ command_line_scan(mparm_T *parmp)
case 'u': /* "-u {vimrc}" vim inits file */
case 'U': /* "-U {gvimrc}" gvim inits file */
case 'W': /* "-W {scriptout}" overwrite */
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
case 'P': /* "-P {parent title}" MDI parent */
#endif
want_argument = TRUE;
@@ -2399,7 +2399,7 @@ scripterror:
}
break;
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
case 'P': /* "-P {parent title}" MDI parent */
gui_mch_set_parent(argv[0]);
break;
@@ -2445,7 +2445,7 @@ scripterror:
}
}
#endif
-#if defined(__CYGWIN32__) && !defined(WIN32)
+#if defined(__CYGWIN32__) && !defined(MSWIN)
/*
* If vim is invoked by non-Cygwin tools, convert away any
* DOS paths, so things like .swp files are created correctly.
@@ -2481,7 +2481,7 @@ scripterror:
#endif
);
-#if defined(WIN32)
+#ifdef MSWIN
{
/* Remember this argument has been added to the argument list.
* Needed when 'encoding' is changed. */
@@ -2561,7 +2561,7 @@ check_tty(mparm_T *parmp)
exit(1);
}
#endif
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
if (is_cygpty_used())
{
# if defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
@@ -3423,7 +3423,7 @@ usage(void)
main_msg(_("--socketid <xid>\tOpen Vim inside another GTK widget"));
main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout"));
#endif
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
main_msg(_("--windowid <HWND>\tOpen Vim inside another win32 widget"));
#endif
@@ -3460,7 +3460,7 @@ check_swap_exists_action(void)
#if defined(STARTUPTIME) || defined(PROTO)
static struct timeval prev_timeval;
-# ifdef WIN3264
+# ifdef MSWIN
/*
* Windows doesn't have gettimeofday(), although it does have struct timeval.
*/
@@ -3567,7 +3567,7 @@ set_progpath(char_u *argv0)
{
char_u *val = argv0;
-# if defined(WIN32)
+# ifdef MSWIN
/* A relative path containing a "/" will become invalid when using ":cd",
* turn it into a full path.
* On MS-Windows "vim" should be expanded to "vim.exe", thus always do
@@ -3600,7 +3600,7 @@ set_progpath(char_u *argv0)
set_vim_var_string(VV_PROGPATH, val, -1);
-# ifdef WIN32
+# ifdef MSWIN
vim_free(path);
# endif
}
@@ -3623,7 +3623,7 @@ exec_on_server(mparm_T *parmp)
{
if (parmp->serverName_arg == NULL || *parmp->serverName_arg != NUL)
{
-# ifdef WIN32
+# ifdef MSWIN
/* Initialise the client/server messaging infrastructure. */
serverInitMessaging();
# endif
@@ -3645,7 +3645,7 @@ exec_on_server(mparm_T *parmp)
* clipboard first, it's further down. */
parmp->servername = serverMakeName(parmp->serverName_arg,
parmp->argv[0]);
-# ifdef WIN32
+# ifdef MSWIN
if (parmp->servername != NULL)
{
serverSetName(parmp->servername);
@@ -3842,7 +3842,7 @@ cmdsrv_main(
break;
}
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
/* Guess that when the server name starts with "g" it's a GUI
* server, which we can bring to the foreground here.
* Foreground() in the server doesn't work very well. */
@@ -3860,7 +3860,7 @@ cmdsrv_main(
int j;
char_u *done = alloc(numFiles);
char_u *p;
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
NOTIFYICONDATA ni;
int count = 0;
extern HWND message_window;
@@ -3870,7 +3870,7 @@ cmdsrv_main(
/* Skip "+cmd" argument, don't wait for it to be edited. */
--numFiles;
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
ni.cbSize = sizeof(ni);
ni.hWnd = message_window;
ni.uID = 0;
@@ -3884,7 +3884,7 @@ cmdsrv_main(
vim_memset(done, 0, numFiles);
while (memchr(done, 0, numFiles) != NULL)
{
-# ifdef WIN32
+# ifdef MSWIN
p = serverGetReply(srv, NULL, TRUE, TRUE, 0);
if (p == NULL)
break;
@@ -3895,7 +3895,7 @@ cmdsrv_main(
j = atoi((char *)p);
if (j >= 0 && j < numFiles)
{
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
++count;
sprintf(ni.szTip, _("%d of %d edited"),
count, numFiles);
@@ -3904,7 +3904,7 @@ cmdsrv_main(
done[j] = 1;
}
}
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
Shell_NotifyIcon(NIM_DELETE, &ni);
# endif
}
@@ -3913,7 +3913,7 @@ cmdsrv_main(
{
if (i == *argc - 1)
mainerr_arg_missing((char_u *)argv[i]);
-# ifdef WIN32
+# ifdef MSWIN
/* Win32 always works? */
if (serverSendToVim(sname, (char_u *)argv[i + 1],
&res, NULL, 1, 0, FALSE) < 0)
@@ -3935,7 +3935,7 @@ cmdsrv_main(
}
else if (STRICMP(argv[i], "--serverlist") == 0)
{
-# ifdef WIN32
+# ifdef MSWIN
/* Win32 always works? */
res = serverGetVimNames();
# else
diff --git a/src/mbyte.c b/src/mbyte.c
index aa10d5e32..9ad640460 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -97,7 +97,7 @@
# define WINBYTE BYTE
#endif
-#if (defined(WIN3264) || defined(WIN32UNIX)) && !defined(__MINGW32__)
+#if (defined(MSWIN) || defined(WIN32UNIX)) && !defined(__MINGW32__)
# include <winnls.h>
#endif
@@ -117,7 +117,7 @@
# else
# include <gdk/gdkkeysyms.h>
# endif
-# ifdef WIN3264
+# ifdef MSWIN
# include <gdk/gdkwin32.h>
# else
# include <gdk/gdkx.h>
@@ -364,7 +364,7 @@ enc_alias_table[] =
{"cyrillic", IDX_ISO_5},
{"arabic", IDX_ISO_6},
{"greek", IDX_ISO_7},
-#ifdef WIN3264
+#ifdef MSWIN
{"hebrew", IDX_CP1255},
#else
{"hebrew", IDX_ISO_8},
@@ -412,7 +412,7 @@ enc_alias_table[] =
{"euccn", IDX_EUC_CN},
{"gb2312", IDX_EUC_CN},
{"euctw", IDX_EUC_TW},
-#if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS_X)
+#if defined(MSWIN) || defined(WIN32UNIX) || defined(MACOS_X)
{"japan", IDX_CP932},
{"korea", IDX_CP949},
{"prc", IDX_CP936},
@@ -465,7 +465,7 @@ enc_canon_props(char_u *name)
i = enc_canon_search(name);
if (i >= 0)
return enc_canon_table[i].prop;
-#ifdef WIN3264
+#ifdef MSWIN
if (name[0] == 'c' && name[1] == 'p' && VIM_ISDIGIT(name[2]))
{
CPINFO cpinfo;
@@ -509,7 +509,7 @@ mb_init(void)
int idx;
int n;
int enc_dbcs_new = 0;
-#if defined(USE_ICONV) && !defined(WIN3264) && !defined(WIN32UNIX) \
+#if defined(USE_ICONV) && !defined(MSWIN) && !defined(WIN32UNIX) \
&& !defined(MACOS_CONVERT)
# define LEN_FROM_CONV
vimconv_T vimconv;
@@ -527,7 +527,7 @@ mb_init(void)
return NULL;
}
-#ifdef WIN3264
+#ifdef MSWIN
if (p_enc[0] == 'c' && p_enc[1] == 'p' && VIM_ISDIGIT(p_enc[2]))
{
CPINFO cpinfo;
@@ -566,7 +566,7 @@ codepage_invalid:
}
else if (STRNCMP(p_enc, "2byte-", 6) == 0)
{
-#ifdef WIN3264
+#ifdef MSWIN
/* Windows: accept only valid codepage numbers, check below. */
if (p_enc[6] != 'c' || p_enc[7] != 'p'
|| (enc_dbcs_new = atoi((char *)p_enc + 8)) == 0)
@@ -607,7 +607,7 @@ codepage_invalid:
if (enc_dbcs_new != 0)
{
-#ifdef WIN3264
+#ifdef MSWIN
/* Check if the DBCS code page is OK. */
if (!IsValidCodePage(enc_dbcs_new))
goto codepage_invalid;
@@ -618,7 +618,7 @@ codepage_invalid:
enc_dbcs = enc_dbcs_new;
has_mbyte = (enc_dbcs != 0 || enc_utf8);
-#if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+#if defined(MSWIN) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
enc_codepage = encname2codepage(p_enc);
enc_latin9 = (STRCMP(p_enc, "iso-8859-15") == 0);
#endif
@@ -699,7 +699,7 @@ codepage_invalid:
n = 1;
else
{
-#if defined(WIN3264) || defined(WIN32UNIX)
+#if defined(MSWIN) || defined(WIN32UNIX)
/* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows
* CodePage identifier, which we can pass directly in to Windows
* API */
@@ -783,7 +783,7 @@ codepage_invalid:
enc_utf8 ? "utf-8" : (char *)p_enc);
#endif
-#ifdef WIN32
+#ifdef MSWIN
/* When changing 'encoding' while starting up, then convert the command
* line arguments from the active codepage to 'encoding'. */
if (starting != 0)
@@ -909,7 +909,7 @@ dbcs_class(unsigned lead, unsigned trail)
unsigned char tb = trail;
/* convert process code to JIS */
-# if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS_X)
+# if defined(MSWIN) || defined(WIN32UNIX) || defined(MACOS_X)
/* process code is SJIS */
if (lb <= 0x9f)
lb = (lb - 0x81) * 2 + 0x21;
@@ -1006,7 +1006,7 @@ dbcs_class(unsigned lead, unsigned trail)
if (c1 >= 0xB0 && c1 <= 0xC8)
/* Hangul */
return 20;
-#if defined(WIN3264) || defined(WIN32UNIX)
+#if defined(MSWIN) || defined(WIN32UNIX)
else if (c1 <= 0xA0 || c2 <= 0xA0)
/* Extended Hangul Region : MS UHC(Unified Hangul Code) */
/* c1: 0x81-0xA0 with c2: 0x41-0x5A, 0x61-0x7A, 0x81-0xFE
@@ -4393,7 +4393,7 @@ enc_alias_search(char_u *name)
# include <langinfo.h>
#endif
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
/*
* Get the canonicalized encoding from the specified locale string "locale"
* or from the environment variables LC_ALL, LC_CTYPE and LANG.
@@ -4460,7 +4460,7 @@ enc_locale_env(char *locale)
char_u *
enc_locale(void)
{
-#ifdef WIN3264
+#ifdef MSWIN
char buf[50];
long acp = GetACP();
@@ -4487,7 +4487,7 @@ enc_locale(void)
#endif
}
-# if defined(WIN3264) || defined(PROTO) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
+# if defined(MSWIN) || defined(PROTO) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD)
/*
* Convert an encoding name to an MS-Windows codepage.
* Returns zero if no codepage can be figured out.
@@ -6570,7 +6570,7 @@ convert_setup_ext(
/* Internal utf-8 -> latin9 conversion. */
vcp->vc_type = CONV_TO_LATIN9;
}
-#ifdef WIN3264
+#ifdef MSWIN
/* Win32-specific codepage <-> codepage conversion without iconv. */
else if ((from_is_utf8 || encname2codepage(from) > 0)
&& (to_is_utf8 || encname2codepage(to) > 0))
@@ -6620,7 +6620,7 @@ convert_setup_ext(
return OK;
}
-#if defined(FEAT_GUI) || defined(AMIGA) || defined(WIN3264) \
+#if defined(FEAT_GUI) || defined(AMIGA) || defined(MSWIN) \
|| defined(PROTO)
/*
* Do conversion on typed input characters in-place.
@@ -6870,7 +6870,7 @@ string_convert_ext(
retval = iconv_string(vcp, ptr, len, unconvlenp, lenp);
break;
# endif
-# ifdef WIN3264
+# ifdef MSWIN
case CONV_CODEPAGE: /* codepage -> codepage */
{
int retlen;
diff --git a/src/memfile.c b/src/memfile.c
index 1a527340a..1827bcf2b 100644
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -621,7 +621,7 @@ mf_sync(memfile_T *mfp, int flags)
status = FAIL;
}
#endif
-#ifdef WIN32
+#ifdef MSWIN
if (_commit(mfp->mf_fd))
status = FAIL;
#endif
@@ -1265,7 +1265,7 @@ mf_do_open(
* try to open the file
*/
flags |= O_EXTRA | O_NOFOLLOW;
-#ifdef WIN32
+#ifdef MSWIN
/* Prevent handle inheritance that cause problems with Cscope
* (swap file may not be deleted if cscope connection was open after
* the file) */
diff --git a/src/memline.c b/src/memline.c
index c62ea5f60..66be0f333 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1807,7 +1807,7 @@ recover_names(
#else
names[0] = vim_strsave((char_u *)"*.sw?");
#endif
-#if defined(UNIX) || defined(WIN3264)
+#if defined(UNIX) || defined(MSWIN)
/* For Unix names starting with a dot are special. MS-Windows
* supports this too, on some file systems. */
names[1] = vim_strsave((char_u *)".*.sw?");
@@ -1834,7 +1834,7 @@ recover_names(
#else
names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE);
#endif
-#if defined(UNIX) || defined(WIN3264)
+#if defined(UNIX) || defined(MSWIN)
/* For Unix names starting with a dot are special. MS-Windows
* supports this too, on some file systems. */
names[1] = concat_fnames(dir_name, (char_u *)".*.sw?", TRUE);
@@ -1851,7 +1851,7 @@ recover_names(
}
else
{
-#if defined(UNIX) || defined(WIN3264)
+#if defined(UNIX) || defined(MSWIN)
int len = (int)STRLEN(dir_name);
p = dir_name + len;
@@ -1999,7 +1999,7 @@ recover_names(
return file_count;
}
-#if defined(UNIX) || defined(WIN3264) || defined(PROTO)
+#if defined(UNIX) || defined(MSWIN) || defined(PROTO)
/*
* Need _very_ long file names.
* Append the full path to name with path separators made into percent
@@ -2207,7 +2207,7 @@ recov_file_names(char_u **names, char_u *path, int prepend_dot)
*/
char_u *p;
int i;
-# ifndef WIN3264
+# ifndef MSWIN
int shortname = curbuf->b_shortname;
curbuf->b_shortname = FALSE;
@@ -2252,7 +2252,7 @@ recov_file_names(char_u **names, char_u *path, int prepend_dot)
else
++num_names;
-# ifndef WIN3264
+# ifndef MSWIN
/*
* Also try with 'shortname' set, in case the file is on a DOS filesystem.
*/
@@ -2279,7 +2279,7 @@ recov_file_names(char_u **names, char_u *path, int prepend_dot)
# endif
end:
-# ifndef WIN3264
+# ifndef MSWIN
curbuf->b_shortname = shortname;
# endif
@@ -4253,7 +4253,7 @@ makeswapname(
char_u fname_buf[MAXPATHL];
#endif
-#if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */
+#if defined(UNIX) || defined(MSWIN) // Need _very_ long file names
int len = (int)STRLEN(dir_name);
s = dir_name + len;
@@ -4343,7 +4343,7 @@ get_file_in_dir(
else
retval = concat_fnames(dname, tail, TRUE);
-#ifdef WIN3264
+#ifdef MSWIN
if (retval != NULL)
for (t = gettail(retval); *t != NUL; MB_PTR_ADV(t))
if (*t == ':')
@@ -4474,7 +4474,7 @@ findswapname(
# define CREATE_DUMMY_FILE
FILE *dummyfd = NULL;
-# ifdef WIN3264
+# ifdef MSWIN
if (buf_fname != NULL && !mch_isFullName(buf_fname)
&& vim_strchr(gettail(buf_fname), ':'))
{
@@ -4927,7 +4927,7 @@ findswapname(
mch_remove(buf_fname);
}
#endif
-#ifdef WIN3264
+#ifdef MSWIN
if (buf_fname != buf->b_fname)
vim_free(buf_fname);
#endif
diff --git a/src/menu.c b/src/menu.c
index 085d0e79c..41669ed4c 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -18,7 +18,7 @@
#define MENUDEPTH 10 /* maximum depth of menus */
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *, int);
#else
static int add_menu_path(char_u *, vimmenu_T *, int *, char_u *);
@@ -35,7 +35,7 @@ static int get_menu_cmd_modes(char_u *, int, int *, int *);
static char_u *popup_mode_name(char_u *name, int idx);
static char_u *menu_text(char_u *text, int *mnemonic, char_u **actext);
-#if defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)
static void gui_create_tearoffs_recurse(vimmenu_T *menu, const char_u *pname, int *pri_tab, int pri_idx);
static void gui_add_tearoff(char_u *tearpath, int *pri_tab, int pri_idx);
static void gui_destroy_tearoffs_recurse(vimmenu_T *menu);
@@ -43,7 +43,7 @@ static int s_tearoffs = FALSE;
#endif
static int menu_is_hidden(char_u *name);
-#if defined(FEAT_CMDL_COMPL) || (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF))
+#if defined(FEAT_CMDL_COMPL) || (defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF))
static int menu_is_tearoff(char_u *name);
#endif
@@ -122,7 +122,7 @@ ex_menu(
int i;
#if defined(FEAT_GUI) && !defined(FEAT_GUI_GTK)
int old_menu_height;
-# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
int old_toolbar_height;
# endif
#endif
@@ -295,7 +295,7 @@ ex_menu(
}
#if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
old_menu_height = gui.menu_height;
-# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
old_toolbar_height = gui.toolbar_height;
# endif
#endif
@@ -381,7 +381,7 @@ ex_menu(
menuarg.noremap[0] = noremap;
menuarg.silent[0] = silent;
add_menu_path(menu_path, &menuarg, pri_tab, map_to
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
, TRUE
#endif
);
@@ -405,7 +405,7 @@ ex_menu(
menuarg.icon_builtin = FALSE;
#endif
add_menu_path(p, &menuarg, pri_tab, map_to
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
, TRUE
#endif
);
@@ -421,7 +421,7 @@ ex_menu(
/* If the menubar height changed, resize the window */
if (gui.in_use
&& (gui.menu_height != old_menu_height
-# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
|| gui.toolbar_height != old_toolbar_height
# endif
))
@@ -455,7 +455,7 @@ add_menu_path(
icon_builtin, silent[0], noremap[0] */
int *pri_tab,
char_u *call_data
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
, int addtearoff /* may add tearoff item */
#endif
)
@@ -537,7 +537,7 @@ add_menu_path(
goto erret;
}
if (*next_name != NUL && menu->children == NULL
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
&& addtearoff
#endif
)
@@ -630,7 +630,7 @@ add_menu_path(
if (*next_name == NUL && menuarg->iconfile != NULL)
menu->iconfile = vim_strsave(menuarg->iconfile);
#endif
-#if defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)
/* the tearoff item must be present in the modes of each item. */
if (parent != NULL && menu_is_tearoff(parent->children->dname))
parent->children->modes |= modes;
@@ -645,7 +645,7 @@ add_menu_path(
* modes, then make sure it's available for this one now
* Also enable a menu when it's created or changed.
*/
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
/* If adding a tearbar (addtearoff == FALSE) don't update modes */
if (addtearoff)
#endif
@@ -680,7 +680,7 @@ add_menu_path(
}
}
-# if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+# if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
/* When adding a new submenu, may add a tearoff item */
if ( addtearoff
&& *next_name
@@ -758,7 +758,7 @@ add_menu_path(
c = 0;
d = 0;
if (amenu && call_data != NULL && *call_data != NUL
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
&& addtearoff
#endif
)
@@ -808,7 +808,7 @@ add_menu_path(
menu->silent[i] = menuarg->silent[0];
}
}
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
+#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN) \
&& (defined(FEAT_BEVAL_GUI) || defined(FEAT_GUI_GTK))
/* Need to update the menu tip. */
if (modes & MENU_TIP_MODE)
@@ -938,7 +938,7 @@ remove_menu(
}
if ((menu->modes & modes) != 0x0)
{
-#if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
/*
* If we are removing all entries for this menu,MENU_ALL_MODES,
* Then kill any tearoff before we start
@@ -992,7 +992,7 @@ remove_menu(
/* Recalculate modes for menu based on the new updated children */
menu->modes &= ~modes;
-#if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
if ((s_tearoffs) && (menu->children != NULL)) /* there's a tear bar.. */
child = menu->children->next; /* don't count tearoff bar */
else
@@ -1003,7 +1003,7 @@ remove_menu(
if (modes & MENU_TIP_MODE)
{
free_menu_string(menu, MENU_INDEX_TIP);
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
+#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN) \
&& (defined(FEAT_BEVAL_GUI) || defined(FEAT_GUI_GTK))
/* Need to update the menu tip. */
if (gui.in_use)
@@ -1013,7 +1013,7 @@ remove_menu(
if ((menu->modes & MENU_ALL_MODES) == 0)
{
/* The menu item is no longer valid in ANY mode, so delete it */
-#if defined(FEAT_GUI_W32) & defined(FEAT_TEAROFF)
+#if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
if (s_tearoffs && menu->children != NULL) /* there's a tear bar.. */
free_menu(&menu->children);
#endif
@@ -1867,7 +1867,7 @@ menu_is_hidden(char_u *name)
}
#if defined(FEAT_CMDL_COMPL) \
- || (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF))
+ || (defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF))
/*
* Return TRUE if the menu is the tearoff menu.
*/
@@ -2031,7 +2031,7 @@ gui_update_menus_recurse(vimmenu_T *menu, int mode)
while (menu)
{
if ((menu->modes & menu->enabled & mode)
-# if defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)
+# if defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)
|| menu_is_tearoff(menu->dname)
# endif
)
@@ -2105,7 +2105,7 @@ gui_is_menu_shortcut(int key)
# endif
#endif /* FEAT_GUI */
-#if (defined(FEAT_GUI_W32) && defined(FEAT_TEAROFF)) || defined(PROTO)
+#if (defined(FEAT_GUI_MSWIN) && defined(FEAT_TEAROFF)) || defined(PROTO)
/*
* Deal with tearoff items that are added like a menu item.
@@ -2257,7 +2257,7 @@ gui_destroy_tearoffs_recurse(vimmenu_T *menu)
}
}
-#endif /* FEAT_GUI_W32 && FEAT_TEAROFF */
+#endif /* FEAT_GUI_MSWIN && FEAT_TEAROFF */
/*
* Execute "menu". Use by ":emenu" and the window toolbar.
diff --git a/src/message.c b/src/message.c
index ed59d1b43..621edb970 100644
--- a/src/message.c
+++ b/src/message.c
@@ -2556,7 +2556,7 @@ t_puts(
msg_use_printf(void)
{
return (!msg_check_screen()
-#if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
|| !termcap_active
#endif
|| (swapping_screen() && !termcap_active)
@@ -2573,7 +2573,7 @@ msg_puts_printf(char_u *str, int maxlen)
char_u *buf = NULL;
char_u *p = s;
-#ifdef WIN3264
+#ifdef MSWIN
if (!(silent_mode && p_verbose == 0))
mch_settmode(TMODE_COOK); /* handle CR and NL correctly */
#endif
@@ -2633,7 +2633,7 @@ msg_puts_printf(char_u *str, int maxlen)
msg_didout = TRUE; // assume that line is not empty
-#ifdef WIN3264
+#ifdef MSWIN
if (!(silent_mode && p_verbose == 0))
mch_settmode(TMODE_RAW);
#endif
@@ -2934,7 +2934,7 @@ do_more_prompt(int typed_char)
void
mch_errmsg(char *str)
{
-#if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
int len = (int)STRLEN(str);
DWORD nwrite = 0;
DWORD mode = 0;
@@ -3022,7 +3022,7 @@ mch_errmsg(char *str)
void
mch_msg(char *str)
{
-#if defined(WIN3264) && !defined(FEAT_GUI_MSWIN)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
int len = (int)STRLEN(str);
DWORD nwrite = 0;
DWORD mode;
@@ -4008,7 +4008,7 @@ do_browse(
filter = BROWSE_FILTER_DEFAULT;
if (flags & BROWSE_DIR)
{
-# if defined(FEAT_GUI_GTK) || defined(WIN3264)
+# if defined(FEAT_GUI_GTK) || defined(MSWIN)
/* For systems that have a directory dialog. */
fname = gui_mch_browsedir(title, initdir);
# else
@@ -4754,7 +4754,7 @@ vim_vsnprintf_typval(
else if (length_modifier == 'L')
{
# ifdef FEAT_NUM64
-# ifdef WIN3264
+# ifdef MSWIN
f[f_l++] = 'I';
f[f_l++] = '6';
f[f_l++] = '4';
diff --git a/src/misc1.c b/src/misc1.c
index 1d957908e..75f4ab1ef 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -14,7 +14,7 @@
#include "vim.h"
#include "version.h"
-#if defined(FEAT_CMDL_COMPL) && defined(WIN3264)
+#if defined(FEAT_CMDL_COMPL) && defined(MSWIN)
# include <lm.h>
#endif
@@ -3852,7 +3852,7 @@ init_homedir(void)
var = mch_getenv((char_u *)"HOME");
#endif
-#ifdef WIN3264
+#ifdef MSWIN
/*
* Typically, $HOME is not defined on Windows, unless the user has
* specifically defined it for Vim's sake. However, on Windows NT
@@ -4318,7 +4318,7 @@ vim_getenv(char_u *name, int *mustfree)
if (p != NULL)
{
-#if defined(WIN3264)
+#if defined(MSWIN)
if (enc_utf8)
{
int len;
@@ -4362,7 +4362,7 @@ vim_getenv(char_u *name, int *mustfree)
else
p = mch_getenv((char_u *)"VIM");
-#if defined(WIN3264)
+#if defined(MSWIN)
if (enc_utf8)
{
int len;
@@ -4688,7 +4688,7 @@ init_users(void)
add_user((char_u *)pw->pw_name, TRUE);
endpwent();
}
-# elif defined(WIN3264)
+# elif defined(MSWIN)
{
DWORD nusers = 0, ntotal = 0, i;
PUSER_INFO_0 uinfo;
@@ -4820,7 +4820,7 @@ home_replace(
#else
homedir_env_orig = homedir_env = mch_getenv((char_u *)"HOME");
#endif
-#ifdef WIN3264
+#ifdef MSWIN
if (homedir_env == NULL)
homedir_env_orig = homedir_env = mch_getenv((char_u *)"USERPROFILE");
#endif
@@ -5619,7 +5619,7 @@ static int vim_backtick(char_u *p);
static int expand_backtick(garray_T *gap, char_u *pat, int flags);
# endif
-# if defined(WIN3264)
+# if defined(MSWIN)
/*
* File name expansion code for MS-DOS, Win16 and Win32. It's here because
* it's shared between these systems.
@@ -5898,7 +5898,7 @@ mch_expandpath(
{
return dos_expandpath(gap, path, 0, flags, FALSE);
}
-# endif /* WIN3264 */
+# endif // MSWIN
#if (defined(UNIX) && !defined(VMS)) || defined(USE_UNIXFILENAME) \
|| defined(PROTO)
@@ -6646,7 +6646,7 @@ get_isolated_shell_name(void)
{
char_u *p;
-#ifdef WIN3264
+#ifdef MSWIN
p = gettail(p_sh);
p = vim_strnsave(p, (int)(skiptowhite(p) - p));
#else
diff --git a/src/misc2.c b/src/misc2.c
index d323fe512..e513c1b61 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1427,7 +1427,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
length = (unsigned)STRLEN(string) + 3; /* two quotes and a trailing NUL */
for (p = string; *p != NUL; MB_PTR_ADV(p))
{
-# ifdef WIN32
+# ifdef MSWIN
if (!p_ssl)
{
if (*p == '"')
@@ -1458,7 +1458,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
d = escaped_string;
/* add opening quote */
-# ifdef WIN32
+# ifdef MSWIN
if (!p_ssl)
*d++ = '"';
else
@@ -1467,7 +1467,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
for (p = string; *p != NUL; )
{
-# ifdef WIN32
+# ifdef MSWIN
if (!p_ssl)
{
if (*p == '"')
@@ -1510,7 +1510,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
}
/* add terminating quote and finish with a NUL */
-# ifdef WIN32
+# ifdef MSWIN
if (!p_ssl)
*d++ = '"';
else
@@ -2169,7 +2169,7 @@ ga_append(garray_T *gap, int c)
}
}
-#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) \
+#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(MSWIN) \
|| defined(PROTO)
/*
* Append the text in "gap" below the cursor line and clear "gap".
@@ -4185,7 +4185,7 @@ filewritable(char_u *fname)
perm = mch_getperm(fname);
#endif
if (
-# ifdef WIN3264
+# ifdef MSWIN
mch_writable(fname) &&
# else
# if defined(UNIX) || defined(VMS)
@@ -4437,7 +4437,7 @@ parse_queued_messages(void)
for (i = 0; i < MAX_REPEAT_PARSE; ++i)
{
// For Win32 mch_breakcheck() does not check for input, do it here.
-# if defined(WIN32) && defined(FEAT_JOB_CHANNEL)
+# if defined(MSWIN) && defined(FEAT_JOB_CHANNEL)
channel_handle_events(FALSE);
# endif
diff --git a/src/nbdebug.c b/src/nbdebug.c
index 991bc6633..b76d9caf0 100644
--- a/src/nbdebug.c
+++ b/src/nbdebug.c
@@ -124,7 +124,7 @@ lookup(
expand_env((char_u *) file, (char_u *) buf, BUFSIZ);
return
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
(access(buf, F_OK) == 0);
#else
(access(buf, 0) == 0);
diff --git a/src/netbeans.c b/src/netbeans.c
index ecc7625e9..2682d1c0b 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -27,7 +27,7 @@
#if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
-#ifndef WIN32
+#ifndef MSWIN
# include <netdb.h>
# ifdef HAVE_LIBGEN_H
# include <libgen.h>
@@ -2347,7 +2347,7 @@ ex_nbstart(
{
#ifdef FEAT_GUI
# if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
- && !defined(FEAT_GUI_W32)
+ && !defined(FEAT_GUI_MSWIN)
if (gui.in_use)
{
emsg(_("E838: netbeans is not supported with this GUI"));
@@ -2567,7 +2567,7 @@ set_ref_in_nb_channel(int copyID)
}
#endif
-#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_W32) || defined(PROTO)
+#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) || defined(PROTO)
/*
* Tell netbeans that the window was moved or resized.
*/
diff --git a/src/normal.c b/src/normal.c
index ca0d8ff87..5ae9ff1ae 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5401,7 +5401,7 @@ nv_clear(cmdarg_T *cap)
# endif
#endif
redraw_later(CLEAR);
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
resize_console_buf();
#endif
}
diff --git a/src/option.c b/src/option.c
index eec8fe052..b71093b86 100644
--- a/src/option.c
+++ b/src/option.c
@@ -505,7 +505,7 @@ static struct vimoption options[] =
(char_u *)NULL, PV_NONE,
#endif
{
-#if (defined(WIN3264)) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
(char_u *)128L,
#else
(char_u *)224L,
@@ -575,7 +575,7 @@ static struct vimoption options[] =
{"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
(char_u *)&p_bg, PV_NONE,
{
-#if (defined(WIN3264)) && !defined(FEAT_GUI)
+#if (defined(MSWIN)) && !defined(FEAT_GUI)
(char_u *)"dark",
#else
(char_u *)"light",
@@ -1309,7 +1309,7 @@ static struct vimoption options[] =
#ifdef FEAT_QUICKFIX
(char_u *)&p_gp, PV_GP,
{
-# ifdef WIN3264
+# ifdef MSWIN
/* may be changed to "grep -n" in os_win32.c */
(char_u *)"findstr /n",
# else
@@ -1739,7 +1739,7 @@ static struct vimoption options[] =
{"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
(char_u *)&Rows, PV_NONE,
{
-#if defined(WIN3264)
+#if defined(MSWIN)
(char_u *)25L,
#else
(char_u *)24L,
@@ -1751,7 +1751,7 @@ static struct vimoption options[] =
#else
(char_u *)NULL, PV_NONE,
#endif
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
{(char_u *)1L, (char_u *)0L}
#else
{(char_u *)0L, (char_u *)0L}
@@ -1897,7 +1897,7 @@ static struct vimoption options[] =
{"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST,
(char_u *)&p_mouse, PV_NONE,
{
-#if defined(WIN3264)
+#if defined(MSWIN)
(char_u *)"a",
#else
(char_u *)"",
@@ -2260,7 +2260,7 @@ static struct vimoption options[] =
(char_u *)&p_report, PV_NONE,
{(char_u *)2L, (char_u *)0L} SCTX_INIT},
{"restorescreen", "rs", P_BOOL|P_VI_DEF,
-#ifdef WIN3264
+#ifdef MSWIN
(char_u *)&p_rs, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
@@ -2363,7 +2363,7 @@ static struct vimoption options[] =
#ifdef VMS
(char_u *)"-",
#else
-# if defined(WIN3264)
+# if defined(MSWIN)
(char_u *)"", /* set in set_init_1() */
# else
(char_u *)"sh",
@@ -2429,7 +2429,7 @@ static struct vimoption options[] =
{"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
(char_u *)&p_sxe, PV_NONE,
{
-#if defined(WIN3264)
+#if defined(MSWIN)
(char_u *)"\"&|<>()@^",
#else
(char_u *)"",
@@ -2720,7 +2720,7 @@ static struct vimoption options[] =
#endif
SCTX_INIT},
{"termwintype", "twt", P_STRING|P_ALLOCED|P_VI_DEF,
-#if defined(WIN3264) && defined(FEAT_TERMINAL)
+#if defined(MSWIN) && defined(FEAT_TERMINAL)
(char_u *)&p_twt, PV_NONE,
{(char_u *)"", (char_u *)NULL}
#else
@@ -2795,7 +2795,7 @@ static struct vimoption options[] =
#endif
{(char_u *)"", (char_u *)0L} SCTX_INIT},
{"toolbar", "tb", P_STRING|P_ONECOMMA|P_VI_DEF|P_NODUP,
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
(char_u *)&p_toolbar, PV_NONE,
{(char_u *)"icons,tooltips", (char_u *)0L}
#else
@@ -2857,7 +2857,7 @@ static struct vimoption options[] =
{"undolevels", "ul", P_NUM|P_VI_DEF,
(char_u *)&p_ul, PV_UL,
{
-#if defined(UNIX) || defined(WIN3264) || defined(VMS)
+#if defined(UNIX) || defined(MSWIN) || defined(VMS)
(char_u *)1000L,
#else
(char_u *)100L,
@@ -3033,7 +3033,7 @@ static struct vimoption options[] =
(char_u *)&p_wmw, PV_NONE,
{(char_u *)1L, (char_u *)0L} SCTX_INIT},
{"winptydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
-#if defined(WIN3264) && defined(FEAT_TERMINAL)
+#if defined(MSWIN) && defined(FEAT_TERMINAL)
(char_u *)&p_winptydll, PV_NONE, {
# ifdef _WIN64
(char_u *)"winpty64.dll",
@@ -3209,7 +3209,7 @@ static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "noins
#ifdef FEAT_SIGNS
static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
#endif
-#if defined(WIN3264) && defined(FEAT_TERMINAL)
+#if defined(MSWIN) && defined(FEAT_TERMINAL)
static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL};
#endif
@@ -3306,7 +3306,7 @@ set_init_1(int clean_arg)
if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
#if defined(MSWIN)
|| ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
-# ifdef WIN3264
+# ifdef MSWIN
|| ((p = (char_u *)default_shell()) != NULL && *p != NUL)
# endif
#endif
@@ -3575,7 +3575,7 @@ set_init_1(int clean_arg)
didset_options2();
-# if defined(WIN3264) && defined(FEAT_GETTEXT)
+# if defined(MSWIN) && defined(FEAT_GETTEXT)
/*
* If $LANG isn't set, try to get a good value for it. This makes the
* right language be used automatically. Don't do this for English.
@@ -3658,7 +3658,7 @@ set_init_1(int clean_arg)
}
#endif
-#if defined(WIN3264) && !defined(FEAT_GUI)
+#if defined(MSWIN) && !defined(FEAT_GUI)
/* Win32 console: When GetACP() returns a different value from
* GetConsoleCP() set 'termencoding'. */
if (GetACP() != GetConsoleCP())
@@ -3687,7 +3687,7 @@ set_init_1(int clean_arg)
p_tenc = empty_option;
}
#endif
-#if defined(WIN3264)
+#if defined(MSWIN)
/* $HOME may have characters in active code page. */
init_homedir();
#endif
@@ -3922,7 +3922,7 @@ set_init_2(void)
set_number_default("window", Rows - 1);
/* For DOS console the default is always black. */
-#if !((defined(WIN3264)) && !defined(FEAT_GUI))
+#if !((defined(MSWIN)) && !defined(FEAT_GUI))
/*
* If 'background' wasn't set by the user, try guessing the value,
* depending on the terminal name. Only need to check for terminals
@@ -3965,7 +3965,7 @@ set_init_2(void)
static char_u *
term_bg_default(void)
{
-#if defined(WIN3264)
+#if defined(MSWIN)
/* DOS console is nearly always black */
return (char_u *)"dark";
#else
@@ -3990,7 +3990,7 @@ term_bg_default(void)
void
set_init_3(void)
{
-#if defined(UNIX) || defined(WIN3264)
+#if defined(UNIX) || defined(MSWIN)
/*
* Set 'shellpipe' and 'shellredir', depending on the 'shell' option.
* This is done after other initializations, where 'shell' might have been
@@ -4025,7 +4025,7 @@ set_init_3(void)
*/
if ( fnamecmp(p, "csh") == 0
|| fnamecmp(p, "tcsh") == 0
-# if defined(WIN3264) /* also check with .exe extension */
+# if defined(MSWIN) // also check with .exe extension
|| fnamecmp(p, "csh.exe") == 0
|| fnamecmp(p, "tcsh.exe") == 0
# endif
@@ -4034,7 +4034,7 @@ set_init_3(void)
# if defined(FEAT_QUICKFIX)
if (do_sp)
{
-# ifdef WIN3264
+# ifdef MSWIN
p_sp = (char_u *)">&";
# else
p_sp = (char_u *)"|& tee";
@@ -4058,7 +4058,7 @@ set_init_3(void)
|| fnamecmp(p, "zsh-beta") == 0
|| fnamecmp(p, "bash") == 0
|| fnamecmp(p, "fish") == 0
-# ifdef WIN3264
+# ifdef MSWIN
|| fnamecmp(p, "cmd") == 0
|| fnamecmp(p, "sh.exe") == 0
|| fnamecmp(p, "ksh.exe") == 0
@@ -4074,7 +4074,7 @@ set_init_3(void)
# if defined(FEAT_QUICKFIX)
if (do_sp)
{
-# ifdef WIN3264
+# ifdef MSWIN
p_sp = (char_u *)">%s 2>&1";
# else
p_sp = (char_u *)"2>&1| tee";
@@ -4092,7 +4092,7 @@ set_init_3(void)
}
#endif
-#if defined(WIN3264)
+#if defined(MSWIN)
/*
* Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the
* 'shell' option.
@@ -5553,7 +5553,7 @@ didset_options(void)
(void)compile_cap_prog(curwin->w_s);
(void)did_set_spell_option(TRUE);
#endif
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
(void)opt_strings_flags(p_toolbar, p_toolbar_values, &toolbar_flags, TRUE);
#endif
#if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
@@ -6403,7 +6403,7 @@ did_set_string_option(
}
}
-#if defined(WIN3264)
+#if defined(MSWIN)
/* $HOME may have characters in active code page. */
if (varp == &p_enc)
init_homedir();
@@ -6810,7 +6810,7 @@ did_set_string_option(
{
out_str(T_ME);
redraw_later(CLEAR);
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
/* Since t_me has been set, this probably means that the user
* wants to use this as default colors. Need to reset default
* background/foreground colors. */
@@ -7228,7 +7228,7 @@ did_set_string_option(
#endif
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
/* 'toolbar' */
else if (varp == &p_toolbar)
{
@@ -7498,7 +7498,7 @@ did_set_string_option(
errmsg = e_invarg;
}
}
-# if defined(WIN3264)
+# if defined(MSWIN)
// 'termwintype'
else if (varp == &p_twt)
{
diff --git a/src/option.h b/src/option.h
index 2f1d322bf..782452006 100644
--- a/src/option.h
+++ b/src/option.h
@@ -18,7 +18,7 @@
#ifdef AMIGA
# define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m,%f|%l| %m"
#else
-# if defined(WIN3264)
+# if defined(MSWIN)
# define DFLT_EFM "%f(%l) \\=: %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) \\=: %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m"
# else
# if defined(__QNX__)
@@ -546,10 +546,6 @@ EXTERN long p_hi; /* 'history' */
#ifdef FEAT_RIGHTLEFT
EXTERN int p_hkmap; /* 'hkmap' */
EXTERN int p_hkmapp; /* 'hkmapp' */
-# ifdef FEAT_FKMAP
-EXTERN int p_fkmap; /* 'fkmap' */
-EXTERN int p_altkeymap; /* 'altkeymap' */
-# endif
# ifdef FEAT_ARABIC
EXTERN int p_arshape; /* 'arabicshape' */
# endif
@@ -694,7 +690,7 @@ EXTERN long p_report; /* 'report' */
#if defined(FEAT_QUICKFIX)
EXTERN long p_pvh; /* 'previewheight' */
#endif
-#ifdef WIN3264
+#ifdef MSWIN
EXTERN int p_rs; /* 'restorescreen' */
#endif
#ifdef FEAT_RIGHTLEFT
@@ -827,7 +823,7 @@ EXTERN char_u *p_tenc; /* 'termencoding' */
#ifdef FEAT_TERMGUICOLORS
EXTERN int p_tgc; /* 'termguicolors' */
#endif
-#if defined(WIN3264) && defined(FEAT_TERMINAL)
+#if defined(MSWIN) && defined(FEAT_TERMINAL)
EXTERN char_u *p_twt; // 'termwintype'
#endif
EXTERN int p_terse; /* 'terse' */
@@ -848,7 +844,7 @@ EXTERN int p_ttimeout; /* 'ttimeout' */
EXTERN long p_ttm; /* 'ttimeoutlen' */
EXTERN int p_tbi; /* 'ttybuiltin' */
EXTERN int p_tf; /* 'ttyfast' */
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
EXTERN char_u *p_toolbar; /* 'toolbar' */
EXTERN unsigned toolbar_flags;
# ifdef IN_OPTION_C
@@ -945,7 +941,7 @@ EXTERN long p_wh; /* 'winheight' */
EXTERN long p_wmh; /* 'winminheight' */
EXTERN long p_wmw; /* 'winminwidth' */
EXTERN long p_wiw; /* 'winwidth' */
-#if defined(WIN3264) && defined(FEAT_TERMINAL)
+#if defined(MSWIN) && defined(FEAT_TERMINAL)
EXTERN char_u *p_winptydll; /* 'winptydll' */
#endif
EXTERN int p_ws; /* 'wrapscan' */
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 9da72b0a4..27a2cc6ac 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -32,7 +32,7 @@
#endif
#ifndef PROTO
-# if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32)
+# if defined(FEAT_TITLE) && !defined(FEAT_GUI_MSWIN)
# include <shellapi.h>
# endif
@@ -3091,7 +3091,7 @@ get_logfont(
}
if (STRCMP(name, "*") == 0)
{
-#if defined(FEAT_GUI_W32)
+#if defined(FEAT_GUI_MSWIN)
CHOOSEFONT cf;
/* if name is "*", bring up std font dialog: */
vim_memset(&cf, 0, sizeof(cf));
diff --git a/src/os_unix.c b/src/os_unix.c
index 425498c6b..001f08575 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -49,7 +49,7 @@ static int selinux_enabled = -1;
#endif
#ifdef __CYGWIN__
-# ifndef WIN32
+# ifndef MSWIN
# include <cygwin/version.h>
# include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() and/or
* for cygwin_conv_path() */
diff --git a/src/os_w32exe.c b/src/os_w32exe.c
index f96bff4c8..197d65da4 100644
--- a/src/os_w32exe.c
+++ b/src/os_w32exe.c
@@ -22,7 +22,7 @@
/* cproto doesn't create a prototype for main() */
int _cdecl
-#if defined(FEAT_GUI_W32)
+#if defined(FEAT_GUI_MSWIN)
VimMain
#else
main
@@ -104,7 +104,7 @@ WinMain(
pSaveInst = SaveInst;
# endif
pmain =
-# if defined(FEAT_GUI_W32)
+# if defined(FEAT_GUI_MSWIN)
//&& defined(__MINGW32__)
VimMain
# else
diff --git a/src/os_win32.c b/src/os_win32.c
index a392d13b2..b9233156e 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -10,7 +10,7 @@
* os_win32.c
*
* Used for both the console version and the Win32 GUI. A lot of code is for
- * the console version only, so there is a lot of "#ifndef FEAT_GUI_W32".
+ * the console version only, so there is a lot of "#ifndef FEAT_GUI_MSWIN".
*
* Win32 (Windows NT and Windows 95) system-dependent routines.
* Portions lifted from the Win32 SDK samples, the MSDOS-dependent code,
@@ -45,7 +45,7 @@
#endif
#ifndef PROTO
-# if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32)
+# if defined(FEAT_TITLE) && !defined(FEAT_GUI_MSWIN)
# include <shellapi.h>
# endif
#endif
@@ -151,7 +151,7 @@ typedef int LPSECURITY_ATTRIBUTES;
# define wcsicmp(a, b) wcscmpi((a), (b))
#endif
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
/* Win32 Console handles for input and output */
static HANDLE g_hConIn = INVALID_HANDLE_VALUE;
static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
@@ -193,7 +193,7 @@ static int conpty_working = 0;
static int conpty_stable = 0;
static void vtp_flag_init();
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
static int vtp_working = 0;
static void vtp_init();
static void vtp_exit();
@@ -227,7 +227,7 @@ static void reset_console_color_rgb(void);
# define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
static int suppress_winsize = 1; /* don't fiddle with console */
#endif
@@ -235,7 +235,7 @@ static char_u *exe_path = NULL;
static BOOL win8_or_later = FALSE;
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
/* Dynamic loading for portability */
typedef struct _DYN_CONSOLE_SCREEN_BUFFER_INFOEX
{
@@ -284,7 +284,7 @@ get_build_number(void)
return ver;
}
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
/*
* Version of ReadConsoleInput() that works with IME.
* Works around problems on Windows 8.
@@ -830,7 +830,7 @@ PlatformId(void)
}
}
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
#define SHIFT (SHIFT_PRESSED)
#define CTRL (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED)
@@ -1122,7 +1122,7 @@ decode_key_event(
# pragma optimize("", on)
#endif
-#endif /* FEAT_GUI_W32 */
+#endif /* FEAT_GUI_MSWIN */
#ifdef FEAT_MOUSE
@@ -1130,7 +1130,7 @@ decode_key_event(
/*
* For the GUI the mouse handling is in gui_w32.c.
*/
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
void
mch_setmouse(int on UNUSED)
{
@@ -1441,7 +1441,7 @@ decode_mouse_event(
return TRUE;
}
-# endif /* FEAT_GUI_W32 */
+# endif /* FEAT_GUI_MSWIN */
#endif /* FEAT_MOUSE */
@@ -1481,7 +1481,7 @@ mch_update_cursor(void)
}
#endif
-#ifndef FEAT_GUI_W32 /* this isn't used for the GUI */
+#ifndef FEAT_GUI_MSWIN /* this isn't used for the GUI */
/*
* Handle FOCUS_EVENT.
*/
@@ -1775,7 +1775,7 @@ tgetch(int *pmodifiers, WCHAR *pch2)
#endif
}
}
-#endif /* !FEAT_GUI_W32 */
+#endif /* !FEAT_GUI_MSWIN */
/*
@@ -1793,7 +1793,7 @@ mch_inchar(
long time UNUSED,
int tb_change_cnt UNUSED)
{
-#ifndef FEAT_GUI_W32 /* this isn't used for the GUI */
+#ifndef FEAT_GUI_MSWIN /* this isn't used for the GUI */
int len;
int c;
@@ -2006,9 +2006,9 @@ theend:
}
return len;
-#else /* FEAT_GUI_W32 */
+#else /* FEAT_GUI_MSWIN */
return 0;
-#endif /* FEAT_GUI_W32 */
+#endif /* FEAT_GUI_MSWIN */
}
#ifndef PROTO
@@ -2123,7 +2123,7 @@ bad_param_handler(const wchar_t *expression,
# define SET_INVALID_PARAM_HANDLER
#endif
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
/*
* GUI version of mch_init().
@@ -2196,7 +2196,7 @@ mch_init(void)
}
-#else /* FEAT_GUI_W32 */
+#else /* FEAT_GUI_MSWIN */
#define SRWIDTH(sr) ((sr).Right - (sr).Left + 1)
#define SRHEIGHT(sr) ((sr).Bottom - (sr).Top + 1)
@@ -2751,7 +2751,7 @@ mch_exit(int r)
exit(r);
}
-#endif /* !FEAT_GUI_W32 */
+#endif /* !FEAT_GUI_MSWIN */
/*
* Do we have an interactive window?
@@ -2763,7 +2763,7 @@ mch_check_win(
{
get_exe_name();
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
return OK; /* GUI always has a tty */
#else
if (isatty(1))
@@ -3852,7 +3852,7 @@ mch_free_acl(vim_acl_T acl)
#endif
}
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
/*
* handler for ctrl-break, ctrl-c interrupts, and fatal events.
@@ -4168,7 +4168,7 @@ mch_set_winsize_now(void)
}
suppress_winsize = 0;
}
-#endif /* FEAT_GUI_W32 */
+#endif /* FEAT_GUI_MSWIN */
static BOOL
vim_create_process(
@@ -4249,7 +4249,7 @@ vim_shell_execute(
}
-#if defined(FEAT_GUI_W32) || defined(PROTO)
+#if defined(FEAT_GUI_MSWIN) || defined(PROTO)
/*
* Specialised version of system() for Win32 GUI mode.
@@ -5124,7 +5124,7 @@ mch_call_shell(
else
{
x = -1;
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
emsg(_("E371: Command not found"));
#endif
}
@@ -5144,7 +5144,7 @@ mch_call_shell(
else
{
cmdlen = (
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
(!p_stmp ? 0 : STRLEN(vimrun_path)) +
#endif
STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10);
@@ -5152,7 +5152,7 @@ mch_call_shell(
newcmd = lalloc(cmdlen, TRUE);
if (newcmd != NULL)
{
-#if defined(FEAT_GUI_W32)
+#if defined(FEAT_GUI_MSWIN)
if (need_vimrun_warning)
{
char *msg = _("VIMRUN.EXE not found in your $PATH.\n"
@@ -5196,7 +5196,7 @@ mch_call_shell(
/* Print the return value, unless "vimrun" was used. */
if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
-#if defined(FEAT_GUI_W32)
+#if defined(FEAT_GUI_MSWIN)
&& ((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp)
#endif
)
@@ -5736,7 +5736,7 @@ mch_clear_job(job_T *job)
#endif
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
/*
* Start termcap mode
@@ -5852,10 +5852,10 @@ termcap_mode_end(void)
g_fTermcapMode = FALSE;
}
-#endif /* FEAT_GUI_W32 */
+#endif /* FEAT_GUI_MSWIN */
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
void
mch_write(
char_u *s UNUSED,
@@ -6692,7 +6692,7 @@ mch_write(
#endif
}
-#endif /* FEAT_GUI_W32 */
+#endif /* FEAT_GUI_MSWIN */
/*
@@ -6703,7 +6703,7 @@ mch_delay(
long msec,
int ignoreinput UNUSED)
{
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
Sleep((int)msec); /* never wait for input */
#else /* Console */
if (ignoreinput)
@@ -6771,7 +6771,7 @@ mch_remove(char_u *name)
void
mch_breakcheck(int force)
{
-#ifndef FEAT_GUI_W32 /* never used */
+#ifndef FEAT_GUI_MSWIN /* never used */
if (g_fCtrlCPressed || g_fCBrkPressed)
{
ctrl_break_was_pressed = g_fCBrkPressed;
@@ -7696,7 +7696,7 @@ mch_setenv(char *var, char *value, int x)
vtp_flag_init(void)
{
DWORD ver = get_build_number();
-#ifndef FEAT_GUI_W32
+#ifndef FEAT_GUI_MSWIN
DWORD mode;
HANDLE out;
@@ -7716,7 +7716,7 @@ vtp_flag_init(void)
}
-#if !defined(FEAT_GUI_W32) || defined(PROTO)
+#if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
static void
vtp_init(void)
@@ -7941,7 +7941,7 @@ is_conpty_stable(void)
return conpty_stable;
}
-#if !defined(FEAT_GUI_W32) || defined(PROTO)
+#if !defined(FEAT_GUI_MSWIN) || defined(PROTO)
void
resize_console_buf(void)
{
diff --git a/src/os_win32.h b/src/os_win32.h
index 6c4a349f9..6ebe0373e 100644
--- a/src/os_win32.h
+++ b/src/os_win32.h
@@ -70,7 +70,7 @@
#if defined(__DATE__) && defined(__TIME__)
# define HAVE_DATE_TIME
#endif
-#ifndef FEAT_GUI_W32 /* GUI works different */
+#ifndef FEAT_GUI_MSWIN /* GUI works different */
# define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
#endif
@@ -78,7 +78,7 @@
#define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
# define NO_CONSOLE /* don't included console-only code */
#endif
diff --git a/src/proto.h b/src/proto.h
index c19d15516..43192ffd5 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -38,7 +38,7 @@
# if defined(UNIX) || defined(VMS)
# include "os_unix.pro"
# endif
-# ifdef WIN3264
+# ifdef MSWIN
# include "os_win32.pro"
# include "os_mswin.pro"
# include "winclip.pro"
@@ -266,7 +266,7 @@ extern int putenv(const char *string); /* in misc2.c */
extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */
# endif
# endif
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
# include "gui_w32.pro"
# endif
# ifdef FEAT_GUI_GTK
diff --git a/src/screen.c b/src/screen.c
index d06cc3fcb..4973b510d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7974,7 +7974,7 @@ screen_start_highlight(int attr)
screen_attr = attr;
if (full_screen
-#ifdef WIN3264
+#ifdef MSWIN
&& termcap_active
#endif
)
@@ -8081,7 +8081,7 @@ screen_stop_highlight(void)
int do_ME = FALSE; /* output T_ME code */
if (screen_attr != 0
-#ifdef WIN3264
+#ifdef MSWIN
&& termcap_active
#endif
)
diff --git a/src/search.c b/src/search.c
index 9a47ed460..20f6299ee 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1246,7 +1246,7 @@ do_search(
}
if (options & SEARCH_REV)
{
-#ifdef WIN32
+#ifdef MSWIN
/* There is a bug in the Visual C++ 2.2 compiler which means that
* dirc always ends up being '/' */
dirc = (dirc == '/') ? '?' : '/';
diff --git a/src/structs.h b/src/structs.h
index fdef811e4..ab84eaeaa 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1073,7 +1073,7 @@ typedef struct
{
int vc_type; /* zero or one of the CONV_ values */
int vc_factor; /* max. expansion factor */
-# ifdef WIN3264
+# ifdef MSWIN
int vc_cpfrom; /* codepage to convert from (CONV_CODEPAGE) */
int vc_cpto; /* codepage to convert to (CONV_CODEPAGE) */
# endif
@@ -1101,7 +1101,7 @@ typedef struct
#define CONV_TO_LATIN1 3
#define CONV_TO_LATIN9 4
#define CONV_ICONV 5
-#ifdef WIN3264
+#ifdef MSWIN
# define CONV_CODEPAGE 10 /* codepage -> codepage */
#endif
#ifdef MACOS_X
@@ -1187,7 +1187,7 @@ typedef long_u hash_T; /* Type for hi_hash */
#ifdef FEAT_NUM64
/* Use 64-bit Number. */
-# ifdef WIN3264
+# ifdef MSWIN
# ifdef PROTO
typedef long varnumber_T;
typedef unsigned long uvarnumber_T;
@@ -1543,7 +1543,7 @@ struct jobvar_S
#ifdef UNIX
pid_t jv_pid;
#endif
-#ifdef WIN32
+#ifdef MSWIN
PROCESS_INFORMATION jv_proc_info;
HANDLE jv_job_object;
#endif
@@ -1554,7 +1554,7 @@ struct jobvar_S
#ifdef UNIX
char_u *jv_termsig; /* allocated */
#endif
-#ifdef WIN3264
+#ifdef MSWIN
char_u *jv_tty_type; // allocated
#endif
int jv_exitval;
@@ -1670,7 +1670,7 @@ typedef struct {
* message when the deadline was set. If it gets longer (something was
* received) the deadline is reset. */
size_t ch_wait_len;
-#ifdef WIN32
+#ifdef MSWIN
DWORD ch_deadline;
#else
struct timeval ch_deadline;
@@ -1720,7 +1720,7 @@ struct channel_S {
/* callback for Netbeans when channel is
* closed */
-#ifdef WIN32
+#ifdef MSWIN
int ch_named_pipe; /* using named pipe instead of pty */
#endif
char_u *ch_callback; /* call when any msg is not handled */
@@ -3225,7 +3225,7 @@ struct VimMenu
#ifdef FEAT_BEVAL_TIP
BalloonEval *tip; /* tooltip for this menu item */
#endif
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
UINT id; /* Id of menu item */
HMENU submenu_id; /* If this is submenu, add children here */
HWND tearoff_handle; /* hWnd of tearoff if created */
diff --git a/src/syntax.c b/src/syntax.c
index 16c75f27d..df351a31a 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -8274,7 +8274,7 @@ free_highlight(void)
void
restore_cterm_colors(void)
{
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
/* Since t_me has been set, this probably means that the user
* wants to use this as default colors. Need to reset default
* background/foreground colors. */
@@ -9559,7 +9559,7 @@ set_hl_attr(
at_en.ae_u.cterm.fg_color = sgp->sg_cterm_fg;
at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg;
# ifdef FEAT_TERMGUICOLORS
-# ifdef WIN3264
+# ifdef MSWIN
{
int id;
guicolor_T fg, bg;
@@ -9822,8 +9822,8 @@ syn_id2colors(int hl_id, guicolor_T *fgp, guicolor_T *bgp)
}
#endif
-#if (defined(WIN3264) \
- && !defined(FEAT_GUI_W32) \
+#if (defined(MSWIN) \
+ && !defined(FEAT_GUI_MSWIN) \
&& defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
void
syn_id2cterm_bg(int hl_id, int *fgp, int *bgp)
diff --git a/src/term.c b/src/term.c
index 9eebd28cb..8ee9264da 100644
--- a/src/term.c
+++ b/src/term.c
@@ -533,7 +533,7 @@ static struct builtin_term builtin_termcaps[] =
{K_PAGEUP, "\316I"},
# endif
-# if defined(WIN3264) || defined(ALL_BUILTIN_TCAPS)
+# if defined(MSWIN) || defined(ALL_BUILTIN_TCAPS)
/*
* These codes are valid for the Win32 Console . The entries that start with
* ESC | are translated into console calls in os_win32.c. The function keys
@@ -2036,7 +2036,7 @@ set_termname(char_u *term)
/* termcap failed to report size */
/* set defaults, in case ui_get_shellsize() also fails */
width = 80;
-#if defined(WIN3264)
+#if defined(MSWIN)
height = 25; /* console is often 25 lines */
#else
height = 24; /* most terminals are 24 lines */
@@ -4082,7 +4082,7 @@ add_termcode(char_u *name, char_u *string, int flags)
return;
}
-#if defined(WIN3264) && !defined(FEAT_GUI)
+#if defined(MSWIN) && !defined(FEAT_GUI)
s = vim_strnsave(string, (int)STRLEN(string) + 1);
#else
s = vim_strsave(string);
@@ -4097,7 +4097,7 @@ add_termcode(char_u *name, char_u *string, int flags)
s[0] = term_7to8bit(string);
}
-#if defined(WIN3264) && !defined(FEAT_GUI)
+#if defined(MSWIN) && !defined(FEAT_GUI)
if (s[0] == K_NUL)
{
STRMOVE(s + 1, s);
@@ -6721,7 +6721,7 @@ translate_mapping(
}
#endif
-#if (defined(WIN3264) && !defined(FEAT_GUI)) || defined(PROTO)
+#if (defined(MSWIN) && !defined(FEAT_GUI)) || defined(PROTO)
static char ksme_str[20];
static char ksmr_str[20];
static char ksmd_str[20];
@@ -6917,7 +6917,7 @@ gui_get_color_cmn(char_u *name)
/* On MS-Windows an RGB macro is available and it produces 0x00bbggrr color
* values as used by the MS-Windows GDI api. It should be used only for
* MS-Windows GDI builds. */
-# if defined(RGB) && defined(WIN32) && !defined(FEAT_GUI)
+# if defined(RGB) && defined(MSWIN) && !defined(FEAT_GUI)
# undef RGB
# endif
# ifndef RGB
@@ -7085,7 +7085,7 @@ gui_get_rgb_color_cmn(int r, int g, int b)
}
#endif
-#if (defined(WIN3264) && !defined(FEAT_GUI_W32)) || defined(FEAT_TERMINAL) \
+#if (defined(MSWIN) && !defined(FEAT_GUI_MSWIN)) || defined(FEAT_TERMINAL) \
|| defined(PROTO)
static int cube_value[] = {
0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF
@@ -7162,3 +7162,4 @@ cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx)
}
}
#endif
+
diff --git a/src/terminal.c b/src/terminal.c
index 899d3b687..7e67314f9 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -66,7 +66,7 @@ typedef struct sb_line_S {
char_u *sb_text; // for tl_scrollback_postponed
} sb_line_T;
-#ifdef WIN3264
+#ifdef MSWIN
# ifndef HPCON
# define HPCON VOID*
# endif
@@ -112,7 +112,7 @@ struct terminal_S {
char_u *tl_arg0_cmd; // To format the status bar
-#ifdef WIN3264
+#ifdef MSWIN
void *tl_winpty_config;
void *tl_winpty;
@@ -172,7 +172,7 @@ static term_T *first_term = NULL;
/* Terminal active in terminal_loop(). */
static term_T *in_terminal_loop = NULL;
-#ifdef WIN3264
+#ifdef MSWIN
static BOOL has_winpty = FALSE;
static BOOL has_conpty = FALSE;
#endif
@@ -324,7 +324,7 @@ init_job_options(jobopt_T *opt)
static void
setup_job_options(jobopt_T *opt, int rows, int cols)
{
-#ifndef WIN3264
+#ifndef MSWIN
/* Win32: Redirecting the job output won't work, thus always connect stdout
* here. */
if (!(opt->jo_set & JO_OUT_IO))
@@ -337,7 +337,7 @@ setup_job_options(jobopt_T *opt, int rows, int cols)
opt->jo_set |= JO_OUT_IO + JO_OUT_BUF + JO_OUT_MODIFIABLE;
}
-#ifndef WIN3264
+#ifndef MSWIN
/* Win32: Redirecting the job output won't work, thus always connect stderr
* here. */
if (!(opt->jo_set & JO_ERR_IO))
@@ -570,7 +570,7 @@ term_start(
curbuf->b_p_ma = FALSE;
set_term_and_win_size(term);
-#ifdef WIN3264
+#ifdef MSWIN
mch_memmove(orig_opt.jo_io, opt->jo_io, sizeof(orig_opt.jo_io));
#endif
setup_job_options(opt, term->tl_rows, term->tl_cols);
@@ -748,7 +748,7 @@ ex_terminal(exarg_T *eap)
vim_free(buf);
*p = ' ';
}
-#ifdef WIN3264
+#ifdef MSWIN
else if ((int)(p - cmd) == 4 && STRNICMP(cmd, "type", 4) == 0
&& ep != NULL)
{
@@ -824,7 +824,7 @@ term_write_session(FILE *fd, win_T *wp)
if (fprintf(fd, "terminal ++curwin ++cols=%d ++rows=%d ",
term->tl_cols, term->tl_rows) < 0)
return FAIL;
-#ifdef WIN3264
+#ifdef MSWIN
if (fprintf(fd, "++type=%s ", term->tl_job->jv_tty_type) < 0)
return FAIL;
#endif
@@ -932,7 +932,7 @@ free_unused_terminals()
vim_free(term->tl_opencmd);
vim_free(term->tl_eof_chars);
vim_free(term->tl_arg0_cmd);
-#ifdef WIN3264
+#ifdef MSWIN
if (term->tl_out_fd != NULL)
fclose(term->tl_out_fd);
#endif
@@ -1027,7 +1027,7 @@ write_to_term(buf_T *buffer, char_u *msg, channel_T *channel)
size_t len = STRLEN(msg);
term_T *term = buffer->b_term;
-#ifdef WIN3264
+#ifdef MSWIN
/* Win32: Cannot redirect output of the job, intercept it here and write to
* the file. */
if (term->tl_out_fd != NULL)
@@ -1471,7 +1471,7 @@ add_scrollback_line_to_buffer(term_T *term, char_u *text, int len)
int empty = (buf->b_ml.ml_flags & ML_EMPTY);
linenr_T lnum = buf->b_ml.ml_line_count;
-#ifdef WIN3264
+#ifdef MSWIN
if (!enc_utf8 && enc_codepage > 0)
{
WCHAR *ret = NULL;
@@ -1875,7 +1875,7 @@ term_vgetc()
State = TERMINAL;
got_int = FALSE;
-#ifdef WIN3264
+#ifdef MSWIN
ctrl_break_was_pressed = FALSE;
#endif
c = vgetc();
@@ -2016,7 +2016,7 @@ term_paste_register(int prev_c UNUSED)
for (item = l->lv_first; item != NULL; item = item->li_next)
{
char_u *s = tv_get_string(&item->li_tv);
-#ifdef WIN3264
+#ifdef MSWIN
char_u *tmp = s;
if (!enc_utf8 && enc_codepage > 0)
@@ -2036,7 +2036,7 @@ term_paste_register(int prev_c UNUSED)
#endif
channel_send(curbuf->b_term->tl_job->jv_channel, PART_IN,
s, (int)STRLEN(s), NULL);
-#ifdef WIN3264
+#ifdef MSWIN
if (tmp != s)
vim_free(s);
#endif
@@ -2293,7 +2293,7 @@ terminal_loop(int blocking)
}
#endif
-#ifdef WIN3264
+#ifdef MSWIN
/* On Windows winpty handles CTRL-C, don't send a CTRL_C_EVENT.
* Use CTRL-BREAK to kill the job. */
if (ctrl_break_was_pressed)
@@ -2370,7 +2370,7 @@ terminal_loop(int blocking)
goto theend;
}
}
-# ifdef WIN3264
+# ifdef MSWIN
if (!enc_utf8 && has_mbyte && c >= 0x80)
{
WCHAR wc;
@@ -2719,7 +2719,7 @@ handle_settermprop(
// Empty corrupted data of winpty
else if (STRNCMP(" - ", (char_u *)value->string, 4) == 0)
term->tl_title = NULL;
-#ifdef WIN3264
+#ifdef MSWIN
else if (!enc_utf8 && enc_codepage > 0)
{
WCHAR *ret = NULL;
@@ -3072,7 +3072,7 @@ term_channel_closed(channel_T *ch)
VIM_CLEAR(term->tl_title);
VIM_CLEAR(term->tl_status_text);
-#ifdef WIN3264
+#ifdef MSWIN
if (term->tl_out_fd != NULL)
{
fclose(term->tl_out_fd);
@@ -3184,7 +3184,7 @@ term_line2screenline(VTermScreen *screen, VTermPos *pos, int max_col)
ScreenLinesUC[off] = NUL;
}
}
-#ifdef WIN3264
+#ifdef MSWIN
else if (has_mbyte && c >= 0x80)
{
char_u mb[MB_MAXBYTES+1];
@@ -3557,7 +3557,7 @@ init_default_colors(term_T *term)
}
else
{
-#if defined(WIN3264) && !defined(FEAT_GUI_W32)
+#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
int tmp;
#endif
@@ -3565,7 +3565,7 @@ init_default_colors(term_T *term)
if (cterm_normal_fg_color > 0)
{
cterm_color2vterm(cterm_normal_fg_color - 1, fg);
-# if defined(WIN3264) && !defined(FEAT_GUI_W32)
+# if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
tmp = fg->red;
fg->red = fg->blue;
fg->blue = tmp;
@@ -3579,7 +3579,7 @@ init_default_colors(term_T *term)
if (cterm_normal_bg_color > 0)
{
cterm_color2vterm(cterm_normal_bg_color - 1, bg);
-# if defined(WIN3264) && !defined(FEAT_GUI_W32)
+# if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
tmp = bg->red;
bg->red = bg->blue;
bg->blue = tmp;
@@ -3922,7 +3922,7 @@ create_vterm(term_T *term, int rows, int cols)
/* For unix do not use a blinking cursor. In an xterm this causes the
* cursor to blink if it's blinking in the xterm.
* For Windows we respect the system wide setting. */
-#ifdef WIN3264
+#ifdef MSWIN
if (GetCaretBlinkTime() == INFINITE)
value.boolean = 0;
else
@@ -5588,7 +5588,7 @@ term_send_eof(channel_T *ch)
(int)STRLEN(term->tl_eof_chars), NULL);
channel_send(ch, PART_IN, (char_u *)"\r", 1, NULL);
}
-# ifdef WIN3264
+# ifdef MSWIN
else
/* Default: CTRL-D */
channel_send(ch, PART_IN, (char_u *)"\004\r", 2, NULL);
@@ -5604,7 +5604,7 @@ term_getjob(term_T *term)
}
#endif
-# if defined(WIN3264) || defined(PROTO)
+# if defined(MSWIN) || defined(PROTO)
/**************************************
* 2. MS-Windows implementation.
diff --git a/src/ui.c b/src/ui.c
index 0823d2dd2..e21e8013f 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -40,7 +40,7 @@ ui_write(char_u *s, int len)
/* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
if (!(silent_mode && p_verbose == 0))
{
-#if !defined(WIN3264)
+#if !defined(MSWIN)
char_u *tofree = NULL;
if (output_conv.vc_type != CONV_NONE)
@@ -54,7 +54,7 @@ ui_write(char_u *s, int len)
mch_write(s, len);
-# if !defined(WIN3264)
+# if !defined(MSWIN)
if (output_conv.vc_type != CONV_NONE)
vim_free(tofree);
# endif
@@ -62,7 +62,7 @@ ui_write(char_u *s, int len)
#endif
}
-#if defined(UNIX) || defined(VMS) || defined(PROTO) || defined(WIN3264)
+#if defined(UNIX) || defined(VMS) || defined(PROTO) || defined(MSWIN)
/*
* When executing an external program, there may be some typed characters that
* are not consumed by it. Give them back to ui_inchar() and they are stored
@@ -3435,7 +3435,7 @@ vcol2col(win_T *wp, linenr_T lnum, int vcol)
#endif /* FEAT_MOUSE */
-#if defined(FEAT_GUI) || defined(WIN3264) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(MSWIN) || defined(PROTO)
/*
* Called when focus changed. Used for the GUI or for systems where this can
* be done in the console (Win32).
diff --git a/src/undo.c b/src/undo.c
index 6b6dd479b..b2d1d9f11 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -645,7 +645,7 @@ u_savecommon(
u_getbot();
}
-#if !defined(UNIX) && !defined(WIN32)
+#if !defined(UNIX) && !defined(MSWIN)
/*
* With Amiga we can't handle big undo's, because
* then u_alloc_line would have to allocate a block larger than 32K
@@ -1740,7 +1740,7 @@ write_error:
if (!write_ok)
semsg(_("E829: write error in undo file: %s"), file_name);
-#if defined(WIN3264)
+#if defined(MSWIN)
/* Copy file attributes; for systems where this can only be done after
* closing the file. */
if (buf->b_ffname != NULL)
diff --git a/src/version.c b/src/version.c
index e042578cc..5ffbc56eb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -222,7 +222,7 @@ static char *(features[]) =
#else
"-digraphs",
#endif
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
# ifdef FEAT_DIRECTX
"+directx",
# else
@@ -481,7 +481,7 @@ static char *(features[]) =
#else
"-num64",
#endif
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI_MSWIN
# ifdef FEAT_OLE
"+ole",
# else
@@ -700,7 +700,7 @@ static char *(features[]) =
"-viminfo",
#endif
"+vreplace",
-#ifdef WIN3264
+#ifdef MSWIN
# ifdef FEAT_VTP
"+vtp",
# else
@@ -740,7 +740,7 @@ static char *(features[]) =
#else
"-xim",
#endif
-#ifdef WIN3264
+#ifdef MSWIN
# ifdef FEAT_XPM_W32
"+xpm_w32",
# else
@@ -780,6 +780,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 941,
+/**/
940,
/**/
939,
@@ -2852,16 +2854,16 @@ list_version(void)
*/
init_longVersion();
msg(longVersion);
-#ifdef WIN3264
-# ifdef FEAT_GUI_W32
+#ifdef MSWIN
+# ifdef FEAT_GUI_MSWIN
# ifdef _WIN64
msg_puts(_("\nMS-Windows 64-bit GUI version"));
# else
msg_puts(_("\nMS-Windows 32-bit GUI version"));
# endif
-# ifdef FEAT_OLE
+# ifdef FEAT_OLE
msg_puts(_(" with OLE support"));
-# endif
+# endif
# else
# ifdef _WIN64
msg_puts(_("\nMS-Windows 64-bit console version"));
diff --git a/src/vim.h b/src/vim.h
index be1ec1d31..3f7388e61 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -11,8 +11,17 @@
#include "protodef.h"
-/* use fastcall for Borland, when compiling for Win32 */
-#if defined(__BORLANDC__) && defined(WIN32) && !defined(DEBUG)
+// _WIN32 is defined as 1 when the compilation target is 32-bit or 64-bit.
+// Note: If you want to check for 64-bit use the _WIN64 macro.
+#if defined(WIN32) || defined(_WIN32)
+# define MSWIN
+# ifdef FEAT_GUI
+# define FEAT_GUI_MSWIN
+# endif
+#endif
+
+// use fastcall for Borland, when compiling for MS-Windows
+#if defined(__BORLANDC__) && defined(MSWIN) && !defined(DEBUG)
#if defined(FEAT_PERL) || \
defined(FEAT_PYTHON) || \
defined(FEAT_PYTHON3) || \
@@ -29,7 +38,7 @@
# endif
#endif
-#if defined(WIN32) || defined(_WIN64)
+#ifdef MSWIN
# include "vimio.h"
#endif
@@ -103,7 +112,7 @@
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_MAC) \
- || defined(FEAT_GUI_W32) \
+ || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON)
# define FEAT_GUI_ENABLED /* also defined with NO_X11_INCLUDES */
# if !defined(FEAT_GUI) && !defined(NO_X11_INCLUDES)
@@ -124,22 +133,11 @@
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
-#if defined(FEAT_GUI_W32)
-# define FEAT_GUI_MSWIN
-#endif
-#if defined(WIN32) || defined(_WIN64)
-# define MSWIN
-#endif
-/* Practically everything is common to both Win32 and Win64 */
-#if defined(WIN32) || defined(_WIN64)
-# define WIN3264
-#endif
-
/*
* VIM_SIZEOF_INT is used in feature.h, and the system-specific included files
* need items from feature.h. Therefore define VIM_SIZEOF_INT here.
*/
-#ifdef WIN3264
+#ifdef MSWIN
# define VIM_SIZEOF_INT 4
#endif
@@ -276,7 +274,7 @@
# include "os_amiga.h"
#endif
-#ifdef WIN3264
+#ifdef MSWIN
# include "os_win32.h"
#endif
@@ -456,8 +454,7 @@ typedef unsigned int u8char_T; // int is 32 bits or more
# include <sys/stat.h>
#endif
-#if defined(HAVE_ERRNO_H) \
- || defined(WIN32) || defined(_WIN64)
+#if defined(HAVE_ERRNO_H) || defined(MSWIN)
# include <errno.h>
#endif
@@ -509,7 +506,7 @@ typedef unsigned int u8char_T; // int is 32 bits or more
#ifndef HAVE_SELECT
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
-# elif defined(WIN32)
+# elif defined(MSWIN)
# define HAVE_SELECT
# else
# ifdef HAVE_POLL_H
@@ -1752,7 +1749,7 @@ void *vim_memset(void *, int, size_t);
#define MB_MAXBYTES 21
#if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
-# ifdef WIN3264
+# ifdef MSWIN
typedef LARGE_INTEGER proftime_T;
# else
typedef struct timeval proftime_T;
@@ -1769,7 +1766,7 @@ typedef int proftime_T; /* dummy for function prototypes */
#ifdef PROTO
typedef long time_T;
#else
-# ifdef WIN3264
+# ifdef MSWIN
typedef __time64_t time_T;
# else
typedef time_t time_T;
@@ -2005,7 +2002,7 @@ typedef int sock_T;
# define SELECT_MODE_WORD 1
# define SELECT_MODE_LINE 2
-# ifdef FEAT_GUI_W32
+# ifdef FEAT_GUI_MSWIN
# ifdef FEAT_OLE
# define WM_OLE (WM_APP+0)
# endif
@@ -2103,7 +2100,7 @@ typedef enum {
#endif
# if defined(FEAT_EVAL) \
- && (!defined(FEAT_GUI_W32) \
+ && (!defined(FEAT_GUI_MSWIN) \
|| !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
&& !(defined(FEAT_GUI_MAC) && defined(MACOS_CONVERT))
/* Whether IME is supported by im_get_status() defined in mbyte.c.
@@ -2115,7 +2112,7 @@ typedef enum {
#if defined(FEAT_XIM) \
|| defined(IME_WITHOUT_XIM) \
- || (defined(FEAT_GUI_W32) \
+ || (defined(FEAT_GUI_MSWIN) \
&& (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
|| defined(FEAT_GUI_MAC)
/* im_set_active() is available */
@@ -2129,7 +2126,7 @@ typedef enum {
/* This must come after including proto.h.
* For VMS this is defined in macros.h. */
-#if !defined(WIN3264) && !defined(VMS)
+#if !defined(MSWIN) && !defined(VMS)
# define mch_open(n, m, p) open((n), (m), (p))
# define mch_fopen(n, p) fopen((n), (p))
#endif
@@ -2169,7 +2166,7 @@ typedef enum {
#endif
/* stop using fastcall for Borland */
-#if defined(__BORLANDC__) && defined(WIN32) && !defined(DEBUG)
+#if defined(__BORLANDC__) && defined(MSWIN) && !defined(DEBUG)
#pragma option -p.
#endif
@@ -2461,7 +2458,7 @@ typedef enum {
# define MAX_OPEN_CHANNELS 0
#endif
-#if defined(WIN32)
+#if defined(MSWIN)
# define MAX_NAMED_PIPE_SIZE 65535
#endif
@@ -2579,7 +2576,7 @@ typedef enum {
# define ELAPSED_FUNC(v) elapsed(&v)
typedef struct timeval elapsed_T;
long elapsed(struct timeval *start_tv);
-#elif defined(WIN32)
+#elif defined(MSWIN)
# define ELAPSED_TICKCOUNT
# define ELAPSED_INIT(v) v = GetTickCount()
# define ELAPSED_FUNC(v) elapsed(v)
diff --git a/src/vim.rc b/src/vim.rc
index 492c74b60..c3d3f5f35 100644
--- a/src/vim.rc
+++ b/src/vim.rc
@@ -23,7 +23,7 @@
//
IDR_VIM ICON "vim.ico"
-#ifdef FEAT_GUI_W32
+#ifdef FEAT_GUI
IDR_VIM_ERROR ICON "vim_error.ico"
IDR_VIM_ALERT ICON "vim_alert.ico"
IDR_VIM_INFO ICON "vim_info.ico"
@@ -46,7 +46,7 @@ IDR_TOOLBAR1 BITMAP DISCARDABLE "tools.bmp"
#endif
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf"
-#endif // FEAT_GUI_W32
+#endif // FEAT_GUI
//
// Type Library
diff --git a/src/winclip.c b/src/winclip.c
index 0285dc592..2d4d97e78 100644
--- 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 *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]".