| 731 | |
| 732 | |
| 733 | static int errfile (lua_State *L, const char *what, int fnameindex) { |
| 734 | const char *serr = strerror(errno); |
| 735 | const char *filename = lua_tostring(L, fnameindex) + 1; |
| 736 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 737 | lua_remove(L, fnameindex); |
| 738 | return LUA_ERRFILE; |
| 739 | } |
| 740 | |
| 741 | |
| 742 | static int skipBOM (LoadF *lf) { |
no test coverage detected