Lines Matching refs:buf
46 char buf[32]; in cdb_match() local
50 n = sizeof(buf); in cdb_match()
53 if (cdb_read(c, buf, n, pos) == -1) in cdb_match()
55 if (memcmp(buf, key, n)) in cdb_match()
66 uint32 cdb_hash(char *buf, unsigned int len) in cdb_hash() argument
69 const unsigned char * b = (unsigned char *)buf; in cdb_hash()
102 int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos) in cdb_read() argument
111 r = php_stream_read(c->fp, buf, len); in cdb_read()
119 buf += r; in cdb_read()
129 char buf[8]; in cdb_findnext() local
135 if (cdb_read(c, buf, 8, (u << 3) & 2047) == -1) in cdb_findnext()
137 uint32_unpack(buf + 4,&c->hslots); in cdb_findnext()
140 uint32_unpack(buf, &c->hpos); in cdb_findnext()
149 if (cdb_read(c, buf, 8, c->kpos) == -1) in cdb_findnext()
151 uint32_unpack(buf + 4, &pos); in cdb_findnext()
158 uint32_unpack(buf, &u); in cdb_findnext()
160 if (cdb_read(c, buf, 8, pos) == -1) in cdb_findnext()
162 uint32_unpack(buf, &u); in cdb_findnext()
168 uint32_unpack(buf + 4, &c->dlen); in cdb_findnext()