dsp Fri Oct 5 09:37:17 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/spl spl_directory.c Log: WS/Indent fix http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.2&r2=1.45.2.27.2.23.2.3&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.2 php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.3 --- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.2 Wed Oct 3 10:44:32 2007 +++ php-src/ext/spl/spl_directory.c Fri Oct 5 09:37:17 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.2 2007/10/03 10:44:32 dsp Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.3 2007/10/05 09:37:17 dsp Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -323,8 +323,7 @@ if (!file_path || !file_path_len) { #if defined(PHP_WIN32) zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot create SplFileInfo for empty path"); - if (file_path && !use_copy) - { + if (file_path && !use_copy) { efree(file_path); } return NULL; @@ -1955,29 +1954,29 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sss", &delim, &d_len, &enclo, &e_len, &esc, &esc_len) == SUCCESS) { switch(ZEND_NUM_ARGS()) { - case 3: - if (esc_len != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "escape must be a character"); - RETURN_FALSE; - } - escape = esc[0]; - /* no break */ - case 2: - if (e_len != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "enclosure must be a character"); - RETURN_FALSE; - } - enclosure = enclo[0]; - /* no break */ - case 1: - if (d_len != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "delimiter must be a character"); - RETURN_FALSE; - } - delimiter = delim[0]; - /* no break */ - case 0: - break; + case 3: + if (esc_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "escape must be a character"); + RETURN_FALSE; + } + escape = esc[0]; + /* no break */ + case 2: + if (e_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "enclosure must be a character"); + RETURN_FALSE; + } + enclosure = enclo[0]; + /* no break */ + case 1: + if (d_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "delimiter must be a character"); + RETURN_FALSE; + } + delimiter = delim[0]; + /* no break */ + case 0: + break; } spl_filesystem_file_read_csv(intern, delimiter, enclosure, escape, return_value TSRMLS_CC); } @@ -1996,29 +1995,29 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sss", &delim, &d_len, &enclo, &e_len, &esc, &esc_len) == SUCCESS) { switch(ZEND_NUM_ARGS()) { - case 3: - if (esc_len != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "escape must be a character"); - RETURN_FALSE; - } - escape = esc[0]; - /* no break */ - case 2: - if (e_len != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "enclosure must be a character"); - RETURN_FALSE; - } - enclosure = enclo[0]; - /* no break */ - case 1: - if (d_len != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "delimiter must be a character"); - RETURN_FALSE; - } - delimiter = delim[0]; - /* no break */ - case 0: - break; + case 3: + if (esc_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "escape must be a character"); + RETURN_FALSE; + } + escape = esc[0]; + /* no break */ + case 2: + if (e_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "enclosure must be a character"); + RETURN_FALSE; + } + enclosure = enclo[0]; + /* no break */ + case 1: + if (d_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "delimiter must be a character"); + RETURN_FALSE; + } + delimiter = delim[0]; + /* no break */ + case 0: + break; } intern->u.file.delimiter = delimiter; intern->u.file.enclosure = enclosure;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php