Mercurial > vim
changeset 15868:7fad90423bd2 v8.1.0941
patch 8.1.0941: macros for MS-Windows are inconsistent
commit https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 17 17:44:42 2019 +0100
patch 8.1.0941: macros for MS-Windows are inconsistent
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
others.
Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
GUI build. (Hirohito Higashi, closes #3932)
line wrap: on
line diff
--- 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
--- 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
--- 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)
--- a/src/Make_ivc.mak +++ b/src/Make_ivc.mak @@ -92,8 +92,8 @@ LINK32_FLAGS= oldnames.lib kernel32.lib # 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
--- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -791,8 +791,8 @@ OBJ = $(OBJ) $(OUTDIR)\dimm_i.obj $(OUTD !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
--- 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;
--- 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
--- 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_par && (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_p { 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, c (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, c else { int timeout; -#ifdef WIN32 +#ifdef MSWIN timeout = GetTickCount() > chanpart->ch_deadline; #else { @@ -3198,7 +3198,7 @@ channel_wait(channel_T *channel, sock_T 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 } # 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, 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 } # 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 *r 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 * 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
--- 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;
--- a/src/eval.c +++ b/src/eval.c @@ -7460,7 +7460,7 @@ tv_get_string_buf_chk(typval_T *varp, ch # 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')
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -123,7 +123,7 @@ static void f_cosh(typval_T *argvars, ty 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 *re rettv->vval.v_number = 0; } -#ifdef WIN3264 +#ifdef MSWIN /* * "debugbreak()" function */ @@ -4137,7 +4137,7 @@ f_foreground(typval_T *argvars UNUSED, t 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 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, typv { long n1, n2; -# ifdef WIN3264 +# ifdef MSWIN n1 = res.HighPart; n2 = res.LowPart; # else @@ -9443,7 +9443,7 @@ remote_common(typval_T *argvars, typval_ 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_ 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, 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, #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, 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, 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, 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, t char_u *r = NULL; #ifdef FEAT_CLIENTSERVER -# ifdef WIN32 +# ifdef MSWIN r = serverGetVimNames(); # else make_connection();
--- 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);
--- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1048,7 +1048,7 @@ dbg_breakpoint(char_u *name, linenr_T ln 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 * 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 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_ { /* 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, proftim 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_ 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 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;
--- 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;
--- 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) {
--- 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
--- 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 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 */ }
--- 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
--- a/src/glbl_ime.cpp +++ b/src/glbl_ime.cpp @@ -134,7 +134,7 @@ global_ime_DefWindowProc(HWND hWnd, UINT 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
--- 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 o 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); /* #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(= EXTERN int *eval_lavars_used INIT(= NULL); #endif -#ifdef WIN3264 +#ifdef MSWIN EXTERN int ctrl_break_was_pressed INIT(= FALSE); #endif
--- 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 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. */
--- 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
--- 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, 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 *bev } #endif /* !FEAT_GUI_GTK */ -#endif /* !FEAT_GUI_W32 */ +#endif /* !FEAT_GUI_MSWIN */ #endif /* FEAT_BEVAL_GUI */
--- 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>
--- 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>
--- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -86,7 +86,7 @@ extern void bonobo_dock_item_set_behavio # include <gdk/gdkkeysyms.h> # endif # include <gdk/gdk.h> -# ifdef WIN3264 +# ifdef MSWIN # include <gdk/gdkwin32.h> # else # include <gdk/gdkx.h>
--- 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 )
--- 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 */
--- a/src/if_lua.c +++ b/src/if_lua.c @@ -80,7 +80,7 @@ static luaV_Funcref *luaV_pushfuncref(lu #ifdef DYNAMIC_LUA -#ifndef WIN3264 +#ifndef MSWIN # include <dlfcn.h> # define HANDLE void* # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
--- 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 UN 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);
--- 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. *
--- 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*
--- 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*
--- 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*
--- 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"};
--- a/src/if_tcl.c +++ b/src/if_tcl.c @@ -160,7 +160,7 @@ static struct ref refsdeleted; /* dummy 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
--- 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); }
--- 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
--- 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;
--- 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) */
--- 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 */ 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 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 # 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
--- 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 *, 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 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 * } } -#endif /* FEAT_GUI_W32 && FEAT_TEAROFF */ +#endif /* FEAT_GUI_MSWIN && FEAT_TEAROFF */ /* * Execute "menu". Use by ":emenu" and the window toolbar.
--- 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';
--- 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
--- a/src/misc2.c +++ b/src/misc2.c @@ -1427,7 +1427,7 @@ vim_strsave_shellescape(char_u *string, 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, 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, for (p = string; *p != NUL; ) { -# ifdef WIN32 +# ifdef MSWIN if (!p_ssl) { if (*p == '"') @@ -1510,7 +1510,7 @@ vim_strsave_shellescape(char_u *string, } /* 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
--- 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);
--- 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. */
--- 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 }
--- 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", #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) {
--- 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' */
--- 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));
--- 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() */
--- 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
--- 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 *express # 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 */ - - -#ifdef FEAT_GUI_W32 +#endif /* FEAT_GUI_MSWIN */ + + +#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) {
--- 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
--- 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); 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
--- 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 )
--- 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 == '/') ? '?' : '/';
--- 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_h #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 */
--- 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 } #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)
--- a/src/term.c +++ b/src/term.c @@ -533,7 +533,7 @@ static struct builtin_term builtin_termc {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 *strin 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 *strin 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 } #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_ } } #endif +
--- 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 row 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 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 *te 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 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 /* 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.
--- 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 v #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).
--- 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)
--- 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"));
--- 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 # 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 #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 #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)
--- 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 #endif CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gvim.exe.mnf" -#endif // FEAT_GUI_W32 +#endif // FEAT_GUI // // Type Library
--- a/src/winclip.c +++ b/src/winclip.c @@ -22,7 +22,7 @@ * posix environment. */ #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD -# define WIN3264 +# define MSWIN # define WIN32_LEAN_AND_MEAN # include <windows.h> # include "winclip.pro" @@ -299,7 +299,7 @@ clip_mch_request_selection(VimClipboard VimClipType_t metadata = { -1, -1, -1, -1 }; HGLOBAL hMem = NULL; char_u *str = NULL; -#if defined(WIN3264) +#if defined(MSWIN) char_u *to_free = NULL; #endif HGLOBAL rawh = NULL; @@ -361,7 +361,7 @@ clip_mch_request_selection(VimClipboard } if (str == NULL) { -#if defined(WIN3264) +#if defined(MSWIN) /* Try to get the clipboard in Unicode if it's not an empty string. */ if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0) { @@ -417,7 +417,7 @@ clip_mch_request_selection(VimClipboard break; } -#if defined(WIN3264) +#if defined(MSWIN) /* The text is in the active codepage. Convert to * 'encoding', going through UTF-16. */ acp_to_enc(str, str_size, &to_free, &maxlen); @@ -454,7 +454,7 @@ clip_mch_request_selection(VimClipboard if (rawh != NULL) GlobalUnlock(rawh); CloseClipboard(); -#if defined(WIN3264) +#if defined(MSWIN) vim_free(to_free); #endif } @@ -471,7 +471,7 @@ clip_mch_set_selection(VimClipboard *cbd HGLOBAL hMemRaw = NULL; HGLOBAL hMem = NULL; HGLOBAL hMemVim = NULL; -# if defined(WIN3264) +# if defined(MSWIN) HGLOBAL hMemW = NULL; # endif @@ -508,7 +508,7 @@ clip_mch_set_selection(VimClipboard *cbd metadata.rawlen = 0; } -# if defined(WIN3264) +# if defined(MSWIN) { WCHAR *out; int len = metadata.txtlen; @@ -590,7 +590,7 @@ clip_mch_set_selection(VimClipboard *cbd { SetClipboardData(cbd->format, hMemVim); hMemVim = 0; -# if defined(WIN3264) +# if defined(MSWIN) if (hMemW != NULL) { if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL) @@ -611,7 +611,7 @@ clip_mch_set_selection(VimClipboard *cbd GlobalFree(hMemRaw); if (hMem) GlobalFree(hMem); -# if defined(WIN3264) +# if defined(MSWIN) if (hMemW) GlobalFree(hMemW); # endif @@ -746,7 +746,7 @@ utf16_to_enc(short_u *str, int *lenp) return enc_str; } -#if defined(WIN3264) || defined(PROTO) +#if defined(MSWIN) || defined(PROTO) /* * Convert from the active codepage to 'encoding'. * Input is "str[str_size]".