aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2014-01-02 00:39:47 +0100
committerWillem Jan Palenstijn2014-01-02 01:04:24 +0100
commit5686d606f0c7d766a37992075e8e7b8f1fae486e (patch)
tree7097f4e1a4357484cbfe8011ca6c2bf7aac1e48e /gui
parent781017b114cf6920308b2204daf36779ff03024c (diff)
downloadscummvm-rg350-5686d606f0c7d766a37992075e8e7b8f1fae486e.tar.gz
scummvm-rg350-5686d606f0c7d766a37992075e8e7b8f1fae486e.tar.bz2
scummvm-rg350-5686d606f0c7d766a37992075e8e7b8f1fae486e.zip
BUILD: Support libedit readline wrapper
This is used in Mac OS X. Thanks to waltervn for pointing this out and testing.
Diffstat (limited to 'gui')
-rw-r--r--gui/debugger.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 35627dd584..9aa322e12e 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -133,6 +133,14 @@ Debugger *g_readline_debugger;
char *readline_completionFunction(const char *text, int state) {
return g_readline_debugger->readlineComplete(text, state);
}
+
+#ifdef USE_READLINE_INT_COMPLETION
+typedef int RLCompFunc_t(const char *, int);
+#else
+typedef char *RLCompFunc_t(const char *, int);
+#endif
+
+
} // end of anonymous namespace
#endif
@@ -162,7 +170,7 @@ void Debugger::enter() {
// TODO: add support for saving/loading history?
g_readline_debugger = this;
- rl_completion_entry_function = &readline_completionFunction;
+ rl_completion_entry_function = (RLCompFunc_t *)&readline_completionFunction;
char *line_read = 0;
do {