diff options
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 1.122 2001/08/31 19:46:07 roberto Exp $ | 2 | ** $Id: liolib.c,v 1.123 2001/10/02 16:41:36 roberto Exp $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -254,7 +254,7 @@ static int read_until (lua_State *L, FILE *f, const l_char *p, int pl) { | |||
254 | 254 | ||
255 | 255 | ||
256 | static int read_number (lua_State *L, FILE *f) { | 256 | static int read_number (lua_State *L, FILE *f) { |
257 | double d; | 257 | lua_Number d; |
258 | if (fscanf(f, l_s(LUA_NUMBER_SCAN), &d) == 1) { | 258 | if (fscanf(f, l_s(LUA_NUMBER_SCAN), &d) == 1) { |
259 | lua_pushnumber(L, d); | 259 | lua_pushnumber(L, d); |
260 | return 1; | 260 | return 1; |
@@ -299,7 +299,7 @@ static int io_read (lua_State *L) { | |||
299 | n = 2; /* will return n-1 results */ | 299 | n = 2; /* will return n-1 results */ |
300 | } | 300 | } |
301 | else { /* ensure stack space for all results and for auxlib's buffer */ | 301 | else { /* ensure stack space for all results and for auxlib's buffer */ |
302 | luaL_checkstack(L, nargs+LUA_MINSTACK, l_s("too many arguments")); | 302 | luaL_check_stack(L, nargs+LUA_MINSTACK, l_s("too many arguments")); |
303 | success = 1; | 303 | success = 1; |
304 | for (n = 1; n<=nargs && success; n++) { | 304 | for (n = 1; n<=nargs && success; n++) { |
305 | if (lua_rawtag(L, n) == LUA_TNUMBER) { | 305 | if (lua_rawtag(L, n) == LUA_TNUMBER) { |
@@ -515,7 +515,7 @@ static int io_time (lua_State *L) { | |||
515 | else { | 515 | else { |
516 | time_t t; | 516 | time_t t; |
517 | struct tm ts; | 517 | struct tm ts; |
518 | luaL_checktype(L, 1, LUA_TTABLE); | 518 | luaL_check_rawtype(L, 1, LUA_TTABLE); |
519 | lua_settop(L, 1); /* make sure table is at the top */ | 519 | lua_settop(L, 1); /* make sure table is at the top */ |
520 | ts.tm_sec = getfield(L, l_s("sec"), 0); | 520 | ts.tm_sec = getfield(L, l_s("sec"), 0); |
521 | ts.tm_min = getfield(L, l_s("min"), 0); | 521 | ts.tm_min = getfield(L, l_s("min"), 0); |