1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into devel

This commit is contained in:
jsteemann 2015-12-15 13:57:44 +01:00
commit 05b45b166a
3 changed files with 17 additions and 12 deletions

View File

@ -1757,7 +1757,7 @@ static const size_t completionCountCutoff = 100;
*/ */
int InputBuffer::completeLine(PromptBase& pi) { int InputBuffer::completeLine(PromptBase& pi) {
linenoiseCompletions lc; linenoiseCompletions lc;
char c = 0; char32_t c = 0;
// completionCallback() expects a parsable entity, so find the previous break character and // 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. // 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; bool keepGoing = true;
while (keepGoing) { while (keepGoing) {
for (size_t j = 0; j < lc.completionStrings.size() - 1; ++j) { for (size_t j = 0; j < lc.completionStrings.size() - 1; ++j) {
char c1 = lc.completionStrings[j][longestCommonPrefix]; char32_t c1 = lc.completionStrings[j][longestCommonPrefix];
char c2 = lc.completionStrings[j + 1][longestCommonPrefix]; char32_t c2 = lc.completionStrings[j + 1][longestCommonPrefix];
if ((0 == c1) || (0 == c2) || (c1 != c2)) { if ((0 == c1) || (0 == c2) || (c1 != c2)) {
keepGoing = false; keepGoing = false;
break; break;
@ -1835,7 +1835,7 @@ int InputBuffer::completeLine(PromptBase& pi) {
do { do {
c = linenoiseReadChar(); c = linenoiseReadChar();
c = cleanupCtrl(c); c = cleanupCtrl(c);
} while (c == static_cast<char>(-1)); } while (c == static_cast<char32_t>(-1));
// if any character other than tab, pass it to the main loop // if any character other than tab, pass it to the main loop
if (c != ctrlChar('I')) { if (c != ctrlChar('I')) {
@ -1859,7 +1859,7 @@ int InputBuffer::completeLine(PromptBase& pi) {
do { do {
c = linenoiseReadChar(); c = linenoiseReadChar();
c = cleanupCtrl(c); c = cleanupCtrl(c);
} while (c == static_cast<char>(-1)); } while (c == static_cast<char32_t>(-1));
} }
switch (c) { switch (c) {
case 'n': case 'n':
@ -1915,7 +1915,7 @@ int InputBuffer::completeLine(PromptBase& pi) {
do { do {
c = linenoiseReadChar(); c = linenoiseReadChar();
c = cleanupCtrl(c); c = cleanupCtrl(c);
} while (c == static_cast<char>(-1)); } while (c == static_cast<char32_t>(-1));
} }
switch (c) { switch (c) {
case ' ': case ' ':
@ -2273,7 +2273,11 @@ int InputBuffer::incrementalHistorySearch(PromptBase& pi, int startChar) {
} }
static bool isCharacterAlphanumeric(char32_t testChar) { 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 #ifndef _WIN32
@ -2642,7 +2646,7 @@ int InputBuffer::getInputLine(PromptBase& pi) {
if (pos > 0 && len > 1) { if (pos > 0 && len > 1) {
historyRecallMostRecent = false; historyRecallMostRecent = false;
size_t leftCharPos = (pos == len) ? pos - 2 : pos - 1; 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] = buf32[leftCharPos + 1];
buf32[leftCharPos + 1] = aux; buf32[leftCharPos + 1] = aux;
if (pos != len) if (pos != len)

View File

@ -66,12 +66,12 @@
namespace linenoise_ng { namespace linenoise_ng {
struct interval { struct interval {
int first; char32_t first;
int last; char32_t last;
}; };
/* auxiliary function for binary search in interval table */ /* 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 min = 0;
int mid; int mid;

View File

@ -107,7 +107,7 @@ case $target in
;; ;;
armv7l-*-linux-gnueabihf) armv7l-*-linux-gnueabihf)
CPPFLAGS="${CPPFLAGS} -O0" CXXFLAGS="${CXXFLAGS} -O0"
tr_ARM="yes" tr_ARM="yes"
tr_ARM7="yes" tr_ARM7="yes"
;; ;;
@ -117,6 +117,7 @@ case $target in
dnl special flags for Arm V6 (pi) dnl special flags for Arm V6 (pi)
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
CPPFLAGS="${CPPFLAGS} -O0 -DUSE_EABI_HARDFLOAT -march=armv6 -mfloat-abi=hard" CPPFLAGS="${CPPFLAGS} -O0 -DUSE_EABI_HARDFLOAT -march=armv6 -mfloat-abi=hard"
CXXFLAGS="${CXXFLAGS} -O0"
tr_ARM="yes" tr_ARM="yes"
tr_ARM6="yes" tr_ARM6="yes"
;; ;;