about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-10-22 20:27:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-10-22 20:29:31 -0700
commit0ab2c77e6cac76e7ee4879dd246f29986f7186fb (patch)
treec138b624b134936c9bc876dc77bc52952e3d137c
parentc03ee20559da1e43d326511162baef12622f5ba2 (diff)
downloadteliva-0ab2c77e6cac76e7ee4879dd246f29986f7186fb.tar.gz
delete readline support
We're going to be using full-on ncurses.
-rw-r--r--src/Makefile6
-rw-r--r--src/luaconf.h20
2 files changed, 4 insertions, 22 deletions
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 <stdio.h>
-#include <readline/readline.h>
-#include <readline/history.h>
-#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