Lines Matching refs:len
46 static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos) in cdb_match() argument
51 while (len > 0) { in cdb_match()
53 if (n > len) in cdb_match()
54 n = len; in cdb_match()
61 len -= n; in cdb_match()
68 uint32 cdb_hash(char *buf, unsigned int len) in cdb_hash() argument
74 while (len--) { in cdb_hash()
104 int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos) in cdb_read() argument
110 while (len > 0) { in cdb_read()
113 r = php_stream_read(c->fp, buf, len); in cdb_read()
122 len -= r; in cdb_read()
129 int cdb_findnext(struct cdb *c, char *key, unsigned int len) in cdb_findnext() argument
136 u = cdb_hash(key, len); in cdb_findnext()
165 if (u == len) in cdb_findnext()
166 switch(cdb_match(c, key, len, pos + 8)) { in cdb_findnext()
171 c->dpos = pos + 8 + len; in cdb_findnext()
182 int cdb_find(struct cdb *c, char *key, unsigned int len) in cdb_find() argument
185 return cdb_findnext(c, key, len); in cdb_find()