aboutsummaryrefslogtreecommitdiff
path: root/third-party/patches/libtermkey-Add-support-for-Windows.patch
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2019-02-21 19:54:25 +0100
committerMarco Hinz <mh.codebro@gmail.com>2019-02-21 22:23:54 +0100
commit27c31434663ba20cd9b53827d4d3cb4d66b1cde3 (patch)
tree35c626cb70f3f8f4b4452c16e341000a7d00c20c /third-party/patches/libtermkey-Add-support-for-Windows.patch
parent40f5a6c4dafe4bbca227d4c6bda0d9a94d817d71 (diff)
downloadrneovim-27c31434663ba20cd9b53827d4d3cb4d66b1cde3.tar.gz
rneovim-27c31434663ba20cd9b53827d4d3cb4d66b1cde3.tar.bz2
rneovim-27c31434663ba20cd9b53827d4d3cb4d66b1cde3.zip
third-party: libtermkey v0.20 -> v0.21.1
$ bzr log --line --forward -r v0.20.. 372: Paul "LeoNerd" Evans 2017-03-30 {v0.20} Bumped VERSION to 0.20 373: Paul "LeoNerd" Evans 2017-04-10 [merge] Apply typo fixes from jamessan 374: Paul "LeoNerd" Evans 2017-11-29 Build termkey.pc by invoking a small shell script instead of sed'ing a template 375: Paul "LeoNerd" Evans 2018-03-29 Implement mouse key parsing (thanks Marc André Tanner <mat@brain-dump.org>) 376: Paul "LeoNerd" Evans 2019-01-02 Bugfix for infinite CPU spin on TERM=dumb, which has no terminfo key strings 377: Paul "LeoNerd" Evans 2019-02-14 Fix a couple of valgrind-cleanness errors in DEBUG mode 378: Paul "LeoNerd" Evans 2019-02-14 Fix valgrind uninitialised value warning 379: Paul "LeoNerd" Evans 2019-02-14 Remember to unibi_destroy() even if we never (lazily) loaded terminfo 380: Paul "LeoNerd" Evans 2019-02-14 Bugfix memory leak in TI driver on xterm 381: Paul "LeoNerd" Evans 2019-02-17 driver-ti.c does not need a separate TYPE_MOUSE node type since TERMKEY_TYPE_MOUSE already exists 382: Paul "LeoNerd" Evans 2019-02-17 Perform TI string lookup by iterating all the strings we care about, rather than iterating everything in the DB; that way a hook function can invent new strings 383: Paul "LeoNerd" Evans 2019-02-17 Avoid nonstandard \e sequence in unit tests (via neovim https://github.com/neovim/neovim/blob/master/third-party/patches/libtermkey-Fix-escape-sequences-for-MSVC.p... 384: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 lacks <unistd.h> and S_ISFIFO() 385: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 needs help to get ssize_t 386: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 has no <termios.h> 387: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 has no poll() so cannot provide termkey_waitkey() 388: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 has no <strings.h> and needs help getting strcasecmp() 389: Paul "LeoNerd" Evans 2019-02-17 Write the version into the .pc file at 'make install' time so we don't get@VERSION@ from source 390: Paul "LeoNerd" Evans 2019-02-19 {v0.21} Bumped VERSION to 0.21 391: Paul "LeoNerd" Evans 2019-02-19 Bugfix to missing TERMIOS support 392: Paul "LeoNerd" Evans 2019-02-19 Fix offbyone buffer overflow in sprintf calculation of key names (neovim #9630) 393: Paul "LeoNerd" Evans 2019-02-19 {v0.21.1} Remove a pointless (and warny) cast Our local patches are now part of the libtermkey repo and get removed.
Diffstat (limited to 'third-party/patches/libtermkey-Add-support-for-Windows.patch')
-rw-r--r--third-party/patches/libtermkey-Add-support-for-Windows.patch170
1 files changed, 0 insertions, 170 deletions
diff --git a/third-party/patches/libtermkey-Add-support-for-Windows.patch b/third-party/patches/libtermkey-Add-support-for-Windows.patch
deleted file mode 100644
index b839e94d05..0000000000
--- a/third-party/patches/libtermkey-Add-support-for-Windows.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From fbe91a958816d85fa93665eb8f7a7a8e05eb9650 Mon Sep 17 00:00:00 2001
-From: Rui Abreu Ferreira <raf-ep@gmx.com>
-Date: Tue, 5 Apr 2016 00:12:41 +0100
-Subject: [PATCH] Add support for Windows
-
-Ported termkey for windows.
-
-- The TERMKEY_FLAG_NOTERMIOS is ignore in Windows, since there is no termios.
-- The termkey_waitkey() function is not implemented in windows, since there
- is no poll() alternative.
-- The CMake recipe only supports unibilium, not curses.
----
- driver-ti.c | 8 +++++++-
- termkey-internal.h | 11 ++++++++++-
- termkey.c | 22 ++++++++++++++++++----
- 3 files changed, 35 insertions(+), 6 deletions(-)
-
-diff --git a/driver-ti.c b/driver-ti.c
-index e673ab7..f5f8052 100644
---- a/driver-ti.c
-+++ b/driver-ti.c
-@@ -17,7 +17,9 @@
- #include <ctype.h>
- #include <stdio.h>
- #include <string.h>
--#include <unistd.h>
-+#ifndef _WIN32
-+# include <unistd.h>
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>
-
-@@ -338,8 +340,10 @@ static int start_driver(TermKey *tk, void *info)
- if(fstat(tk->fd, &statbuf) == -1)
- return 0;
-
-+#ifndef _WIN32
- if(S_ISFIFO(statbuf.st_mode))
- return 1;
-+#endif
-
- // Can't call putp or tputs because they suck and don't give us fd control
- len = strlen(start_string);
-@@ -367,8 +371,10 @@ static int stop_driver(TermKey *tk, void *info)
- if(fstat(tk->fd, &statbuf) == -1)
- return 0;
-
-+#ifndef _WIN32
- if(S_ISFIFO(statbuf.st_mode))
- return 1;
-+#endif
-
- /* The terminfo database will contain keys in application cursor key mode.
- * We may need to enable that mode
-diff --git a/termkey-internal.h b/termkey-internal.h
-index 52829b3..b796729 100644
---- a/termkey-internal.h
-+++ b/termkey-internal.h
-@@ -4,7 +4,14 @@
- #include "termkey.h"
-
- #include <stdint.h>
--#include <termios.h>
-+#ifndef _WIN32
-+# include <termios.h>
-+#endif
-+
-+#ifdef _MSC_VER
-+#include <BaseTsd.h>
-+typedef SSIZE_T ssize_t;
-+#endif
-
- struct TermKeyDriver
- {
-@@ -41,8 +48,10 @@ struct TermKey {
- size_t hightide; /* Position beyond buffstart at which peekkey() should next start
- * normally 0, but see also termkey_interpret_csi */
-
-+#ifndef _WIN32
- struct termios restore_termios;
- char restore_termios_valid;
-+#endif
-
- TermKey_Terminfo_Getstr_Hook *ti_getstr_hook;
- void *ti_getstr_hook_data;
-diff --git a/termkey.c b/termkey.c
-index 2f01f3a..145b99f 100644
---- a/termkey.c
-+++ b/termkey.c
-@@ -3,14 +3,20 @@
-
- #include <ctype.h>
- #include <errno.h>
--#include <poll.h>
--#include <unistd.h>
-+#ifndef _WIN32
-+# include <poll.h>
-+# include <unistd.h>
-+# include <strings.h>
-+#endif
- #include <string.h>
--#include <strings.h>
-
- #include <stdio.h>
-
--#define strcaseeq(a,b) (strcasecmp(a,b) == 0)
-+#ifdef _MSC_VER
-+# define strcaseeq(a,b) (_stricmp(a,b) == 0)
-+#else
-+# define strcaseeq(a,b) (strcasecmp(a,b) == 0)
-+#endif
-
- void termkey_check_version(int major, int minor)
- {
-@@ -282,7 +288,9 @@ static TermKey *termkey_alloc(void)
- tk->buffsize = 256; /* bytes */
- tk->hightide = 0;
-
-+#ifndef _WIN32
- tk->restore_termios_valid = 0;
-+#endif
-
- tk->ti_getstr_hook = NULL;
- tk->ti_getstr_hook_data = NULL;
-@@ -483,6 +491,7 @@ int termkey_start(TermKey *tk)
- if(tk->is_started)
- return 1;
-
-+#ifndef _WIN32
- if(tk->fd != -1 && !(tk->flags & TERMKEY_FLAG_NOTERMIOS)) {
- struct termios termios;
- if(tcgetattr(tk->fd, &termios) == 0) {
-@@ -517,6 +526,7 @@ int termkey_start(TermKey *tk)
- tcsetattr(tk->fd, TCSANOW, &termios);
- }
- }
-+#endif
-
- struct TermKeyDriverNode *p;
- for(p = tk->drivers; p; p = p->next)
-@@ -542,8 +552,10 @@ int termkey_stop(TermKey *tk)
- if(p->driver->stop_driver)
- (*p->driver->stop_driver)(tk, p->info);
-
-+#ifndef _WIN32
- if(tk->restore_termios_valid)
- tcsetattr(tk->fd, TCSANOW, &tk->restore_termios);
-+#endif
-
- tk->is_started = 0;
-
-@@ -1046,6 +1058,7 @@ TermKeyResult termkey_getkey_force(TermKey *tk, TermKeyKey *key)
- return ret;
- }
-
-+#ifndef _WIN32
- TermKeyResult termkey_waitkey(TermKey *tk, TermKeyKey *key)
- {
- if(tk->fd == -1) {
-@@ -1105,6 +1118,7 @@ retry:
-
- /* UNREACHABLE */
- }
-+#endif
-
- TermKeyResult termkey_advisereadable(TermKey *tk)
- {
---
-2.16.1.windows.4
-