Lines Matching refs:fp
55 php_stream_seek(dba->fp, 0L, SEEK_END); in flatfile_store()
56 php_stream_printf(dba->fp TSRMLS_CC, "%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 TSRMLS_CC, "%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 TSRMLS_CC, "%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 TSRMLS_CC, "%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()
134 php_stream_seek(dba->fp, pos, SEEK_SET); in flatfile_delete()
135 php_stream_putc(dba->fp, 0); in flatfile_delete()
136 php_stream_flush(dba->fp); in flatfile_delete()
137 php_stream_seek(dba->fp, 0L, SEEK_END); in flatfile_delete()
143 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
152 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
172 php_stream_rewind(dba->fp); in flatfile_findkey()
173 while (!php_stream_eof(dba->fp)) { in flatfile_findkey()
174 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
182 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
192 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
200 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
218 php_stream_rewind(dba->fp); in flatfile_firstkey()
219 while(!php_stream_eof(dba->fp)) { in flatfile_firstkey()
220 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
228 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
233 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_firstkey()
238 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
246 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
266 php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); in flatfile_nextkey()
267 while(!php_stream_eof(dba->fp)) { in flatfile_nextkey()
268 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_nextkey()
276 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
280 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_nextkey()
288 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
293 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_nextkey()