diff options
author | 2017-02-05 16:17:00 +0100 | |
---|---|---|
committer | 2017-02-05 16:17:00 +0100 | |
commit | e6838eb5c4e2da8244d6935633dfcb683256c044 (patch) | |
tree | 7be667ded2a2a33b6361f8a2f9e0d7ee86b62264 /3rdparty/lua/src/lua.c | |
parent | 8d1eb8e410f18bd20f8bb0ac68826bce9c32e635 (diff) |
LUA to 5.3.4 (nw)
Diffstat (limited to '3rdparty/lua/src/lua.c')
-rw-r--r-- | 3rdparty/lua/src/lua.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/3rdparty/lua/src/lua.c b/3rdparty/lua/src/lua.c index 545d23d49b7..3f082da6be6 100644 --- a/3rdparty/lua/src/lua.c +++ b/3rdparty/lua/src/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.226 2015/08/14 19:11:20 roberto Exp $ +** $Id: lua.c,v 1.230 2017/01/12 17:14:26 roberto Exp $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -20,6 +20,7 @@ #include "lualib.h" + #if !defined(LUA_PROMPT) #define LUA_PROMPT "> " #define LUA_PROMPT2 ">> " @@ -37,8 +38,7 @@ #define LUA_INIT_VAR "LUA_INIT" #endif -#define LUA_INITVARVERSION \ - LUA_INIT_VAR "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR +#define LUA_INITVARVERSION LUA_INIT_VAR LUA_VERSUFFIX /* @@ -55,6 +55,8 @@ #elif defined(LUA_USE_WINDOWS) /* }{ */ #include <io.h> +#include <windows.h> + #define lua_stdin_is_tty() _isatty(_fileno(stdin)) #else /* }{ */ @@ -457,7 +459,7 @@ static int handle_script (lua_State *L, char **argv) { /* ** Traverses all arguments from 'argv', returning a mask with those ** needed before running any Lua code (or an error code if it finds -** any invalid argument). 'first' returns the first not-handled argument +** any invalid argument). 'first' returns the first not-handled argument ** (either the script name or a bad argument in case of error). */ static int collectargs (char **argv, int *first) { @@ -481,7 +483,7 @@ static int collectargs (char **argv, int *first) { args |= has_E; break; case 'i': - args |= has_i; /* (-i implies -v) *//* FALLTHROUGH */ + args |= has_i; /* (-i implies -v) *//* FALLTHROUGH */ case 'v': if (argv[i][2] != '\0') /* extra characters after 1st? */ return has_error; /* invalid option */ @@ -529,6 +531,7 @@ static int runargs (lua_State *L, char **argv, int n) { } + static int handle_luainit (lua_State *L) { const char *name = "=" LUA_INITVARVERSION; const char *init = getenv(name + 1); |