MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / pushnexttemplate

Function pushnexttemplate

other_src/lua/src/loadlib.cpp:355–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353
354
355static 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
366static const char *findfile (lua_State *L, const char *name,

Callers 1

findfileFunction · 0.70

Calls 1

lua_pushlstringFunction · 0.70

Tested by

no test coverage detected