mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Fix some issues and do some code cleanup
This commit is contained in:
parent
1f229e4efc
commit
312ed5c67c
72 changed files with 880 additions and 982 deletions
6
third_party/lua/lua.main.c
vendored
6
third_party/lua/lua.main.c
vendored
|
@ -307,7 +307,8 @@ static void doREPL (lua_State *L) {
|
|||
progname = NULL; /* no 'progname' on errors in interactive mode */
|
||||
lua_initrepl(L, LUA_PROGNAME);
|
||||
for (;;) {
|
||||
linenoiseEnableRawMode(0);
|
||||
if (lua_repl_isterminal)
|
||||
linenoiseEnableRawMode(0);
|
||||
TryAgain:
|
||||
status = lua_loadline(L);
|
||||
if (status == -2 && errno == EAGAIN) {
|
||||
|
@ -315,7 +316,8 @@ static void doREPL (lua_State *L) {
|
|||
poll(&(struct pollfd){0, POLLIN}, 1, -1);
|
||||
goto TryAgain;
|
||||
}
|
||||
linenoiseDisableRawMode();
|
||||
if (lua_repl_isterminal)
|
||||
linenoiseDisableRawMode();
|
||||
if (status == -1) {
|
||||
break;
|
||||
} else if (status == -2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue