| 427 | |
| 428 | |
| 429 | static const char *pushnexttemplate (lua_State *L, const char *path) { |
| 430 | const char *l; |
| 431 | while (*path == *LUA_PATH_SEP) path++; /* skip separators */ |
| 432 | if (*path == '\0') return NULL; /* no more templates */ |
| 433 | l = strchr(path, *LUA_PATH_SEP); /* find next separator */ |
| 434 | if (l == NULL) l = path + strlen(path); |
| 435 | lua_pushlstring(L, path, l - path); /* template */ |
| 436 | return l; |
| 437 | } |
| 438 | |
| 439 | |
| 440 | static const char *searchpath (lua_State *L, const char *name, |
no test coverage detected