[PHP-CVS] cvs: php-src /ext/oci8/tests field_funcs.phpt field_funcs2.phpt field_funcs_old.phpt

2007-07-06 Thread Christopher Jones
sixdFri Jul  6 23:31:36 2007 UTC

  Modified files:  
/php-src/ext/oci8/tests field_funcs2.phpt field_funcs_old.phpt 
field_funcs.phpt 
  Log:
  Bug #41917: New OCI8 tests for scale and precision
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/field_funcs2.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/oci8/tests/field_funcs2.phpt
diff -u /dev/null php-src/ext/oci8/tests/field_funcs2.phpt:1.2
--- /dev/null   Fri Jul  6 23:31:36 2007
+++ php-src/ext/oci8/tests/field_funcs2.phptFri Jul  6 23:31:36 2007
@@ -0,0 +1,70 @@
+--TEST--
+Bug #41917 (invalid scale and precision)
+--SKIPIF--
+
+--FILE--
+ "NUMBER",
+  "C02" => "NUMBER(*,1)",
+  "C03" => "NUMBER(9)",
+  "C04" => "NUMBER(9,2)",
+  "C05" => "NUMBER(9,1)",
+  "C06" => "NUMBER(7,-2)",
+  "C07" => "DECIMAL(4,9)",
+  "C08" => "NUMERIC(4,9)",
+  "C09" => "DECIMAL(4)",
+  "C10" => "INTEGER",
+  "C11" => "INT",
+  "C12" => "SMALLINT",
+  "C13" => "FLOAT",
+  "C14" => "FLOAT(9)",
+  "C15" => "DOUBLE PRECISION",
+  "C16" => "REAL",
+  );
+
+$stmt = "create table b41917t (\n";
+foreach ($t as $colname => $type) {
+   $stmt .= "$colname $type,\n";
+}
+$stmt[strlen($stmt)-2] = ")";
+
+$s = oci_parse($c, $stmt);
+oci_execute($s);
+
+$s = oci_parse($c, "select * from b41917t");
+oci_execute($s);
+
+for ($i = 1; $i <= oci_num_fields($s); $i++) {
+   $name = oci_field_name($s, $i);
+   $precision = oci_field_precision($s, $i);
+   $scale = oci_field_scale($s, $i);
+   echo "$name ".$t[$name] .": precision $precision, scale $scale\n";
+}
+
+echo "Done\n";
+?>
+--EXPECT--
+C01 NUMBER: precision 0, scale -127
+C02 NUMBER(*,1): precision 38, scale 1
+C03 NUMBER(9): precision 9, scale 0
+C04 NUMBER(9,2): precision 9, scale 2
+C05 NUMBER(9,1): precision 9, scale 1
+C06 NUMBER(7,-2): precision 7, scale -2
+C07 DECIMAL(4,9): precision 4, scale 9
+C08 NUMERIC(4,9): precision 4, scale 9
+C09 DECIMAL(4): precision 4, scale 0
+C10 INTEGER: precision 38, scale 0
+C11 INT: precision 38, scale 0
+C12 SMALLINT: precision 38, scale 0
+C13 FLOAT: precision 126, scale -127
+C14 FLOAT(9): precision 9, scale -127
+C15 DOUBLE PRECISION: precision 126, scale -127
+C16 REAL: precision 63, scale -127
+Done
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/field_funcs_old.phpt?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/oci8/tests/field_funcs_old.phpt
diff -u php-src/ext/oci8/tests/field_funcs_old.phpt:1.6 
php-src/ext/oci8/tests/field_funcs_old.phpt:1.7
--- php-src/ext/oci8/tests/field_funcs_old.phpt:1.6 Fri Nov 10 16:56:19 2006
+++ php-src/ext/oci8/tests/field_funcs_old.phpt Fri Jul  6 23:31:36 2007
@@ -54,7 +54,7 @@
 echo "Done\n";
 
 ?>
