Lines Matching refs:fp
55 php_stream_seek(dba->fp, 0L, SEEK_END); in flatfile_store()
56 php_stream_printf(dba->fp, "%zu\n", key_datum.dsize); in flatfile_store()
57 php_stream_flush(dba->fp); in flatfile_store()
58 if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { in flatfile_store()
61 php_stream_printf(dba->fp, "%zu\n", value_datum.dsize); in flatfile_store()
62 php_stream_flush(dba->fp); in flatfile_store()
63 if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { in flatfile_store()
68 php_stream_printf(dba->fp, "%zu\n", key_datum.dsize); in flatfile_store()
69 php_stream_flush(dba->fp); in flatfile_store()
70 if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { in flatfile_store()
73 php_stream_printf(dba->fp, "%zu\n", value_datum.dsize); in flatfile_store()
74 if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { in flatfile_store()
79 php_stream_flush(dba->fp); in flatfile_store()
91 if (php_stream_gets(dba->fp, buf, sizeof(buf))) { in flatfile_fetch()
94 value_datum.dsize = php_stream_read(dba->fp, value_datum.dptr, value_datum.dsize); in flatfile_fetch()
114 php_stream_rewind(dba->fp); in flatfile_delete()
115 while(!php_stream_eof(dba->fp)) { in flatfile_delete()
117 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
125 pos = php_stream_tell(dba->fp); in flatfile_delete()
128 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
131 php_stream_seek(dba->fp, pos, SEEK_SET); in flatfile_delete()
132 php_stream_putc(dba->fp, 0); in flatfile_delete()
133 php_stream_flush(dba->fp); in flatfile_delete()
134 php_stream_seek(dba->fp, 0L, SEEK_END); in flatfile_delete()
140 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
149 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
166 php_stream_rewind(dba->fp); in flatfile_findkey()
167 while (!php_stream_eof(dba->fp)) { in flatfile_findkey()
168 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
176 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
184 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
192 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
207 php_stream_rewind(dba->fp); in flatfile_firstkey()
208 while(!php_stream_eof(dba->fp)) { in flatfile_firstkey()
209 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
217 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
220 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_firstkey()
225 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
233 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
250 php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); in flatfile_nextkey()
251 while(!php_stream_eof(dba->fp)) { in flatfile_nextkey()
252 if (!php_stream_gets(dba->fp, buf, 15)) { 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()
270 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
273 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_nextkey()