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