---EXPECTF--
+--EXPECT--
 array(5) {
   [0]=>
   string(1) "1"
@@ -71,14 +71,14 @@
 string(2) "ID"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(false)
 string(5) "VALUE"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(true)
@@ -103,7 +103,7 @@
 int(0)
 int(10)
 Done
---UEXPECTF--
+--UEXPECT--
 array(5) {
   [0]=>
   unicode(1) "1"
@@ -120,14 +120,14 @@
 unicode(2) "ID"
 unicode(6) "NUMBER"
 int(2)
-int(0)
+int(-127)
 int(0)
 int(22)
 bool(false)
 unicode(5) "VALUE"
 unicode(6) "NUMBER"
 int(2)
-int(0)
+int(-127)
 int(0)
 int(22)
 bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/field_funcs.phpt?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/oci8/tests/field_funcs.phpt
diff -u php-src/ext/oci8/tests/field_funcs.phpt:1.7 
php-src/ext/oci8/tests/field_funcs.phpt:1.8
--- php-src/ext/oci8/tests/field_funcs.phpt:1.7 Fri Nov 10 16:56:19 2006
+++ php-src/ext/oci8/tests/field_funcs.phpt Fri Jul  6 23:31:36 2007
@@ -54,7 +54,7 @@
 echo "Done\n";
 
 ?>
---EXPECTF--
+--EXPECT--
 array(5) {
   [0]=>
   string(1) "1"
@@ -71,14 +71,14 @@
 string(2) "ID"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(false)
 string(5) "VALUE"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(true)
@@ -103,7 +103,7 @@
 int(0)
 int(10)
 Done
---UEXPECTF--
+--UEXPECT--
 array(5) {
   [0]=>
   unicode(1) "1"
@@ -120,14 +120,14 @@
 unicode(2) "ID"
 unicode(6) "NUMBER"
 int(2)
-int(0)
+int(-127)
 int(0)
 int(22)
 bool(false)
 unicode(5) "VALUE"
 unicode(6) "NUMBER"
 int(2)
-int(0)
+int(-127)
 int(0)
 int(22)
 bool(true)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8/tests field_funcs.phpt field_funcs2.phpt field_funcs_old.phpt

2007-07-06 Thread Christopher Jones
sixdFri Jul  6 23:29:44 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/oci8/tests field_funcs2.phpt 

  Modified files:  
/php-src/ext/oci8/tests field_funcs_old.phpt field_funcs.phpt 
  Log:
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/field_funcs_old.phpt?r1=1.1.2.4.2.1&r2=1.1.2.4.2.2&diff_format=u
Index: php-src/ext/oci8/tests/field_funcs_old.phpt
diff -u php-src/ext/oci8/tests/field_funcs_old.phpt:1.1.2.4.2.1 
php-src/ext/oci8/tests/field_funcs_old.phpt:1.1.2.4.2.2
--- php-src/ext/oci8/tests/field_funcs_old.phpt:1.1.2.4.2.1 Tue May 30 
22:34:16 2006
+++ php-src/ext/oci8/tests/field_funcs_old.phpt Fri Jul  6 23:29:44 2007
@@ -54,7 +54,7 @@
 echo "Done\n";
 
 ?>
---EXPECTF--
+--EXPECT--
 array(5) {
   [0]=>
   string(1) "1"
@@ -71,14 +71,14 @@
 string(2) "ID"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(false)
 string(5) "VALUE"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/field_funcs.phpt?r1=1.1.2.4.2.2&r2=1.1.2.4.2.3&diff_format=u
Index: php-src/ext/oci8/tests/field_funcs.phpt
diff -u php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4.2.2 
php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4.2.3
--- php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4.2.2 Tue May 30 22:34:16 2006
+++ php-src/ext/oci8/tests/field_funcs.phpt Fri Jul  6 23:29:44 2007
@@ -54,7 +54,7 @@
 echo "Done\n";
 
 ?>
---EXPECTF--
+--EXPECT--
 array(5) {
   [0]=>
   string(1) "1"
@@ -71,14 +71,14 @@
 string(2) "ID"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(false)
 string(5) "VALUE"
 string(6) "NUMBER"
 int(2)
-int(%d)
+int(-127)
 int(0)
 int(22)
 bool(true)

http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/field_funcs2.phpt?view=markup&rev=1.1
Index: php-src/ext/oci8/tests/field_funcs2.phpt
+++ php-src/ext/oci8/tests/field_funcs2.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c php_pcre.h /ext/pcre/tests bug27103.phpt bug40909.phpt invalid_utf8.phpt /ext/spl spl_iterators.c /win32 sendmail.c

2007-07-06 Thread Dmitry Stogov
dmitry  Fri Jul  6 23:06:51 2007 UTC

  Modified files:  
/php-src/ext/pcre   php_pcre.c php_pcre.h 
/php-src/ext/pcre/tests bug27103.phpt bug40909.phpt 
invalid_utf8.phpt 
/php-src/ext/splspl_iterators.c 
/php-src/win32  sendmail.c 
  Log:
  PCRE unicode/binary support
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.213&r2=1.214&diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.213 php-src/ext/pcre/php_pcre.c:1.214
--- php-src/ext/pcre/php_pcre.c:1.213   Tue Jun 12 14:07:42 2007
+++ php-src/ext/pcre/php_pcre.c Fri Jul  6 23:06:51 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.213 2007/06/12 14:07:42 scottmac Exp $ */
+/* $Id: php_pcre.c,v 1.214 2007/07/06 23:06:51 dmitry Exp $ */
 
 /*  TODO
  *  php_pcre_replace_impl():
@@ -191,7 +191,7 @@
 
 /* {{{ pcre_get_compiled_regex_cache
  */
-PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int 
regex_len TSRMLS_DC)
+PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_uchar utype, char 
*regex, int regex_len TSRMLS_DC)
 {
pcre*re = NULL;
pcre_extra  *extra;
@@ -333,7 +333,7 @@
}
}
 
-   if (UG(unicode)) {
+   if (utype == IS_UNICODE) {
coptions |= PCRE_UTF8;
}
 
@@ -405,7 +405,7 @@
  */
 PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int 
*preg_options TSRMLS_DC)
 {
-   pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex, 
strlen(regex) TSRMLS_CC);
+   pcre_cache_entry * pce = pcre_get_compiled_regex_cache(ZEND_STR_TYPE, 
regex, strlen(regex) TSRMLS_CC);
 
if (extra) {
*extra = pce ? pce->extra : NULL;
@@ -422,7 +422,7 @@
  */
 PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int 
*preg_options, int *compile_options TSRMLS_DC)
 {
-   pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex, 
strlen(regex) TSRMLS_CC);
+   pcre_cache_entry * pce = pcre_get_compiled_regex_cache(ZEND_STR_TYPE, 
regex, strlen(regex) TSRMLS_CC);

if (extra) {
*extra = pce ? pce->extra : NULL;
@@ -439,7 +439,7 @@
 /* }}} */
 
 /* {{{ add_offset_pair */
-static inline void add_offset_pair(zval *result, char *str, int len, int 
offset, char *name, offset_map_t *prev TSRMLS_DC)
+static inline void add_offset_pair(zval *result, zend_uchar utype, char *str, 
int len, int offset, char *name, offset_map_t *prev TSRMLS_DC)
 {
zval *match_pair;
int tmp;
@@ -449,16 +449,25 @@
INIT_PZVAL(match_pair);
 
/* Add (match, offset) to the return value */
-   add_next_index_utf8_stringl(match_pair, str, len, 1);
+   if (utype == IS_UNICODE) {
+   add_next_index_utf8_stringl(match_pair, str, len, 1);
+   } else {
+   add_next_index_stringl(match_pair, str, len, 1);
+   }
 
/* Calculate codepoint offset from the previous chunk */
if (offset) {
-   tmp = prev->byte_offset;
-   while (tmp < offset) {
-   U8_FWD_1(prev->str, tmp, offset);
-   prev->cp_offset++;
-   }
-   prev->byte_offset = tmp;
+   if (utype == IS_UNICODE) {
+   tmp = prev->byte_offset;
+   while (tmp < offset) {
+   U8_FWD_1(prev->str, tmp, offset);
+   prev->cp_offset++;
+   }
+   prev->byte_offset = tmp;
+   } else {
+   prev->cp_offset = offset;
+   prev->byte_offset = offset;
+   }   
}
add_next_index_long(match_pair, prev->cp_offset);

@@ -511,7 +520,7 @@
}

/* Compile regex or get it from cache. */
-   if ((pce = pcre_get_compiled_regex_cache(regex.s, regex_len TSRMLS_CC)) 
== NULL) {
+   if ((pce = pcre_get_compiled_regex_cache(str_type, regex.s, regex_len 
TSRMLS_CC)) == NULL) {
if (str_type == IS_UNICODE) {
efree(regex_utf8);
efree(subject_utf8);
@@ -519,7 +528,7 @@
RETURN_FALSE;
}
 
-   php_pcre_match_impl(pce, subject.s, subject_len, return_value, subpats, 
+   php_pcre_match_impl(pce, str_type, subject.s, subject_len, 
return_value, subpats, 
global, ZEND_NUM_ARGS() >= 4, flags, start_offset TSRMLS_CC);
 
if (str_type == IS_UNICODE) {
@@ -530,7 +539,7 @@
 /* }}} */
 
 /* {{{ php_pcre_match_impl */
-PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int 
subject_len, zval *return_value,
+PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, zend_uchar uty

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file is_executable_variation1.phpt is_executable_variation2.phpt is_executable_variation3.phpt is_readable_variation1.phpt is_readable_variation2.ph

2007-07-06 Thread Raghubansh Kumar
kraghubaFri Jul  6 18:30:46 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileis_writable_variation1.phpt 
is_readable_variation1.phpt 
is_writable_variation2.phpt 
is_readable_variation2.phpt 
is_writable_variation3.phpt 
is_readable_variation3.phpt 
is_executable_variation1.phpt 
is_executable_variation2.phpt 
is_executable_variation3.phpt 
  Log:
  Fix and smaller testcases for is_readable_variation.phpt, 
is_executable_variation.phpt & is_writable_variation.phpt
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/is_writable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_writable_variation1.phpt
--TEST--
Test is_writable() and its alias is_writeable() function: usage variations - 
diff. path notations
--SKIPIF--

--FILE--

--CLEAN--

--EXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done
--UEXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_readable_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/is_readable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_readable_variation1.phpt
--TEST--
Test is_readable() function: usage variations - diff. file notations
--SKIPIF--

--FILE--

--CLEAN--

--EXPECTF--
*** Testing is_readable(): usage variations ***
-- Iteration 1 --
bool(true)
-- Iteration 2 --
bool(%s)
-- Iteration 3 --
bool(true)
-- Iteration 4 --
bool(true)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
bool(true)
-- Iteration 8 --
bool(true)
-- Iteration 9 --
bool(true)
-- Iteration 10 --
bool(true)
-- Iteration 11 --
bool(true)
Done
--UEXPECTF--
*** Testing is_readable(): usage variations ***
-- Iteration 1 --
bool(true)
-- Iteration 2 --
bool(%s)
-- Iteration 3 --
bool(true)
-- Iteration 4 --
bool(true)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
bool(true)
-- Iteration 8 --
bool(true)
-- Iteration 9 --
bool(true)
-- Iteration 10 --
bool(true)
-- Iteration 11 --
bool(true)
Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/is_writable_variation2.phpt
+++ php-src/ext/standard/tests/file/is_writable_variation2.phpt
--TEST--
Test is_writable() and its alias is_writeable() function: usage variations - 
file/dir with diff. perms
--SKIPIF--

--FILE--

--CLEAN--

--EXPECTF--
*** Testing is_writable(): usage variations ***

*** Testing is_writable() on directory without write permission ***
bool(false)
bool(false)

*** Testing miscelleneous input for is_writable() function ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(true)
bool(true)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(false)
bool(false)
-- Iteration 5 --
bool(true)
bool(true)
-- Iteration 6 --
bool(true)
bool(true)
-- Iteration 7 --
bool(false)
bool(false)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(false)
bool(false)
-- Iteration 10 --
bool(false)
bool(false)
Done
--UEXPECTF--
*** Testing is_writable(): usage variations ***

*** Testing is_writable() on directory without write permission ***
bool(false)
bool(false)

*** Testing miscelleneous input for is_writable() function ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(true)
bool(true)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(false)
bool(false)
-- Iteration 5 --
bool(true)
bool(true)
-- Iteration 6 --
bool(true)
bool(true)
-- Iteration 7 --
bool(false)
bool(false)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(false)
bool(false)
-- Iteration 10

[PHP-CVS] cvs: php-src /ext/standard/tests/file is_executable_variation1.phpt is_executable_variation2.phpt is_executable_variation3.phpt is_readable_variation1.phpt is_readable_variation2.phpt is_rea

2007-07-06 Thread Raghubansh Kumar
kraghubaFri Jul  6 18:28:33 2007 UTC

  Added files: 
/php-src/ext/standard/tests/fileis_writable_variation1.phpt 
is_readable_variation1.phpt 
is_writable_variation2.phpt 
is_readable_variation2.phpt 
is_writable_variation3.phpt 
is_readable_variation3.phpt 
is_executable_variation1.phpt 
is_executable_variation2.phpt 
is_executable_variation3.phpt 
  Log:
  Fix and smaller testcases for is_executable_variation.phpt, 
is_readable_variation.phpt & is_writable_variation.phpt
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/is_writable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_writable_variation1.phpt
--TEST--
Test is_writable() and its alias is_writeable() function: usage variations - 
diff. path notations
--SKIPIF--

--FILE--

--CLEAN--

--EXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done
--UEXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_readable_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/is_readable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_readable_variation1.phpt
--TEST--
Test is_readable() function: usage variations - diff. file notations
--SKIPIF--

--FILE--

--CLEAN--

--EXPECTF--
*** Testing is_readable(): usage variations ***
-- Iteration 1 --
bool(true)
-- Iteration 2 --
bool(%s)
-- Iteration 3 --
bool(true)
-- Iteration 4 --
bool(true)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
bool(true)
-- Iteration 8 --
bool(true)
-- Iteration 9 --
bool(true)
-- Iteration 10 --
bool(true)
-- Iteration 11 --
bool(true)
Done
--UEXPECTF--
*** Testing is_readable(): usage variations ***
-- Iteration 1 --
bool(true)
-- Iteration 2 --
bool(%s)
-- Iteration 3 --
bool(true)
-- Iteration 4 --
bool(true)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
bool(true)
-- Iteration 8 --
bool(true)
-- Iteration 9 --
bool(true)
-- Iteration 10 --
bool(true)
-- Iteration 11 --
bool(true)
Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/is_writable_variation2.phpt
+++ php-src/ext/standard/tests/file/is_writable_variation2.phpt
--TEST--
Test is_writable() and its alias is_writeable() function: usage variations - 
file/dir with diff. perms
--SKIPIF--

--FILE--

--CLEAN--

--EXPECTF--
*** Testing is_writable(): usage variations ***

*** Testing is_writable() on directory without write permission ***
bool(false)
bool(false)

*** Testing miscelleneous input for is_writable() function ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(true)
bool(true)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(false)
bool(false)
-- Iteration 5 --
bool(true)
bool(true)
-- Iteration 6 --
bool(true)
bool(true)
-- Iteration 7 --
bool(false)
bool(false)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(false)
bool(false)
-- Iteration 10 --
bool(false)
bool(false)
Done
--UEXPECTF--
*** Testing is_writable(): usage variations ***

*** Testing is_writable() on directory without write permission ***
bool(false)
bool(false)

*** Testing miscelleneous input for is_writable() function ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(true)
bool(true)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(false)
bool(false)
-- Iteration 5 --
bool(true)
bool(true)
-- Iteration 6 --
bool(true)
bool(true)
-- Iteration 7 --
bool(false)
bool(false)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(false)
bool(false)
-- Iteration 10 --
bool(false)
b

[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c

2007-07-06 Thread Antony Dovgal
tony2001Fri Jul  6 12:11:20 2007 UTC

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  fix folding
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.275&r2=1.276&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.275 
php-src/ext/reflection/php_reflection.c:1.276
--- php-src/ext/reflection/php_reflection.c:1.275   Mon May 28 10:34:37 2007
+++ php-src/ext/reflection/php_reflection.c Fri Jul  6 12:11:20 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.275 2007/05/28 10:34:37 bjori Exp $ */
+/* $Id: php_reflection.c,v 1.276 2007/07/06 12:11:20 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -196,7 +196,7 @@
 
 static zend_object_handlers reflection_object_handlers;
 
-static void _default_get_entry(zval *object, char *name, int name_len, zval 
*return_value TSRMLS_DC)
+static void _default_get_entry(zval *object, char *name, int name_len, zval 
*return_value TSRMLS_DC) /* {{{ */
 {
zval **value;
 
@@ -208,16 +208,18 @@
zval_copy_ctor(return_value);
INIT_PZVAL(return_value);
 }
+/* }}} */
 
-static void reflection_register_implement(zend_class_entry *class_entry, 
zend_class_entry *interface_entry TSRMLS_DC)
+static void reflection_register_implement(zend_class_entry *class_entry, 
zend_class_entry *interface_entry TSRMLS_DC) /* {{{ */
 {
zend_uint num_interfaces = ++class_entry->num_interfaces;
 
class_entry->interfaces = (zend_class_entry **) 
realloc(class_entry->interfaces, sizeof(zend_class_entry *) * num_interfaces);
class_entry->interfaces[num_interfaces - 1] = interface_entry;
 }
+/* }}} */
 
-static void reflection_free_objects_storage(void *object TSRMLS_DC)
+static void reflection_free_objects_storage(void *object TSRMLS_DC) /* {{{ */
 {
reflection_object *intern = (reflection_object *) object;
 
@@ -230,8 +232,9 @@
}
zend_objects_free_object_storage(object TSRMLS_CC);
 }
+/* }}} */
 
-static void reflection_objects_clone(void *object, void **object_clone 
TSRMLS_DC)
+static void reflection_objects_clone(void *object, void **object_clone 
TSRMLS_DC) /* {{{ */
 {
reflection_object *intern = (reflection_object *) object;
reflection_object **intern_clone = (reflection_object **) object_clone;
@@ -245,8 +248,9 @@
zval_add_ref(&intern->obj);
}
 }
+/* }}} */
 
-static zend_object_value reflection_objects_new(zend_class_entry *class_type 
TSRMLS_DC)
+static zend_object_value reflection_objects_new(zend_class_entry *class_type 
TSRMLS_DC) /* {{{ */
 {
zval tmp;
zend_object_value retval;
@@ -263,8 +267,9 @@
retval.handlers = &reflection_object_handlers;
return retval;
 }
+/* }}} */
 
-static zval * reflection_instantiate(zend_class_entry *pce, zval *object 
TSRMLS_DC)
+static zval * reflection_instantiate(zend_class_entry *pce, zval *object 
TSRMLS_DC) /* {{{ */
 {
if (!object) {
ALLOC_ZVAL(object);
@@ -275,6 +280,7 @@
object->is_ref = 1;
return object;
 }
+/* }}} */
 
 static void _const_string(string *str, zstr name, zval *value, char *indent 
TSRMLS_DC);
 static void _function_string(string *str, zend_function *fptr, 
zend_class_entry *scope, char *indent TSRMLS_DC);
@@ -836,7 +842,7 @@
 }
 /* }}} */
 
-static int _extension_ini_string(zend_ini_entry *ini_entry, int num_args, 
va_list args, zend_hash_key *hash_key)
+static int _extension_ini_string(zend_ini_entry *ini_entry, int num_args, 
va_list args, zend_hash_key *hash_key) /* {{{ */
 {
string *str = va_arg(args, string *);
char *indent = va_arg(args, char *);
@@ -870,8 +876,9 @@
}
return ZEND_HASH_APPLY_KEEP;
 }
+/* }}} */
 
-static int _extension_class_string(zend_class_entry **pce, int num_args, 
va_list args, zend_hash_key *hash_key)
+static int _extension_class_string(zend_class_entry **pce, int num_args, 
va_list args, zend_hash_key *hash_key) /* {{{ */
 {
string *str = va_arg(args, string *);
char *indent = va_arg(args, char *);
@@ -886,8 +893,9 @@
}
return ZEND_HASH_APPLY_KEEP;
 }
+/* }}} */
 
-static int _extension_const_string(zend_constant *constant, int num_args, 
va_list args, zend_hash_key *hash_key)
+static int _extension_const_string(zend_constant *constant, int num_args, 
va_list args, zend_hash_key *hash_key) /* {{{ */
 {
string *str = va_arg(args, string *);
char *indent = va_arg(args, char *);
@@ -901,6 +909,7 @@
}
return ZEND_HASH_APPLY_KEEP;
 }
+/* }}} */
 
 /* {{{ _extension_string */
 static void _extension_string(string *str, zend_module_entry *module, char 
*indent TSRMLS_DC)
@@ -3944,7 +3953,7 @@
 }
 /* }}} */
 
-static void _property_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask)
+static 

[PHP-CVS] cvs: php-src / configure.in

2007-07-06 Thread Antony Dovgal
tony2001Fri Jul  6 10:58:37 2007 UTC

  Modified files:  
/php-srcconfigure.in 
  Log:
  fix #41908 (CFLAGS="-Os" ./configure --enable-debug fails)
  patch by christian at hoffie dot info
  
  
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.631&r2=1.632&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.631 php-src/configure.in:1.632
--- php-src/configure.in:1.631  Tue Jul  3 17:24:36 2007
+++ php-src/configure.inFri Jul  6 10:58:36 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.631 2007/07/03 17:24:36 sniper Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.632 2007/07/06 10:58:36 tony2001 Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -675,8 +675,8 @@
 
   dnl Remove all optimization flags from CFLAGS
   changequote({,})
-  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
-  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9]*//g'`
+  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
+  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
   changequote([,])
 
   dnl Add the special gcc flags
@@ -691,8 +691,8 @@
   PHP_DEBUG=1
   ZEND_DEBUG=yes
   changequote({,})
-  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
-  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9]*//g'`
+  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
+  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
   changequote([,])
   dnl add -O0 only if GCC or ICC is used
   if test "$GCC" = "yes" || test "$ICC" = "yes"; then

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS configure.in

