diff options
Diffstat (limited to 'src/3rdParty/linenoise.hpp')
-rw-r--r-- | src/3rdParty/linenoise.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/3rdParty/linenoise.hpp b/src/3rdParty/linenoise.hpp index 604f889..b5b0efa 100644 --- a/src/3rdParty/linenoise.hpp +++ b/src/3rdParty/linenoise.hpp | |||
@@ -1578,6 +1578,17 @@ inline void SetMultiLine(bool ml) { | |||
1578 | mlmode = ml; | 1578 | mlmode = ml; |
1579 | } | 1579 | } |
1580 | 1580 | ||
1581 | inline int Strcasecmp(const char *a, const char *b) { | ||
1582 | int ca, cb; | ||
1583 | do { | ||
1584 | ca = (unsigned char) *a; a++; | ||
1585 | cb = (unsigned char) *b; b++; | ||
1586 | ca = tolower(toupper(ca)); | ||
1587 | cb = tolower(toupper(cb)); | ||
1588 | } while (ca == cb && ca != '\0'); | ||
1589 | return ca - cb; | ||
1590 | } | ||
1591 | |||
1581 | /* Return true if the terminal name is in the list of terminals we know are | 1592 | /* Return true if the terminal name is in the list of terminals we know are |
1582 | * not able to understand basic escape sequences. */ | 1593 | * not able to understand basic escape sequences. */ |
1583 | inline bool isUnsupportedTerm(void) { | 1594 | inline bool isUnsupportedTerm(void) { |
@@ -1587,7 +1598,7 @@ inline bool isUnsupportedTerm(void) { | |||
1587 | 1598 | ||
1588 | if (term == NULL) return false; | 1599 | if (term == NULL) return false; |
1589 | for (j = 0; unsupported_term[j]; j++) | 1600 | for (j = 0; unsupported_term[j]; j++) |
1590 | if (!strcasecmp(term,unsupported_term[j])) return true; | 1601 | if (!Strcasecmp(term,unsupported_term[j])) return true; |
1591 | #endif | 1602 | #endif |
1592 | return false; | 1603 | return false; |
1593 | } | 1604 | } |