| 382 | |
| 383 | |
| 384 | static const char *pushnexttemplate (lua_State *L, const char *path) { |
| 385 | const char *l; |
| 386 | while (*path == *LUA_PATH_SEP) path++; /* skip separators */ |
| 387 | if (*path == '\0') return NULL; /* no more templates */ |
| 388 | l = strchr(path, *LUA_PATH_SEP); /* find next separator */ |
| 389 | if (l == NULL) l = path + strlen(path); |
| 390 | lua_pushlstring(L, path, l - path); /* template */ |
| 391 | return l; |
| 392 | } |
| 393 | |
| 394 | |
| 395 | static const char *searchpath (lua_State *L, const char *name, |
no test coverage detected