Lines Matching refs:fp
52 php_stream_seek(dba->fp, 0L, SEEK_END); in flatfile_store()
53 php_stream_printf(dba->fp, "%zu\n", key_datum.dsize); in flatfile_store()
54 php_stream_flush(dba->fp); in flatfile_store()
55 if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { in flatfile_store()
58 php_stream_printf(dba->fp, "%zu\n", value_datum.dsize); in flatfile_store()
59 php_stream_flush(dba->fp); in flatfile_store()
60 if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { in flatfile_store()
65 php_stream_printf(dba->fp, "%zu\n", key_datum.dsize); in flatfile_store()
66 php_stream_flush(dba->fp); in flatfile_store()
67 if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { in flatfile_store()
70 php_stream_printf(dba->fp, "%zu\n", value_datum.dsize); in flatfile_store()
71 if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { in flatfile_store()
76 php_stream_flush(dba->fp); in flatfile_store()
87 if (php_stream_gets(dba->fp, buf, sizeof(buf))) { in flatfile_fetch()
90 value_datum.dsize = php_stream_read(dba->fp, value_datum.dptr, value_datum.dsize); in flatfile_fetch()
109 php_stream_rewind(dba->fp); in flatfile_delete()
110 while(!php_stream_eof(dba->fp)) { in flatfile_delete()
112 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
120 pos = php_stream_tell(dba->fp); in flatfile_delete()
123 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
126 php_stream_seek(dba->fp, pos, SEEK_SET); in flatfile_delete()
127 php_stream_putc(dba->fp, 0); in flatfile_delete()
128 php_stream_flush(dba->fp); in flatfile_delete()
129 php_stream_seek(dba->fp, 0L, SEEK_END); in flatfile_delete()
135 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_delete()
144 num = php_stream_read(dba->fp, buf, num); in flatfile_delete()
160 php_stream_rewind(dba->fp); in flatfile_findkey()
161 while (!php_stream_eof(dba->fp)) { in flatfile_findkey()
162 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
170 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
178 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_findkey()
186 num = php_stream_read(dba->fp, buf, num); in flatfile_findkey()
200 php_stream_rewind(dba->fp); in flatfile_firstkey()
201 while(!php_stream_eof(dba->fp)) { in flatfile_firstkey()
202 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
210 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
213 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_firstkey()
218 if (!php_stream_gets(dba->fp, buf, 15)) { in flatfile_firstkey()
226 num = php_stream_read(dba->fp, buf, num); in flatfile_firstkey()
242 php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); in flatfile_nextkey()
243 while(!php_stream_eof(dba->fp)) { in flatfile_nextkey()
244 if (!php_stream_gets(dba->fp, buf, 15)) { 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()
262 num = php_stream_read(dba->fp, buf, num); in flatfile_nextkey()
265 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_nextkey()