Lines Matching refs:fp

82 inifile * inifile_alloc(php_stream *fp, int readonly, int persistent TSRMLS_DC)  in inifile_alloc()  argument
87 if (!php_stream_truncate_supported(fp)) { in inifile_alloc()
95 dba->fp = fp; in inifile_alloc()
172 while ((fline = php_stream_gets(dba->fp, NULL, 0)) != NULL) { in inifile_read()
184 ln->pos = php_stream_tell(dba->fp); in inifile_read()
204 ln->pos = php_stream_tell(dba->fp); in inifile_read()
252 php_stream_seek(dba->fp, dba->next.pos, SEEK_SET); in inifile_fetch()
256 php_stream_rewind(dba->fp); in inifile_fetch()
269 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch()
281 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch()
301 php_stream_seek(dba->fp, dba->curr.pos, SEEK_SET); in inifile_nextkey()
316 if ((res=php_stream_truncate_set_size(dba->fp, size)) != 0) { in inifile_truncate()
320 php_stream_seek(dba->fp, size, SEEK_SET); in inifile_truncate()
332 php_stream_flush(dba->fp); in inifile_find_group()
333 php_stream_seek(dba->fp, 0, SEEK_SET); in inifile_find_group()
347 *pos_grp_start = php_stream_tell(dba->fp); in inifile_find_group()
355 *pos_grp_start = php_stream_tell(dba->fp); in inifile_find_group()
370 *pos_grp_start = php_stream_tell(dba->fp); in inifile_next_group()
377 *pos_grp_start = php_stream_tell(dba->fp); in inifile_next_group()
388 php_stream *fp; in inifile_copy_to() local
394 if ((fp = php_stream_temp_create(0, 64 * 1024)) == NULL) { in inifile_copy_to()
400 if ((*ini_copy = inifile_alloc(fp, 1, 0 TSRMLS_CC)) == NULL) { in inifile_copy_to()
404 php_stream_seek(dba->fp, pos_start, SEEK_SET); in inifile_copy_to()
405 if (!php_stream_copy_to_stream_ex(dba->fp, fp, pos_end - pos_start, NULL)) { in inifile_copy_to()
422 php_stream_seek(from->fp, 0, SEEK_SET); in inifile_filter()
423 php_stream_seek(dba->fp, 0, SEEK_END); in inifile_filter()
427 pos_curr = php_stream_tell(from->fp); in inifile_filter()
429 php_stream_seek(from->fp, pos_start, SEEK_SET); in inifile_filter()
430 if (!php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) { in inifile_filter()
434 php_stream_seek(from->fp, pos_curr, SEEK_SET); in inifile_filter()
439 pos_next = php_stream_tell(from->fp); in inifile_filter()
448 php_stream_seek(from->fp, pos_start, SEEK_SET); in inifile_filter()
449 if (!php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) { in inifile_filter()
497 php_stream_seek(dba->fp, 0, SEEK_END); in inifile_delete_replace_append()
498 if (pos_grp_next != (size_t)php_stream_tell(dba->fp)) { in inifile_delete_replace_append()
499 php_stream_seek(dba->fp, pos_grp_next, SEEK_SET); in inifile_delete_replace_append()
500 if (!php_stream_copy_to_stream_ex(dba->fp, fp_tmp, PHP_STREAM_COPY_ALL, NULL)) { in inifile_delete_replace_append()
528 php_stream_printf(dba->fp TSRMLS_CC, "[%s]\n", key->group); in inifile_delete_replace_append()
530 php_stream_printf(dba->fp TSRMLS_CC, "%s=%s\n", key->name, value->value ? value->value : ""); in inifile_delete_replace_append()
540 php_stream_seek(dba->fp, 0, SEEK_END); in inifile_delete_replace_append()
541 if (!php_stream_copy_to_stream_ex(fp_tmp, dba->fp, PHP_STREAM_COPY_ALL, NULL)) { in inifile_delete_replace_append()
549 php_stream_close(ini_tmp->fp); in inifile_delete_replace_append()
555 php_stream_flush(dba->fp); in inifile_delete_replace_append()
556 php_stream_seek(dba->fp, 0, SEEK_SET); in inifile_delete_replace_append()