| 339 | #define MAXARGLINE 250 |
| 340 | |
| 341 | static void aux_lines (lua_State *L, int toclose) { |
| 342 | int n = lua_gettop(L) - 1; /* number of arguments to read */ |
| 343 | luaL_argcheck(L, n <= MAXARGLINE, MAXARGLINE + 2, "too many arguments"); |
| 344 | lua_pushinteger(L, n); /* number of arguments to read */ |
| 345 | lua_pushboolean(L, toclose); /* close/not close file when finished */ |
| 346 | lua_rotate(L, 2, 2); /* move 'n' and 'toclose' to their positions */ |
| 347 | lua_pushcclosure(L, io_readline, 3 + n); |
| 348 | } |
| 349 | |
| 350 | |
| 351 | static int f_lines (lua_State *L) { |
no test coverage detected