Lines Matching refs:dirlen
191 int dirlen = strlen(dir); in phar_make_dirstream() local
200 …if ((*dir == '/' && dirlen == 1 && (manifest->nNumOfElements == 0)) || (dirlen >= sizeof(".phar")-… in phar_make_dirstream()
217 if (keylen <= (uint)dirlen) { in phar_make_dirstream()
218 if (keylen == 0 || keylen < (uint)dirlen || !strncmp(str_key, dir, dirlen)) { in phar_make_dirstream()
253 if (0 != memcmp(str_key, dir, dirlen)) { in phar_make_dirstream()
261 if (str_key[dirlen] != '/') { in phar_make_dirstream()
272 save += dirlen + 1; /* seek to just past the path separator */ in phar_make_dirstream()
274 if (NULL != (found = (char *) memchr(save, '/', keylen - dirlen - 1))) { in phar_make_dirstream()
276 save -= dirlen + 1; in phar_make_dirstream()
277 entry = (char *) safe_emalloc(found - save + dirlen, 1, 1); in phar_make_dirstream()
278 memcpy(entry, save + dirlen + 1, found - save - dirlen - 1); in phar_make_dirstream()
279 keylen = found - save - dirlen - 1; in phar_make_dirstream()
283 save -= dirlen + 1; in phar_make_dirstream()
284 entry = (char *) safe_emalloc(keylen - dirlen, 1, 1); in phar_make_dirstream()
285 memcpy(entry, save + dirlen + 1, keylen - dirlen - 1); in phar_make_dirstream()
286 entry[keylen - dirlen - 1] = '\0'; in phar_make_dirstream()
287 keylen = keylen - dirlen - 1; in phar_make_dirstream()