2007-07-06 Thread Antony Dovgal
tony2001Fri Jul  6 10:44:24 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS configure.in 
  Log:
  MFH: fix #41908 (CFLAGS="-Os" ./configure --enable-debug fails)
  patch by christian at hoffie dot info
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.818&r2=1.2027.2.547.2.819&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.818 php-src/NEWS:1.2027.2.547.2.819
--- php-src/NEWS:1.2027.2.547.2.818 Thu Jul  5 20:54:59 2007
+++ php-src/NEWSFri Jul  6 10:44:23 2007
@@ -48,6 +48,8 @@
 - Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory 
   already exists). (Pierre)
 
+- Fixed bug #41908 (CFLAGS="-Os" ./configure --enable-debug fails). 
+  (christian at hoffie dot info, Tony) 
 - Fixed bug #41909 (var_export() is locale sensitive when exporting float
   values). (Derick)
 - Fixed bug #41867 (getName is broken). (Rob)
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.61&r2=1.579.2.52.2.62&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.61 
php-src/configure.in:1.579.2.52.2.62
--- php-src/configure.in:1.579.2.52.2.61Tue Jul  3 17:25:33 2007
+++ php-src/configure.inFri Jul  6 10:44:23 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.52.2.61 2007/07/03 17:25:33 sniper Exp $ -*- 
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.52.2.62 2007/07/06 10:44:23 tony2001 Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -678,8 +678,8 @@
 
   dnl Remove all optimization flags from CFLAGS
   changequote({,})
