| 348 | |
| 349 | |
| 350 | static int read_number (lua_State *L, FILE *f) { |
| 351 | lua_Number d; |
| 352 | if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) { |
| 353 | lua_pushnumber(L, d); |
| 354 | return 1; |
| 355 | } |
| 356 | else { |
| 357 | lua_pushnil(L); /* "result" to be removed */ |
| 358 | return 0; /* read fails */ |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | |
| 363 | static int test_eof (lua_State *L, FILE *f) { |
no test coverage detected