Lines Matching refs:buf
84 char buf[16]; in flatfile_fetch() local
87 if (php_stream_gets(dba->fp, buf, sizeof(buf))) { in flatfile_fetch()
88 value_datum.dsize = atoi(buf); in flatfile_fetch()
105 char *buf = emalloc(buf_size); in flatfile_delete() local
112 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
115 num = atoi(buf); in flatfile_delete()
118 buf = erealloc(buf, buf_size); in flatfile_delete()
123 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
125 if (size == num && !memcmp(buf, key, size)) { in flatfile_delete()
130 efree(buf); in flatfile_delete()
135 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
138 num = atoi(buf); in flatfile_delete()
141 buf = erealloc(buf, buf_size); in flatfile_delete()
144 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
146 efree(buf); in flatfile_delete()
154 char *buf = emalloc(buf_size); in flatfile_findkey() local
162 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
165 num = atoi(buf); in flatfile_findkey()
168 buf = erealloc(buf, buf_size); in flatfile_findkey()
170 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
173 if (!memcmp(buf, key, size)) { in flatfile_findkey()
178 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
181 num = atoi(buf); in flatfile_findkey()
184 buf = erealloc(buf, buf_size); in flatfile_findkey()
186 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
188 efree(buf); in flatfile_findkey()
198 char *buf = emalloc(buf_size); in flatfile_firstkey() local
202 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
205 num = atoi(buf); in flatfile_firstkey()
208 buf = erealloc(buf, buf_size); in flatfile_firstkey()
210 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
212 if (*(buf) != 0) { in flatfile_firstkey()
214 res.dptr = buf; in flatfile_firstkey()
218 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
221 num = atoi(buf); in flatfile_firstkey()
224 buf = erealloc(buf, buf_size); in flatfile_firstkey()
226 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
228 efree(buf); in flatfile_firstkey()
240 char *buf = emalloc(buf_size); in flatfile_nextkey() local
244 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_nextkey()
247 num = atoi(buf); in flatfile_nextkey()
250 buf = erealloc(buf, buf_size); in flatfile_nextkey()
252 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
254 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_nextkey()
257 num = atoi(buf); in flatfile_nextkey()
260 buf = erealloc(buf, buf_size); in flatfile_nextkey()
262 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
264 if (*(buf)!=0) { in flatfile_nextkey()
266 res.dptr = buf; in flatfile_nextkey()
271 efree(buf); in flatfile_nextkey()