MCPcopy Create free account
hub / github.com/NetHack/NetHack / contains_directory

Function contains_directory

src/files.c:2178–2190  ·  view source on GitHub ↗

return TRUE if s contains a directory, not just a filespec */

Source from the content-addressed store, hash-verified

2176
2177/* return TRUE if s contains a directory, not just a filespec */
2178boolean
2179contains_directory(const char *s)
2180{
2181 int i, slen = strlen(s);
2182 const char *cp = s;
2183
2184 for (i = 0; i < slen; ++i) {
2185 if (*cp == '\\' || *cp == '/' || *cp == ':')
2186 return TRUE;
2187 cp++;
2188 }
2189 return FALSE;
2190}
2191
2192/* =========================================================================*/
2193

Callers 2

make_converted_nameFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected