| 658 | |
| 659 | |
| 660 | static int errfile (lua_State *L, const char *what, int fnameindex) { |
| 661 | const char *serr = strerror(errno); |
| 662 | const char *filename = lua_tostring(L, fnameindex) + 1; |
| 663 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 664 | lua_remove(L, fnameindex); |
| 665 | return LUA_ERRFILE; |
| 666 | } |
| 667 | |
| 668 | |
| 669 | static int skipBOM (LoadF *lf) { |
no test coverage detected