summaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/liolib.c b/liolib.c
index 184568f7..2aba847c 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 1.23 1998/08/24 20:14:56 roberto Exp roberto $ 2** $Id: liolib.c,v 1.24 1998/08/30 20:25:24 roberto Exp roberto $
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*/
@@ -284,8 +284,8 @@ static void io_seek (void) {
284 FILE *f = getfile(FIRSTARG-1+1); 284 FILE *f = getfile(FIRSTARG-1+1);
285 int op = luaL_findstring(luaL_opt_string(FIRSTARG-1+2, "cur"), modenames); 285 int op = luaL_findstring(luaL_opt_string(FIRSTARG-1+2, "cur"), modenames);
286 long offset = luaL_opt_number(FIRSTARG-1+3, 0); 286 long offset = luaL_opt_number(FIRSTARG-1+3, 0);
287 luaL_arg_check(f, 1, "invalid file handler"); 287 luaL_arg_check(f, FIRSTARG-1+1, "invalid file handler");
288 luaL_arg_check(op != -1, 2, "invalid mode"); 288 luaL_arg_check(op != -1, FIRSTARG-1+2, "invalid mode");
289 op = fseek(f, offset, mode[op]); 289 op = fseek(f, offset, mode[op]);
290 if (op) 290 if (op)
291 pushresult(0); /* error */ 291 pushresult(0); /* error */
@@ -296,7 +296,7 @@ static void io_seek (void) {
296 296
297static void io_flush (void) { 297static void io_flush (void) {
298 FILE *f = getfile(FIRSTARG); 298 FILE *f = getfile(FIRSTARG);
299 luaL_arg_check(f || lua_getparam(FIRSTARG) == LUA_NOOBJECT, 1, 299 luaL_arg_check(f || lua_getparam(FIRSTARG) == LUA_NOOBJECT, FIRSTARG,
300 "invalid file handler"); 300 "invalid file handler");
301 pushresult(fflush(f) == 0); 301 pushresult(fflush(f) == 0);
302} 302}