diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lua.c | 4 | ||||
-rw-r--r-- | src/luaconf.h | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/lua.c b/src/lua.c index 1f2953f..59be9de 100644 --- a/src/lua.c +++ b/src/lua.c @@ -179,7 +179,9 @@ static int pushline (lua_State *L, int firstline) { char *b = buffer; size_t l; const char *prmt = get_prompt(L, firstline); - if (lua_readline(L, b, prmt) == 0) + fputs(prmt, stdout); + fflush(stdout); + if (fgets(buffer, LUA_MAXINPUT, stdin) == NULL) return 0; /* no input */ l = strlen(b); if (l > 0 && b[l-1] == '\n') /* line ends with newline? */ diff --git a/src/luaconf.h b/src/luaconf.h index c0af7e0..ebf6682 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -262,11 +262,6 @@ #define LUA_MAXINPUT 512 -/* 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 */ - #endif /* }================================================================== */ |