Lines Matching refs:mode

62 	ZEND_ARG_INFO(0, mode)
195 char *mode, php_stream *innerstream STREAMS_DC TSRMLS_DC) in _php_stream_bz2open_from_BZFILE() argument
204 return php_stream_alloc_rel(&php_stream_bz2io_ops, self, 0, mode); in _php_stream_bz2open_from_BZFILE()
209 char *mode, in _php_stream_bz2open() argument
221 if (mode[0] == '\0' || (mode[0] != 'w' && mode[0] != 'r' && mode[1] != '\0')) { in _php_stream_bz2open()
239 bz_file = BZ2_bzopen(path_copy, mode); in _php_stream_bz2open()
251 stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path); in _php_stream_bz2open()
256 bz_file = BZ2_bzdopen(fd, mode); in _php_stream_bz2open()
263 if (opened_path && !bz_file && mode[0] == 'w') { in _php_stream_bz2open()
269 retstream = _php_stream_bz2open_from_BZFILE(bz_file, mode, stream STREAMS_REL_CC TSRMLS_CC); in _php_stream_bz2open()
370 char *mode; /* The mode to open the stream with */ in PHP_FUNCTION() local
376 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zs", &file, &mode, &mode_len) == FAILURE) { in PHP_FUNCTION()
380 if (mode_len != 1 || (mode[0] != 'r' && mode[0] != 'w')) { in PHP_FUNCTION()
381 …MLS_CC, E_WARNING, "'%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.", mode); in PHP_FUNCTION()
398 mode, in PHP_FUNCTION()
407 stream_mode_len = strlen(stream->mode); in PHP_FUNCTION()
409 if (stream_mode_len != 1 && !(stream_mode_len == 2 && memchr(stream->mode, 'b', 2))) { in PHP_FUNCTION()
410 …php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot use stream opened in mode '%s'", stream->mode); in PHP_FUNCTION()
412 …f (stream_mode_len == 1 && stream->mode[0] != 'r' && stream->mode[0] != 'w' && stream->mode[0] != … in PHP_FUNCTION()
413 …php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot use stream opened in mode '%s'", stream->mode); in PHP_FUNCTION()
417 switch(mode[0]) { in PHP_FUNCTION()
420 if (stream->mode[0] != mode[0] && !(stream_mode_len == 2 && stream->mode[1] != mode[0])) { in PHP_FUNCTION()
427 if (stream->mode[0] != mode[0] && !(stream_mode_len == 2 && stream->mode[1] != mode[0]) in PHP_FUNCTION()
428 && stream->mode[0] != 'a' && !(stream_mode_len == 2 && stream->mode[1] != 'a') in PHP_FUNCTION()
429 && stream->mode[0] != 'x' && !(stream_mode_len == 2 && stream->mode[1] != 'x')) { in PHP_FUNCTION()
443 bz = BZ2_bzdopen(fd, mode); in PHP_FUNCTION()
445 stream = php_stream_bz2open_from_BZFILE(bz, mode, stream); in PHP_FUNCTION()