mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-26 20:10:35 -09:00
For differences with 5.4.8, see: https://www.lua.org/work/diffs-lua-5.4.8-lua-5.4.9.html Signed-off-by: Francois Perrad <francois.perrad.86@gmail.com>a [Julien: add link to diff with previous version] Signed-off-by: Julien Olivain <ju.o@free.fr>
25 lines
758 B
Diff
25 lines
758 B
Diff
Add support of linenoise (replace readline)
|
|
|
|
Upstream: http://lua-users.org/lists/lua-l/2010-03/msg00879.html
|
|
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
|
|
|
Index: b/src/lua.c
|
|
===================================================================
|
|
--- a/src/lua.c
|
|
+++ b/src/lua.c
|
|
@@ -448,6 +448,14 @@
|
|
#define lua_saveline(L,line) ((void)L, add_history(line))
|
|
#define lua_freeline(L,b) ((void)L, free(b))
|
|
|
|
+#elif defined(LUA_USE_LINENOISE)
|
|
+
|
|
+#include <linenoise.h>
|
|
+#define lua_initreadline(L) ((void)L)
|
|
+#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL)
|
|
+#define lua_saveline(L,line) ((void)L, linenoiseHistoryAdd(line))
|
|
+#define lua_freeline(L,b) ((void)L, free(b))
|
|
+
|
|
#else /* }{ */
|
|
|
|
#define lua_initreadline(L) ((void)L)
|