Lines Matching refs:len
44 static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos) in cdb_match() argument
49 while (len > 0) { in cdb_match()
51 if (n > len) in cdb_match()
52 n = len; in cdb_match()
59 len -= n; in cdb_match()
66 uint32 cdb_hash(char *buf, unsigned int len) in cdb_hash() argument
72 while (len--) { in cdb_hash()
102 int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos) in cdb_read() argument
108 while (len > 0) { in cdb_read()
111 r = php_stream_read(c->fp, buf, len); in cdb_read()
120 len -= r; in cdb_read()
127 int cdb_findnext(struct cdb *c, char *key, unsigned int len) in cdb_findnext() argument
134 u = cdb_hash(key, len); in cdb_findnext()
163 if (u == len) in cdb_findnext()
164 switch(cdb_match(c, key, len, pos + 8)) { in cdb_findnext()
169 c->dpos = pos + 8 + len; in cdb_findnext()
180 int cdb_find(struct cdb *c, char *key, unsigned int len) in cdb_find() argument
183 return cdb_findnext(c, key, len); in cdb_find()