MCPcopy Index your code
hub / github.com/assaultcube/AC / parentdir

Function parentdir

source/src/stream.cpp:93–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93const char *parentdir(const char *directory)
94{
95 const char *p = directory + strlen(directory);
96 while(p > directory && *p != '/' && *p != '\\') p--;
97 static string parent;
98 size_t len = p-directory+1;
99 copystring(parent, directory, len);
100 return parent;
101}
102
103const char *behindpath(const char *s)
104{

Callers 7

_textureFunction · 0.85
loopvFunction · 0.85
fileexistsFunction · 0.85
loadMethod · 0.85
svcmainMethod · 0.85
fixzipnameFunction · 0.85
loadMethod · 0.85

Calls 1

copystringFunction · 0.85

Tested by

no test coverage detected