Lines Matching refs:chain
286 PHPAPI int php_stream_filter_prepend_ex(php_stream_filter_chain *chain, php_stream_filter *filter) in php_stream_filter_prepend_ex() argument
288 filter->next = chain->head; in php_stream_filter_prepend_ex()
291 if (chain->head) { in php_stream_filter_prepend_ex()
292 chain->head->prev = filter; in php_stream_filter_prepend_ex()
294 chain->tail = filter; in php_stream_filter_prepend_ex()
296 chain->head = filter; in php_stream_filter_prepend_ex()
297 filter->chain = chain; in php_stream_filter_prepend_ex()
302 PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter) in _php_stream_filter_prepend() argument
304 php_stream_filter_prepend_ex(chain, filter); in _php_stream_filter_prepend()
307 PHPAPI int php_stream_filter_append_ex(php_stream_filter_chain *chain, php_stream_filter *filter) in php_stream_filter_append_ex() argument
309 php_stream *stream = chain->stream; in php_stream_filter_append_ex()
311 filter->prev = chain->tail; in php_stream_filter_append_ex()
313 if (chain->tail) { in php_stream_filter_append_ex()
314 chain->tail->next = filter; in php_stream_filter_append_ex()
316 chain->head = filter; in php_stream_filter_append_ex()
318 chain->tail = filter; in php_stream_filter_append_ex()
319 filter->chain = chain; in php_stream_filter_append_ex()
321 if (&(stream->readfilters) == chain && (stream->writepos - stream->readpos) > 0) { in php_stream_filter_append_ex()
386 PHPAPI void _php_stream_filter_append(php_stream_filter_chain *chain, php_stream_filter *filter) in _php_stream_filter_append() argument
388 if (php_stream_filter_append_ex(chain, filter) != SUCCESS) { in _php_stream_filter_append()
389 if (chain->head == filter) { in _php_stream_filter_append()
390 chain->head = NULL; in _php_stream_filter_append()
391 chain->tail = NULL; in _php_stream_filter_append()
394 chain->tail = filter->prev; in _php_stream_filter_append()
403 php_stream_filter_chain *chain; in _php_stream_filter_flush() local
409 if (!filter->chain || !filter->chain->stream) { in _php_stream_filter_flush()
414 chain = filter->chain; in _php_stream_filter_flush()
415 stream = chain->stream; in _php_stream_filter_flush()
451 if (chain == &(stream->readfilters)) { in _php_stream_filter_flush()
469 } else if (chain == &(stream->writefilters)) { in _php_stream_filter_flush()
486 filter->chain->head = filter->next; in php_stream_filter_remove()
491 filter->chain->tail = filter->prev; in php_stream_filter_remove()