| 353 | |
| 354 | |
| 355 | static const char *pushnexttemplate (lua_State *L, const char *path) { |
| 356 | const char *l; |
| 357 | while (*path == *LUA_PATHSEP) path++; /* skip separators */ |
| 358 | if (*path == '\0') return NULL; /* no more templates */ |
| 359 | l = strchr(path, *LUA_PATHSEP); /* find next separator */ |
| 360 | if (l == NULL) l = path + strlen(path); |
| 361 | lua_pushlstring(L, path, l - path); /* template */ |
| 362 | return l; |
| 363 | } |
| 364 | |
| 365 | |
| 366 | static const char *findfile (lua_State *L, const char *name, |
no test coverage detected