-  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
-  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9]*//g'`
+  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
+  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
   changequote([,])
 
   dnl Add the special gcc flags
@@ -694,8 +694,8 @@
   PHP_DEBUG=1
   ZEND_DEBUG=yes
   changequote({,})
-  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
-  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9]*//g'`
+  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
+  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
   changequote([,])
   dnl add -O0 only if GCC or ICC is used
   if test "$GCC" = "yes" || test "$ICC" = "yes"; then

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/soap soap.c

2007-07-06 Thread Dmitry Stogov
dmitry  Fri Jul  6 10:36:20 2007 UTC

  Modified files:  
/php-src/ext/soap   soap.c 
  Log:
  Unicode support fix
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.223&r2=1.224&diff_format=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.223 php-src/ext/soap/soap.c:1.224
--- php-src/ext/soap/soap.c:1.223   Fri Jun 29 13:58:34 2007
+++ php-src/ext/soap/soap.c Fri Jul  6 10:36:20 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: soap.c,v 1.223 2007/06/29 13:58:34 dmitry Exp $ */
+/* $Id: soap.c,v 1.224 2007/07/06 10:36:20 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -3550,7 +3550,7 @@
add_property_zval(obj, "faultcodens", tmp);
} else {
if (soap_version == SOAP_1_1) {
-   add_property_string(obj, "faultcode", 
fault_code, 1);
+   add_property_ascii_string(obj, "faultcode", 
fault_code, 1);
if (strcmp(fault_code,"Client") == 0 ||
strcmp(fault_code,"Server") == 0 ||
strcmp(fault_code,"VersionMismatch") == 0 ||

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php