aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/linenoise.hpp
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-12-07 16:18:50 +0800
committerLi Jin <dragon-fly@qq.com>2023-12-07 16:18:50 +0800
commita1d719e3bbfe8cd39c05d2a8f49143b9e814f876 (patch)
tree218c66848de8923dc112a562e089d8b61396ba99 /src/3rdParty/linenoise.hpp
parentf61a1559846e5b03cc8106c4d35397f63aa9aad0 (diff)
downloadyuescript-a1d719e3bbfe8cd39c05d2a8f49143b9e814f876.tar.gz
yuescript-a1d719e3bbfe8cd39c05d2a8f49143b9e814f876.tar.bz2
yuescript-a1d719e3bbfe8cd39c05d2a8f49143b9e814f876.zip
fixing issue #157.
Diffstat (limited to 'src/3rdParty/linenoise.hpp')
-rw-r--r--src/3rdParty/linenoise.hpp13
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
1581inline 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. */
1583inline bool isUnsupportedTerm(void) { 1594inline 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}