Lines Matching refs:buf
88 char buf[16]; in flatfile_fetch() local
91 if (php_stream_gets(dba->fp, buf, sizeof(buf))) { in flatfile_fetch()
92 value_datum.dsize = atoi(buf); in flatfile_fetch()
110 char *buf = emalloc(buf_size); in flatfile_delete() local
117 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
120 num = atoi(buf); in flatfile_delete()
123 buf = erealloc(buf, buf_size); in flatfile_delete()
128 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
130 if (size == num && !memcmp(buf, key, size)) { in flatfile_delete()
135 efree(buf); in flatfile_delete()
140 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
143 num = atoi(buf); in flatfile_delete()
146 buf = erealloc(buf, buf_size); in flatfile_delete()
149 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
151 efree(buf); in flatfile_delete()
160 char *buf = emalloc(buf_size); in flatfile_findkey() local
168 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
171 num = atoi(buf); in flatfile_findkey()
174 buf = erealloc(buf, buf_size); in flatfile_findkey()
176 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
179 if (!memcmp(buf, key, size)) { in flatfile_findkey()
184 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
187 num = atoi(buf); in flatfile_findkey()
190 buf = erealloc(buf, buf_size); in flatfile_findkey()
192 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
194 efree(buf); in flatfile_findkey()
205 char *buf = emalloc(buf_size); in flatfile_firstkey() local
209 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
212 num = atoi(buf); in flatfile_firstkey()
215 buf = erealloc(buf, buf_size); in flatfile_firstkey()
217 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
219 if (*(buf) != 0) { in flatfile_firstkey()
221 res.dptr = buf; in flatfile_firstkey()
225 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
228 num = atoi(buf); in flatfile_firstkey()
231 buf = erealloc(buf, buf_size); in flatfile_firstkey()
233 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
235 efree(buf); in flatfile_firstkey()
248 char *buf = emalloc(buf_size); in flatfile_nextkey() local
252 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_nextkey()
255 num = atoi(buf); in flatfile_nextkey()
258 buf = erealloc(buf, buf_size); in flatfile_nextkey()
260 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
262 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_nextkey()
265 num = atoi(buf); in flatfile_nextkey()
268 buf = erealloc(buf, buf_size); in flatfile_nextkey()
270 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
272 if (*(buf)!=0) { in flatfile_nextkey()
274 res.dptr = buf; in flatfile_nextkey()
279 efree(buf); in flatfile_nextkey()