Lines Matching refs:keylen
175 size_t keylen; in phar_make_dirstream() local
195 keylen = ZSTR_LEN(str_key); in phar_make_dirstream()
196 if (keylen <= dirlen) { in phar_make_dirstream()
197 if (keylen == 0 || keylen < dirlen || !strncmp(ZSTR_VAL(str_key), dir, dirlen)) { in phar_make_dirstream()
207 if (keylen >= sizeof(".phar")-1 && !memcmp(ZSTR_VAL(str_key), ".phar", sizeof(".phar")-1)) { in phar_make_dirstream()
215 if (NULL != (found = (char *) memchr(ZSTR_VAL(str_key), '/', keylen))) { in phar_make_dirstream()
219 keylen = found - ZSTR_VAL(str_key); in phar_make_dirstream()
220 entry[keylen] = '\0'; in phar_make_dirstream()
222 entry = (char *) safe_emalloc(keylen, 1, 1); in phar_make_dirstream()
223 memcpy(entry, ZSTR_VAL(str_key), keylen); in phar_make_dirstream()
224 entry[keylen] = '\0'; in phar_make_dirstream()
248 if (NULL != (found = (char *) memchr(save, '/', keylen - dirlen - 1))) { in phar_make_dirstream()
253 keylen = found - save - dirlen - 1; in phar_make_dirstream()
254 entry[keylen] = '\0'; in phar_make_dirstream()
258 entry = (char *) safe_emalloc(keylen - dirlen, 1, 1); in phar_make_dirstream()
259 memcpy(entry, save + dirlen + 1, keylen - dirlen - 1); in phar_make_dirstream()
260 entry[keylen - dirlen - 1] = '\0'; in phar_make_dirstream()
261 keylen = keylen - dirlen - 1; in phar_make_dirstream()
264 if (keylen) { in phar_make_dirstream()
265 phar_add_empty(data, entry, keylen); in phar_make_dirstream()