| 3387 | } |
| 3388 | |
| 3389 | static int compat53_errfile(lua_State* L, const char* what, int fnameindex) { |
| 3390 | char buf[512] = { 0 }; |
| 3391 | const char* serr = compat53_strerror(errno, buf, sizeof(buf)); |
| 3392 | const char* filename = lua_tostring(L, fnameindex) + 1; |
| 3393 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 3394 | lua_remove(L, fnameindex); |
| 3395 | return LUA_ERRFILE; |
| 3396 | } |
| 3397 | |
| 3398 | static int compat53_skipBOM(compat53_LoadF* lf) { |
| 3399 | const char* p = "\xEF\xBB\xBF"; /* UTF-8 BOM mark */ |
no test coverage detected