aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-09-25 14:08:46 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-09-25 14:08:46 -0300
commit8e9b1e4ae979aec95dcceb0db177367f5e865041 (patch)
tree6a00fb28f7a79c7320b81103ebb4baf1bbb4d205 /lua.c
parent328d53e77bf53277f565944055d3dd923d9b5c46 (diff)
downloadlua-8e9b1e4ae979aec95dcceb0db177367f5e865041.tar.gz
lua-8e9b1e4ae979aec95dcceb0db177367f5e865041.tar.bz2
lua-8e9b1e4ae979aec95dcceb0db177367f5e865041.zip
details
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua.c b/lua.c
index 4b6162e0..b1c4cb7b 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.68 2001/06/11 14:57:17 roberto Exp $ 2** $Id: lua.c,v 1.69 2001/08/30 20:54:02 roberto Exp $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -196,7 +196,7 @@ static void manual_input (int version, int prompt) {
196 } 196 }
197 if (firstline && buffer[0] == l_c('=')) { 197 if (firstline && buffer[0] == l_c('=')) {
198 buffer[0] = l_c(' '); 198 buffer[0] = l_c(' ');
199 lua_pushstring(L, l_s("return ")); 199 lua_pushstring(L, l_s("return"));
200 toprint = 1; 200 toprint = 1;
201 } 201 }
202 l = strlen(buffer); 202 l = strlen(buffer);
@@ -212,8 +212,8 @@ static void manual_input (int version, int prompt) {
212 } 212 }
213 lua_concat(L, lua_gettop(L)); 213 lua_concat(L, lua_gettop(L));
214 ldo(lua_dostring, lua_tostring(L, 1), 0); 214 ldo(lua_dostring, lua_tostring(L, 1), 0);
215 if (toprint) { 215 lua_remove(L, 1); /* remove ran string */
216 lua_remove(L, 1); /* remove ran string */ 216 if (toprint && lua_gettop(L) > 0) { /* any result to print? */
217 lua_getglobal(L, l_s("print")); 217 lua_getglobal(L, l_s("print"));
218 lua_insert(L, 1); 218 lua_insert(L, 1);
219 lua_call(L, lua_gettop(L)-1, 0); 219 lua_call(L, lua_gettop(L)-1, 0);