Lines Matching refs:buf
48 char buf[32]; in cdb_match() local
52 n = sizeof(buf); in cdb_match()
55 if (cdb_read(c, buf, n, pos) == -1) in cdb_match()
57 if (memcmp(buf, key, n)) in cdb_match()
68 uint32 cdb_hash(char *buf, unsigned int len) in cdb_hash() argument
71 const unsigned char * b = (unsigned char *)buf; in cdb_hash()
104 int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos) in cdb_read() argument
113 r = php_stream_read(c->fp, buf, len); in cdb_read()
121 buf += r; in cdb_read()
131 char buf[8]; in cdb_findnext() local
137 if (cdb_read(c, buf, 8, (u << 3) & 2047) == -1) in cdb_findnext()
139 uint32_unpack(buf + 4,&c->hslots); in cdb_findnext()
142 uint32_unpack(buf, &c->hpos); in cdb_findnext()
151 if (cdb_read(c, buf, 8, c->kpos) == -1) in cdb_findnext()
153 uint32_unpack(buf + 4, &pos); in cdb_findnext()
160 uint32_unpack(buf, &u); in cdb_findnext()
162 if (cdb_read(c, buf, 8, pos) == -1) in cdb_findnext()
164 uint32_unpack(buf, &u); in cdb_findnext()
170 uint32_unpack(buf + 4, &c->dlen); in cdb_findnext()