#include "vim.h"
#ifdef __CYGWIN__
-# ifndef MSWIN
-# include <cygwin/version.h>
-# include <sys/cygwin.h> // for cygwin_conv_to_posix_path() and/or
+# include <cygwin/version.h>
+# include <sys/cygwin.h> // for cygwin_conv_to_posix_path() and/or
// cygwin_conv_path()
-# endif
# include <limits.h>
#endif
}
}
#endif
-#if defined(__CYGWIN32__) && !defined(MSWIN)
+#ifdef __CYGWIN32__
/*
* If vim is invoked by non-Cygwin tools, convert away any
* DOS paths, so things like .swp files are created correctly.
#endif
#ifdef __CYGWIN__
-# ifndef MSWIN
-# include <cygwin/version.h>
-# include <sys/cygwin.h> // for cygwin_conv_to_posix_path() and/or
+# include <cygwin/version.h>
+# include <sys/cygwin.h> // for cygwin_conv_to_posix_path() and/or
// for cygwin_conv_path()
-# ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# include "winclip.pro"
-# endif
+# ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# include "winclip.pro"
# endif
#endif
static BOOL win8_or_later = FALSE;
-#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
-# define UChar UnicodeChar
-#else
-# define UChar uChar.UnicodeChar
-#endif
-
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
// Dynamic loading for portability
typedef struct _DYN_CONSOLE_SCREEN_BUFFER_INFOEX
&& ir->Event.KeyEvent.wRepeatCount == 1
&& ir->Event.KeyEvent.wVirtualKeyCode == 0x12
&& ir->Event.KeyEvent.wVirtualScanCode == 0x38
- && ir->Event.KeyEvent.UChar == 0
+ && ir->Event.KeyEvent.uChar.UnicodeChar == 0
&& ir->Event.KeyEvent.dwControlKeyState == 2;
}
{
down->Event.KeyEvent.wVirtualKeyCode = 0;
down->Event.KeyEvent.wVirtualScanCode = 0;
- down->Event.KeyEvent.UChar = up->Event.KeyEvent.UChar;
+ down->Event.KeyEvent.uChar.UnicodeChar
+ = up->Event.KeyEvent.uChar.UnicodeChar;
down->Event.KeyEvent.dwControlKeyState = 0;
}
if (s_iIsDead == 2)
{
- pker->UChar = (WCHAR) awAnsiCode[1];
+ pker->uChar.UnicodeChar = (WCHAR) awAnsiCode[1];
s_iIsDead = 0;
return 1;
}
- if (pker->UChar != 0)
+ if (pker->uChar.UnicodeChar != 0)
return 1;
CLEAR_FIELD(abKeystate);
abKeystate, awAnsiCode, 2, 0);
if (s_iIsDead > 0)
- pker->UChar = (WCHAR) awAnsiCode[0];
+ pker->uChar.UnicodeChar = (WCHAR) awAnsiCode[0];
return s_iIsDead;
}
}
// special cases
- if ((nModifs & CTRL) != 0 && (nModifs & ~CTRL) == 0 && pker->UChar == NUL)
+ if ((nModifs & CTRL) != 0 && (nModifs & ~CTRL) == 0
+ && pker->uChar.UnicodeChar == NUL)
{
// Ctrl-6 is Ctrl-^
if (pker->wVirtualKeyCode == '6')
*pch = NUL;
else
{
- *pch = (i > 0) ? pker->UChar : NUL;
+ *pch = (i > 0) ? pker->uChar.UnicodeChar : NUL;
if (pmodifiers != NULL)
{
# ifdef FEAT_MBYTE_IME
// Windows IME sends two '\n's with only one 'ENTER'. First:
// wVirtualKeyCode == 13. second: wVirtualKeyCode == 0
- if (ir.Event.KeyEvent.UChar == 0
+ if (ir.Event.KeyEvent.uChar.UnicodeChar == 0
&& ir.Event.KeyEvent.wVirtualKeyCode == 13)
{
read_console_input(g_hConIn, &ir, 1, &cRecords);