From 0ab2c77e6cac76e7ee4879dd246f29986f7186fb Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 22 Oct 2021 20:27:34 -0700 Subject: delete readline support We're going to be using full-on ncurses. --- src/Makefile | 6 +++--- src/luaconf.h | 20 +------------------- 2 files changed, 4 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index cb9f5e7..3ef73bc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -90,16 +90,16 @@ bsd: $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E" freebsd: - $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline" + $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E" generic: $(MAKE) all MYCFLAGS= linux: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lncurses" macosx: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX # use this on Mac OS X 10.3- # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX diff --git a/src/luaconf.h b/src/luaconf.h index e2cb261..b15f61d 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -262,30 +262,12 @@ #define LUA_MAXINPUT 512 -/* -@@ lua_readline defines how to show a prompt and then read a line from -@* the standard input. -@@ lua_saveline defines how to "save" a read line in a "history". -@@ lua_freeline defines how to free a line read by lua_readline. -** CHANGE them if you want to improve this functionality (e.g., by using -** GNU readline and history facilities). -*/ -#if defined(LUA_USE_READLINE) -#include -#include -#include -#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL) -#define lua_saveline(L,idx) \ - if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ - add_history(lua_tostring(L, idx)); /* add it to history */ -#define lua_freeline(L,b) ((void)L, free(b)) -#else +/* No readline */ #define lua_readline(L,b,p) \ ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ #define lua_saveline(L,idx) { (void)L; (void)idx; } #define lua_freeline(L,b) { (void)L; (void)b; } -#endif #endif -- cgit 1.4.1-2-gfad0