From 7cfe038990a2994f497a1eb056f0ea8f98a46e70 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 15 Dec 2015 13:51:17 +0100 Subject: [PATCH 1/2] changed compile options --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 328d48e54d..5b51f28423 100644 --- a/configure.ac +++ b/configure.ac @@ -107,7 +107,7 @@ case $target in ;; armv7l-*-linux-gnueabihf) - CPPFLAGS="${CPPFLAGS} -O0" + CXXFLAGS="${CXXFLAGS} -O0" tr_ARM="yes" tr_ARM7="yes" ;; @@ -117,6 +117,7 @@ case $target in dnl special flags for Arm V6 (pi) dnl ---------------------------------------------------------------------------- CPPFLAGS="${CPPFLAGS} -O0 -DUSE_EABI_HARDFLOAT -march=armv6 -mfloat-abi=hard" + CXXFLAGS="${CXXFLAGS} -O0" tr_ARM="yes" tr_ARM6="yes" ;; From 0cdedc5568513856e82a85f002aa8304e953f8f8 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 15 Dec 2015 13:54:19 +0100 Subject: [PATCH 2/2] updated linenoise-ng --- 3rdParty/linenoise-ng/src/linenoise.cpp | 20 ++++++++++++-------- 3rdParty/linenoise-ng/src/wcwidth.cpp | 6 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/3rdParty/linenoise-ng/src/linenoise.cpp b/3rdParty/linenoise-ng/src/linenoise.cpp index 667a865dae..3e7f575f4f 100644 --- a/3rdParty/linenoise-ng/src/linenoise.cpp +++ b/3rdParty/linenoise-ng/src/linenoise.cpp @@ -1757,7 +1757,7 @@ static const size_t completionCountCutoff = 100; */ int InputBuffer::completeLine(PromptBase& pi) { linenoiseCompletions lc; - char c = 0; + char32_t c = 0; // completionCallback() expects a parsable entity, so find the previous break character and // extract a copy to parse. we also handle the case where tab is hit while not at end-of-line. @@ -1791,8 +1791,8 @@ int InputBuffer::completeLine(PromptBase& pi) { bool keepGoing = true; while (keepGoing) { for (size_t j = 0; j < lc.completionStrings.size() - 1; ++j) { - char c1 = lc.completionStrings[j][longestCommonPrefix]; - char c2 = lc.completionStrings[j + 1][longestCommonPrefix]; + char32_t c1 = lc.completionStrings[j][longestCommonPrefix]; + char32_t c2 = lc.completionStrings[j + 1][longestCommonPrefix]; if ((0 == c1) || (0 == c2) || (c1 != c2)) { keepGoing = false; break; @@ -1835,7 +1835,7 @@ int InputBuffer::completeLine(PromptBase& pi) { do { c = linenoiseReadChar(); c = cleanupCtrl(c); - } while (c == static_cast(-1)); + } while (c == static_cast(-1)); // if any character other than tab, pass it to the main loop if (c != ctrlChar('I')) { @@ -1859,7 +1859,7 @@ int InputBuffer::completeLine(PromptBase& pi) { do { c = linenoiseReadChar(); c = cleanupCtrl(c); - } while (c == static_cast(-1)); + } while (c == static_cast(-1)); } switch (c) { case 'n': @@ -1915,7 +1915,7 @@ int InputBuffer::completeLine(PromptBase& pi) { do { c = linenoiseReadChar(); c = cleanupCtrl(c); - } while (c == static_cast(-1)); + } while (c == static_cast(-1)); } switch (c) { case ' ': @@ -2273,7 +2273,11 @@ int InputBuffer::incrementalHistorySearch(PromptBase& pi, int startChar) { } static bool isCharacterAlphanumeric(char32_t testChar) { - return (iswalnum(testChar) != 0 ? true : false); +#ifdef _WIN32 + return (iswalnum((wint_t) testChar) != 0 ? true : false); +#else + return (iswalnum(testChar) != 0 ? true : false); +#endif } #ifndef _WIN32 @@ -2642,7 +2646,7 @@ int InputBuffer::getInputLine(PromptBase& pi) { if (pos > 0 && len > 1) { historyRecallMostRecent = false; size_t leftCharPos = (pos == len) ? pos - 2 : pos - 1; - char aux = buf32[leftCharPos]; + char32_t aux = buf32[leftCharPos]; buf32[leftCharPos] = buf32[leftCharPos + 1]; buf32[leftCharPos + 1] = aux; if (pos != len) diff --git a/3rdParty/linenoise-ng/src/wcwidth.cpp b/3rdParty/linenoise-ng/src/wcwidth.cpp index 8d691de7b6..deec0ba6b5 100644 --- a/3rdParty/linenoise-ng/src/wcwidth.cpp +++ b/3rdParty/linenoise-ng/src/wcwidth.cpp @@ -66,12 +66,12 @@ namespace linenoise_ng { struct interval { - int first; - int last; + char32_t first; + char32_t last; }; /* auxiliary function for binary search in interval table */ -static int bisearch(wchar_t ucs, const struct interval *table, int max) { +static int bisearch(char32_t ucs, const struct interval *table, int max) { int min = 0; int mid;