mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
Merge branch 'master' into msvc-compat
This commit is contained in:
commit
de3a833ec7
@ -1685,8 +1685,15 @@ static int cs_read_prompt(size_t i)
|
||||
assert(IOSIZE >= cs_emsg_len);
|
||||
size_t maxlen = IOSIZE - cs_emsg_len;
|
||||
|
||||
for (;; ) {
|
||||
while ((ch = getc(csinfo[i].fr_fp)) != EOF && ch != CSCOPE_PROMPT[0]) {
|
||||
while (1) {
|
||||
while (1) {
|
||||
do {
|
||||
errno = 0;
|
||||
ch = fgetc(csinfo[i].fr_fp);
|
||||
} while (ch == EOF && errno == EINTR && ferror(csinfo[i].fr_fp));
|
||||
if (ch == EOF || ch == CSCOPE_PROMPT[0]) {
|
||||
break;
|
||||
}
|
||||
// if there is room and char is printable
|
||||
if (bufpos < maxlen - 1 && vim_isprintc(ch)) {
|
||||
// lazy buffer allocation
|
||||
@ -1715,9 +1722,13 @@ static int cs_read_prompt(size_t i)
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t n = 0; n < strlen(CSCOPE_PROMPT); ++n) {
|
||||
if (n > 0)
|
||||
ch = (char)getc(csinfo[i].fr_fp);
|
||||
for (size_t n = 0; n < strlen(CSCOPE_PROMPT); n++) {
|
||||
if (n > 0) {
|
||||
do {
|
||||
errno = 0;
|
||||
ch = fgetc(csinfo[i].fr_fp);
|
||||
} while (ch == EOF && errno == EINTR && ferror(csinfo[i].fr_fp));
|
||||
}
|
||||
if (ch == EOF) {
|
||||
PERROR("cs_read_prompt EOF");
|
||||
if (buf != NULL && buf[0] != NUL)
|
||||
|
10
third-party/CMakeLists.txt
vendored
10
third-party/CMakeLists.txt
vendored
@ -2,6 +2,9 @@
|
||||
cmake_minimum_required (VERSION 2.8.7)
|
||||
project(NVIM_DEPS)
|
||||
|
||||
# Needed for: check_c_compiler_flag()
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
# Point CMake at any custom modules we may ship
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
@ -11,6 +14,13 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_MAKE_CFLAGS CFLAGS+=-g)
|
||||
|
||||
check_c_compiler_flag(-Og HAS_OG_FLAG)
|
||||
if(HAS_OG_FLAG)
|
||||
set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS})
|
||||
endif()
|
||||
|
||||
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr" CACHE PATH "Dependencies install directory.")
|
||||
set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin" CACHE PATH "Dependencies binary install directory.")
|
||||
set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib" CACHE PATH "Dependencies library install directory.")
|
||||
|
1
third-party/cmake/BuildLibtermkey.cmake
vendored
1
third-party/cmake/BuildLibtermkey.cmake
vendored
@ -43,6 +43,7 @@ ExternalProject_Add(libtermkey
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
PKG_CONFIG_PATH=${DEPS_LIB_DIR}/pkgconfig
|
||||
CFLAGS=-fPIC
|
||||
${DEFAULT_MAKE_CFLAGS}
|
||||
install)
|
||||
endif()
|
||||
|
||||
|
7
third-party/cmake/BuildLibvterm.cmake
vendored
7
third-party/cmake/BuildLibvterm.cmake
vendored
@ -53,9 +53,10 @@ if(WIN32)
|
||||
set(LIBVTERM_INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE})
|
||||
else()
|
||||
set(LIBVTERM_INSTALL_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER}
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
CFLAGS=-fPIC
|
||||
install)
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
CFLAGS=-fPIC
|
||||
${DEFAULT_MAKE_CFLAGS}
|
||||
install)
|
||||
endif()
|
||||
|
||||
BuildLibvterm(PATCH_COMMAND ${LIBVTERM_PATCH_COMMAND}
|
||||
|
Loading…
Reference in New Issue
Block a user