| 414 | |
| 415 | |
| 416 | static int readable (const char *filename) { |
| 417 | FILE *f = fopen(filename, "r"); /* try to open file */ |
| 418 | if (f == NULL) return 0; /* open failed */ |
| 419 | fclose(f); |
| 420 | return 1; |
| 421 | } |
| 422 | |
| 423 | |
| 424 | static const char *pushnexttemplate (lua_State *L, const char *path) { |