mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Ues linenoise in Lua, Python, and SQLite
This commit is contained in:
parent
fe29710e4e
commit
1e5bd4d23e
14 changed files with 230 additions and 303 deletions
8
third_party/lua/lua.main.c
vendored
8
third_party/lua/lua.main.c
vendored
|
@ -412,6 +412,14 @@ static int handle_luainit (lua_State *L) {
|
|||
#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 "third_party/linenoise/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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue