| 380 | |
| 381 | |
| 382 | static int readable(const char *filename) { |
| 383 | FILE *f = fopen(filename, "r"); /* try to open file */ |
| 384 | if (f == nullptr) return 0; /* open failed */ |
| 385 | fclose(f); |
| 386 | return 1; |
| 387 | } |
| 388 | |
| 389 | |
| 390 | static const char *pushnexttemplate(lua_State *L, const char *path) { |