| 13106 | |
| 13107 | |
| 13108 | static const char *pushnexttemplate (lua_State *L, const char *path) { |
| 13109 | const char *l; |
| 13110 | while (*path == *LUA_PATHSEP) path++; /* skip separators */ |
| 13111 | if (*path == '\0') return NULL; /* no more templates */ |
| 13112 | l = strchr(path, *LUA_PATHSEP); /* find next separator */ |
| 13113 | if (l == NULL) l = path + strlen(path); |
| 13114 | lua_pushlstring(L, path, l - path); /* template */ |
| 13115 | return l; |
| 13116 | } |
| 13117 | |
| 13118 | |
| 13119 | static const char *findfile (lua_State *L, const char *name, |
no test coverage detected