Lines Matching refs:dirlen
183 size_t dirlen = strlen(dir); in phar_make_dirstream() local
192 …if ((*dir == '/' && dirlen == 1 && (manifest->nNumOfElements == 0)) || (dirlen >= sizeof(".phar")-… in phar_make_dirstream()
207 if (keylen <= (uint)dirlen) { in phar_make_dirstream()
208 if (keylen == 0 || keylen < (uint)dirlen || !strncmp(ZSTR_VAL(str_key), dir, dirlen)) { in phar_make_dirstream()
240 if (0 != memcmp(ZSTR_VAL(str_key), dir, dirlen)) { in phar_make_dirstream()
247 if (ZSTR_VAL(str_key)[dirlen] != '/') { in phar_make_dirstream()
257 save += dirlen + 1; /* seek to just past the path separator */ in phar_make_dirstream()
259 if (NULL != (found = (char *) memchr(save, '/', keylen - dirlen - 1))) { in phar_make_dirstream()
261 save -= dirlen + 1; in phar_make_dirstream()
262 entry = (char *) safe_emalloc(found - save + dirlen, 1, 1); in phar_make_dirstream()
263 memcpy(entry, save + dirlen + 1, found - save - dirlen - 1); in phar_make_dirstream()
264 keylen = found - save - dirlen - 1; in phar_make_dirstream()
268 save -= dirlen + 1; in phar_make_dirstream()
269 entry = (char *) safe_emalloc(keylen - dirlen, 1, 1); in phar_make_dirstream()
270 memcpy(entry, save + dirlen + 1, keylen - dirlen - 1); in phar_make_dirstream()
271 entry[keylen - dirlen - 1] = '\0'; in phar_make_dirstream()
272 keylen = keylen - dirlen - 1; in phar_make_dirstream()