MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / pushnexttemplate

Function pushnexttemplate

libraries/AP_Scripting/lua/src/loadlib.c:429–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427
428
429static 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
440static const char *searchpath (lua_State *L, const char *name,

Callers 1

searchpathFunction · 0.85

Calls 2

strlenFunction · 0.85
lua_pushlstringFunction · 0.85

Tested by

no test coverage detected