mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
build(deps): use libvterm 0.3-rc1
This commit is contained in:
parent
2aeb8d976f
commit
9ecaa35f55
@ -177,8 +177,8 @@ set(UNIBILIUM_SHA256 29815283c654277ef77a3adcc8840db79ddbb20a0f0b0c8f648bd8cd49a
|
||||
set(LIBTERMKEY_URL https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz)
|
||||
set(LIBTERMKEY_SHA256 6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600)
|
||||
|
||||
set(LIBVTERM_URL https://www.leonerd.org.uk/code/libvterm/libvterm-0.1.4.tar.gz)
|
||||
set(LIBVTERM_SHA256 bc70349e95559c667672fc8c55b9527d9db9ada0fb80a3beda533418d782d3dd)
|
||||
set(LIBVTERM_URL https://www.leonerd.org.uk/code/libvterm/libvterm-0.3-RC1.tar.gz)
|
||||
set(LIBVTERM_SHA256 441d1c372b84a0df12525100ab06c0366260fb4f6252abd1665ee4fa571b5134)
|
||||
|
||||
set(LUV_VERSION 1.44.2-0)
|
||||
set(LUV_URL https://github.com/luvit/luv/archive/1.44.2-0.tar.gz)
|
||||
|
@ -32,12 +32,6 @@ function(BuildLibvterm)
|
||||
endfunction()
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
set(LIBVTERM_PATCH_COMMAND
|
||||
${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/libvterm init
|
||||
COMMAND ${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/libvterm apply --ignore-whitespace
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/patches/libvterm-Remove-VLAs-for-MSVC.patch)
|
||||
endif()
|
||||
set(LIBVTERM_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibvtermCMakeLists.txt
|
||||
${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt
|
||||
|
@ -1,50 +0,0 @@
|
||||
From eb386b1d82f7d07363c9133b7aa06902ccd555fe Mon Sep 17 00:00:00 2001
|
||||
Date: Tue, 27 Feb 2018 17:54:20 -0600
|
||||
Subject: [PATCH] Remove VLAs for MSVC
|
||||
|
||||
VLAs are replaced with calls to _alloca() because MSVC does not support them.
|
||||
---
|
||||
src/state.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/state.c b/src/state.c
|
||||
index 84299df..f9aabb3 100644
|
||||
--- a/src/state.c
|
||||
+++ b/src/state.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "vterm_internal.h"
|
||||
|
||||
+#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -236,7 +237,7 @@ static int on_text(const char bytes[], size_t len, void *user)
|
||||
VTermPos oldpos = state->pos;
|
||||
|
||||
// We'll have at most len codepoints
|
||||
- uint32_t codepoints[len];
|
||||
+ uint32_t* codepoints = _alloca(len * sizeof(uint32_t));
|
||||
int npoints = 0;
|
||||
size_t eaten = 0;
|
||||
|
||||
@@ -313,7 +314,7 @@ static int on_text(const char bytes[], size_t len, void *user)
|
||||
|
||||
int width = 0;
|
||||
|
||||
- uint32_t chars[glyph_ends - glyph_starts + 1];
|
||||
+ uint32_t* chars = _alloca((glyph_ends - glyph_starts + 1) * sizeof(uint32_t));
|
||||
|
||||
for( ; i < glyph_ends; i++) {
|
||||
chars[i - glyph_starts] = codepoints[i];
|
||||
@@ -512,7 +513,7 @@ static int settermprop_int(VTermState *state, VTermProp prop, int v)
|
||||
|
||||
static int settermprop_string(VTermState *state, VTermProp prop, const char *str, size_t len)
|
||||
{
|
||||
- char strvalue[len+1];
|
||||
+ char* strvalue = _alloca(len+1);
|
||||
strncpy(strvalue, str, len);
|
||||
strvalue[len] = 0;
|
||||
|
||||
--
|
||||
2.16.1.windows.4
|
||||
|
Loading…
Reference in New Issue
Block a user