diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-17 16:49:15 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-17 16:49:15 -0300 |
commit | 67578ec51f1a3ec2c967f15d370067caf9e0b87b (patch) | |
tree | d77b292ddec33d7e6987bae808fa1db250ebd830 /lua.c | |
parent | c2bb9abceceef125554595e23b7cc18ad3555c7c (diff) | |
download | lua-67578ec51f1a3ec2c967f15d370067caf9e0b87b.tar.gz lua-67578ec51f1a3ec2c967f15d370067caf9e0b87b.tar.bz2 lua-67578ec51f1a3ec2c967f15d370067caf9e0b87b.zip |
several small details
Diffstat (limited to 'lua.c')
-rw-r--r-- | lua.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.142 2005/04/13 17:24:20 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.143 2005/05/16 21:19:00 roberto Exp roberto $ |
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 | */ |
@@ -44,9 +44,9 @@ static void print_usage (void) { | |||
44 | "usage: %s [options] [script [args]].\n" | 44 | "usage: %s [options] [script [args]].\n" |
45 | "Available options are:\n" | 45 | "Available options are:\n" |
46 | " - execute stdin as a file\n" | 46 | " - execute stdin as a file\n" |
47 | " -e stat execute string 'stat'\n" | 47 | " -e stat execute string " LUA_QL("stat") "\n" |
48 | " -i enter interactive mode after executing 'script'\n" | 48 | " -i enter interactive mode after executing " LUA_QL("script") "\n" |
49 | " -l name require library 'name'\n" | 49 | " -l name require library " LUA_QL("name") "\n" |
50 | " -v show version information\n" | 50 | " -v show version information\n" |
51 | " -w trap access to undefined globals\n" | 51 | " -w trap access to undefined globals\n" |
52 | " -- stop handling options\n" , | 52 | " -- stop handling options\n" , |
@@ -209,8 +209,9 @@ static void dotty (lua_State *L) { | |||
209 | lua_getglobal(L, "print"); | 209 | lua_getglobal(L, "print"); |
210 | lua_insert(L, 1); | 210 | lua_insert(L, 1); |
211 | if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0) | 211 | if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0) |
212 | l_message(progname, lua_pushfstring(L, "error calling 'print' (%s)", | 212 | l_message(progname, lua_pushfstring(L, |
213 | lua_tostring(L, -1))); | 213 | "error calling " LUA_QL("print") " (%s)", |
214 | lua_tostring(L, -1))); | ||
214 | } | 215 | } |
215 | } | 216 | } |
216 | lua_settop(L, 0); /* clear stack */ | 217 | lua_settop(L, 0); /* clear stack */ |
@@ -222,7 +223,7 @@ static void dotty (lua_State *L) { | |||
222 | static int checkvar (lua_State *L) { | 223 | static int checkvar (lua_State *L) { |
223 | const char *name = lua_tostring(L, 2); | 224 | const char *name = lua_tostring(L, 2); |
224 | if (name) | 225 | if (name) |
225 | luaL_error(L, "attempt to access undefined variable " LUA_SM, name); | 226 | luaL_error(L, "attempt to access undefined variable " LUA_QS, name); |
226 | return 0; | 227 | return 0; |
227 | } | 228 | } |
228 | 229 | ||