aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorBulat Gayazov <brgayazov@yandex-team.ru>2023-09-01 11:44:46 +0300
committerbrgayazov <bulat@ydb.tech>2023-09-01 12:04:36 +0300
commitf8032fae5138b5eeb2ee0bffd4719b1ee173c9c5 (patch)
tree8ed9aa704c60d796bb9a477f228330ee0d30455c /contrib
parentce4f14f3b059b1b44b3c87a82abe5144c29ce650 (diff)
downloadydb-f8032fae5138b5eeb2ee0bffd4719b1ee173c9c5.tar.gz
Fixed interactive cli windows build
Fixed interactive cli windows build Pull Request resolved: #347
Diffstat (limited to 'contrib')
-rw-r--r--contrib/restricted/patched/replxx/CMakeLists.darwin-x86_64.txt4
-rw-r--r--contrib/restricted/patched/replxx/CMakeLists.linux-aarch64.txt4
-rw-r--r--contrib/restricted/patched/replxx/CMakeLists.linux-x86_64.txt4
-rw-r--r--contrib/restricted/patched/replxx/CMakeLists.windows-x86_64.txt4
-rw-r--r--contrib/restricted/patched/replxx/src/replxx_impl.cxx11
-rw-r--r--contrib/restricted/patched/replxx/ya.make2
6 files changed, 17 insertions, 12 deletions
diff --git a/contrib/restricted/patched/replxx/CMakeLists.darwin-x86_64.txt b/contrib/restricted/patched/replxx/CMakeLists.darwin-x86_64.txt
index a39729e6df2..27787413ab5 100644
--- a/contrib/restricted/patched/replxx/CMakeLists.darwin-x86_64.txt
+++ b/contrib/restricted/patched/replxx/CMakeLists.darwin-x86_64.txt
@@ -8,8 +8,10 @@
add_library(restricted-patched-replxx)
+target_compile_options(restricted-patched-replxx PUBLIC
+ -DREPLXX_STATIC
+)
target_compile_options(restricted-patched-replxx PRIVATE
- -DREPLXX_BUILDING_DLL
$<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
)
target_include_directories(restricted-patched-replxx PUBLIC
diff --git a/contrib/restricted/patched/replxx/CMakeLists.linux-aarch64.txt b/contrib/restricted/patched/replxx/CMakeLists.linux-aarch64.txt
index bbd8abd9d4a..0a9bf0ce294 100644
--- a/contrib/restricted/patched/replxx/CMakeLists.linux-aarch64.txt
+++ b/contrib/restricted/patched/replxx/CMakeLists.linux-aarch64.txt
@@ -8,8 +8,10 @@
add_library(restricted-patched-replxx)
+target_compile_options(restricted-patched-replxx PUBLIC
+ -DREPLXX_STATIC
+)
target_compile_options(restricted-patched-replxx PRIVATE
- -DREPLXX_BUILDING_DLL
$<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
)
target_include_directories(restricted-patched-replxx PUBLIC
diff --git a/contrib/restricted/patched/replxx/CMakeLists.linux-x86_64.txt b/contrib/restricted/patched/replxx/CMakeLists.linux-x86_64.txt
index bbd8abd9d4a..0a9bf0ce294 100644
--- a/contrib/restricted/patched/replxx/CMakeLists.linux-x86_64.txt
+++ b/contrib/restricted/patched/replxx/CMakeLists.linux-x86_64.txt
@@ -8,8 +8,10 @@
add_library(restricted-patched-replxx)
+target_compile_options(restricted-patched-replxx PUBLIC
+ -DREPLXX_STATIC
+)
target_compile_options(restricted-patched-replxx PRIVATE
- -DREPLXX_BUILDING_DLL
$<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
)
target_include_directories(restricted-patched-replxx PUBLIC
diff --git a/contrib/restricted/patched/replxx/CMakeLists.windows-x86_64.txt b/contrib/restricted/patched/replxx/CMakeLists.windows-x86_64.txt
index a39729e6df2..27787413ab5 100644
--- a/contrib/restricted/patched/replxx/CMakeLists.windows-x86_64.txt
+++ b/contrib/restricted/patched/replxx/CMakeLists.windows-x86_64.txt
@@ -8,8 +8,10 @@
add_library(restricted-patched-replxx)
+target_compile_options(restricted-patched-replxx PUBLIC
+ -DREPLXX_STATIC
+)
target_compile_options(restricted-patched-replxx PRIVATE
- -DREPLXX_BUILDING_DLL
$<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
)
target_include_directories(restricted-patched-replxx PUBLIC
diff --git a/contrib/restricted/patched/replxx/src/replxx_impl.cxx b/contrib/restricted/patched/replxx/src/replxx_impl.cxx
index 7379c99670a..26ea3f2557b 100644
--- a/contrib/restricted/patched/replxx/src/replxx_impl.cxx
+++ b/contrib/restricted/patched/replxx/src/replxx_impl.cxx
@@ -2407,10 +2407,11 @@ Replxx::ACTION_RESULT Replxx::ReplxxImpl::clear_screen( char32_t c ) {
}
Replxx::ACTION_RESULT Replxx::ReplxxImpl::bracketed_paste( char32_t ) {
- static const UnicodeString BRACK_PASTE_SUFF( "\033[201~" );
- static const int BRACK_PASTE_SLEN( BRACK_PASTE_SUFF.length() );
UnicodeString buf;
- while ( char32_t c = read_unicode_character() ) {
+ while ( char32_t c = _terminal.read_char() ) {
+ if ( c == KEY::PASTE_FINISH ) {
+ break;
+ }
if ( ( c == '\r' ) || ( c == KEY::control( 'M' ) ) ) {
c = '\n';
}
@@ -2418,10 +2419,6 @@ Replxx::ACTION_RESULT Replxx::ReplxxImpl::bracketed_paste( char32_t ) {
c = '\t';
}
buf.push_back( c );
- if ( ( c == '~' ) && buf.ends_with( BRACK_PASTE_SUFF.begin(), BRACK_PASTE_SUFF.end() ) ) {
- buf.erase( buf.length() - BRACK_PASTE_SLEN, BRACK_PASTE_SLEN );
- break;
- }
}
_data.insert( _pos, buf, 0, buf.length() );
_pos += buf.length();
diff --git a/contrib/restricted/patched/replxx/ya.make b/contrib/restricted/patched/replxx/ya.make
index 8969a14927e..55197083fd6 100644
--- a/contrib/restricted/patched/replxx/ya.make
+++ b/contrib/restricted/patched/replxx/ya.make
@@ -24,7 +24,7 @@ NO_COMPILER_WARNINGS()
NO_UTIL()
CFLAGS(
- -DREPLXX_BUILDING_DLL
+ GLOBAL -DREPLXX_STATIC
)
SRCS(