| 2870 | } |
| 2871 | |
| 2872 | static int compat53_errfile(lua_State *L, const char *what, int fnameindex) { |
| 2873 | char buf[512] = { 0 }; |
| 2874 | const char *serr = compat53_strerror(errno, buf, sizeof(buf)); |
| 2875 | const char *filename = lua_tostring(L, fnameindex) + 1; |
| 2876 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 2877 | lua_remove(L, fnameindex); |
| 2878 | return LUA_ERRFILE; |
| 2879 | } |
| 2880 | |
| 2881 | static int compat53_skipBOM(compat53_LoadF *lf) { |
| 2882 | const char *p = "\xEF\xBB\xBF"; /* UTF-8 BOM mark */ |
no test coverage detected