[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-07-10 Thread changelog
changelog   Fri Jul 11 01:32:04 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3103r2=1.3104diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3103 php-src/ChangeLog:1.3104
--- php-src/ChangeLog:1.3103Thu Jul 10 01:31:53 2008
+++ php-src/ChangeLog   Fri Jul 11 01:32:03 2008
@@ -1,3 +1,100 @@
+2008-07-10  David Soria Parra  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/standard/tests/strings/strnatcasecmp_basic.phpt
+  ext/standard/tests/strings/strnatcasecmp_variation1.phpt:
+  PHP Testfest. Tests done by Felix De Vliegher
+
+* ext/standard/tests/strings/strnatcasecmp_basic.phpt
+  ext/standard/tests/strings/strnatcasecmp_basic.phpt
+  ext/standard/tests/strings/strnatcasecmp_variation1.phpt
+  ext/standard/tests/strings/strnatcasecmp_variation1.phpt:
+  
+  PHP Testfest. Tests done by Felix De Vliegher
+
+2008-07-10  Stanislav Malyshev  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/intl/php_intl.c
+  ext/intl/dateformat/dateformat_class.c
+  ext/intl/dateformat/dateformat_parse.c
+  ext/intl/tests/dateformat_localtime.phpt
+  ext/intl/tests/dateformat_parse.phpt
+  ext/intl/tests/ut_common.inc:
+  fix date formatter positions (bug #14263)
+
+2008-07-10  Felipe Pena  [EMAIL PROTECTED]
+
+* ext/imap/php_imap.c
+  ext/imap/php_imap.c:
+  - MFB: Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo
+  doesn't accept lengths of 1024)
+
+* (PHP_5_2)
+  ext/imap/php_imap.c:
+  - Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo
+  doesn't accept lengths of 1024)
+
+2008-07-10  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/phar/func_interceptors.c
+  ext/phar/stream.c
+  ext/phar/util.c:
+  Fixed wrong refcount updates
+
+* ext/phar/tests/rename_dir.phpt
+  ext/phar/tests/rename_dir.phpt
+  ext/phar/tests/rmdir.phpt
+  ext/phar/tests/rmdir.phpt
+  ext/phar/tests/tar/rename_dir.phpt
+  ext/phar/tests/tar/rename_dir.phpt
+  ext/phar/tests/tar/rmdir.phpt
+  ext/phar/tests/tar/rmdir.phpt
+  ext/phar/tests/zip/rename_dir.phpt
+  ext/phar/tests/zip/rename_dir.phpt
+  ext/phar/tests/zip/rmdir.phpt
+  ext/phar/tests/zip/rmdir.phpt:
+  
+  file rename_dir.phpt was initially added on branch PHP_5_3.
+
+2008-07-10  Etienne Kneuss  [EMAIL PROTECTED]
+
+* ext/spl/spl_sxe.c:
+  Forgot to remove the count method here
+
+2008-07-10  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/phar/func_interceptors.c
+  ext/phar/func_interceptors.h
+  ext/phar/phar.c
+  ext/phar/phar_internal.h:
+  Extensions MUST NOT manipulate with internal functions from
+  EG(function_table) in run-time. It may cause problems with opcode caches
+  and in multi-threaded environment. Now the same functions are overriden 
at
+  MINIT and call original functions or PHAR ones dependent on flag setting.
+
+* ZendEngine2/tests/closure_001.phpt
+  ZendEngine2/tests/closure_002.phpt
+  ZendEngine2/tests/closure_003.phpt
+  ZendEngine2/tests/closure_004.phpt
+  ZendEngine2/tests/closure_005.phpt
+  ZendEngine2/tests/closure_006.phpt
+  ZendEngine2/tests/closure_007.phpt
+  ZendEngine2/tests/closure_008.phpt
+  ZendEngine2/tests/closure_009.phpt
+  ZendEngine2/tests/closure_010.phpt
+  ZendEngine2/tests/closure_011.phpt
+  ZendEngine2/tests/closure_012.phpt
+  ZendEngine2/tests/closure_013.phpt
+  ZendEngine2/tests/closure_014.phpt:
+  Removed SKIPIF sections
+
+* ZendEngine2/zend_closures.c
+  ZendEngine2/tests/closure_015.phpt:
+  Fixed unicode support
+
 2008-07-09  Etienne Kneuss  [EMAIL PROTECTED]
 
 * (PHP_5_3)




[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2008-07-10 Thread changelog
changelog   Fri Jul 11 01:32:08 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1334r2=1.1335diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1334 ZendEngine2/ChangeLog:1.1335
--- ZendEngine2/ChangeLog:1.1334Thu Jul 10 01:31:56 2008
+++ ZendEngine2/ChangeLog   Fri Jul 11 01:32:08 2008
@@ -1,3 +1,25 @@
+2008-07-10  Dmitry Stogov  [EMAIL PROTECTED]
+
+* tests/closure_001.phpt
+  tests/closure_002.phpt
+  tests/closure_003.phpt
+  tests/closure_004.phpt
+  tests/closure_005.phpt
+  tests/closure_006.phpt
+  tests/closure_007.phpt
+  tests/closure_008.phpt
+  tests/closure_009.phpt
+  tests/closure_010.phpt
+  tests/closure_011.phpt
+  tests/closure_012.phpt
+  tests/closure_013.phpt
+  tests/closure_014.phpt:
+  Removed SKIPIF sections
+
+* zend_closures.c
+  tests/closure_015.phpt:
+  Fixed unicode support
+
 2008-07-09  Antony Dovgal  [EMAIL PROTECTED]
 
 * (PHP_5_3)
@@ -24560,7 +24582,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1334 2008/07/10 01:31:56 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1335 2008/07/11 01:32:08 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -26284,7 +26306,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1334 2008/07/10 01:31:56 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1335 2008/07/11 01:32:08 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 




[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar func_interceptors.c func_interceptors.h phar.c phar_internal.h

2008-07-10 Thread Dmitry Stogov
dmitry  Thu Jul 10 11:36:50 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   func_interceptors.c func_interceptors.h phar.c 
phar_internal.h 
  Log:
  Extensions MUST NOT manipulate with internal functions from 
EG(function_table) in run-time. It may cause problems with opcode caches and in 
multi-threaded environment. Now the same functions are overriden at MINIT and 
call original functions or PHAR ones dependent on flag setting.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/phar/func_interceptors.c?r1=1.20.2.7r2=1.20.2.8diff_format=u
Index: php-src/ext/phar/func_interceptors.c
diff -u php-src/ext/phar/func_interceptors.c:1.20.2.7 
php-src/ext/phar/func_interceptors.c:1.20.2.8
--- php-src/ext/phar/func_interceptors.c:1.20.2.7   Sat Jun 21 20:47:35 2008
+++ php-src/ext/phar/func_interceptors.cThu Jul 10 11:36:50 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: func_interceptors.c,v 1.20.2.7 2008/06/21 20:47:35 sfox Exp $ */
+/* $Id: func_interceptors.c,v 1.20.2.8 2008/07/10 11:36:50 dmitry Exp $ */
 
 #include phar_internal.h
 
@@ -29,6 +29,10 @@
int filename_len;
zval *zcontext = NULL;
 
+   if (!PHAR_G(intercepted)) {
+   goto skip_phar;
+   }
+
if ((PHAR_GLOBALS-phar_fname_map.arBuckets  
!zend_hash_num_elements((PHAR_GLOBALS-phar_fname_map)))
 !cached_phars.arBuckets) {
goto skip_phar;
@@ -98,6 +102,10 @@
long maxlen = PHP_STREAM_COPY_ALL;
zval *zcontext = NULL;
 
+   if (!PHAR_G(intercepted)) {
+   goto skip_phar;
+   }
+
if ((PHAR_GLOBALS-phar_fname_map.arBuckets  
!zend_hash_num_elements((PHAR_GLOBALS-phar_fname_map)))
 !cached_phars.arBuckets) {
goto skip_phar;
@@ -224,6 +232,10 @@
zval *zcontext = NULL;
php_stream *stream;
 
+   if (!PHAR_G(intercepted)) {
+   goto skip_phar;
+   }
+
if ((PHAR_GLOBALS-phar_fname_map.arBuckets  
!zend_hash_num_elements((PHAR_GLOBALS-phar_fname_map)))
 !cached_phars.arBuckets) {
goto skip_phar;
@@ -315,6 +327,10 @@
zval *zcontext = NULL;
php_stream *stream;
 
+   if (!PHAR_G(intercepted)) {
+   goto skip_phar;
+   }
+
if ((PHAR_GLOBALS-phar_fname_map.arBuckets  
!zend_hash_num_elements((PHAR_GLOBALS-phar_fname_map)))
 !cached_phars.arBuckets) {
/* no need to check, include_path not even specified in fopen/ 
no active phars */
@@ -792,14 +808,18 @@
 
 #define PharFileFunction(fname, funcnum, orig) \
 void fname(INTERNAL_FUNCTION_PARAMETERS) { \
-   char *filename; \
-   int filename_len; \
-   \
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, 
filename_len) == FAILURE) { \
-   return; \
+   if (!PHAR_G(intercepted)) { \
+   PHAR_G(orig)(INTERNAL_FUNCTION_PARAM_PASSTHRU); \
+   } else { \
+   char *filename; \
+   int filename_len; \
+   \
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, 
filename, filename_len) == FAILURE) { \
+   return; \
+   } \
+   \
+   phar_file_stat(filename, (php_stat_len) filename_len, funcnum, 
PHAR_G(orig), INTERNAL_FUNCTION_PARAM_PASSTHRU); \
} \
-   \
-   phar_file_stat(filename, (php_stat_len) filename_len, funcnum, 
PHAR_G(orig), INTERNAL_FUNCTION_PARAM_PASSTHRU); \
 }
 /* }}} */
 
@@ -878,6 +898,10 @@
char *filename;
int filename_len;
 
+   if (!PHAR_G(intercepted)) {
+   goto skip_phar;
+   }
+
if ((PHAR_GLOBALS-phar_fname_map.arBuckets  
!zend_hash_num_elements((PHAR_GLOBALS-phar_fname_map)))
 !cached_phars.arBuckets) {
goto skip_phar;
@@ -939,6 +963,10 @@
char *filename;
int filename_len;
 
+   if (!PHAR_G(intercepted)) {
+   goto skip_phar;
+   }
+
if ((PHAR_GLOBALS-phar_fname_map.arBuckets  
!zend_hash_num_elements((PHAR_GLOBALS-phar_fname_map)))
 !cached_phars.arBuckets) {
goto skip_phar;
@@ -1006,6 +1034,26 @@
 /* }}} */
 
 /* {{{ void phar_intercept_functions(TSRMLS_D) */
+void phar_intercept_functions(TSRMLS_D)
+{
+   zend_function *orig;
+
+   if (!PHAR_G(request_init)) {
+   PHAR_G(cwd) = NULL;
+   PHAR_G(cwd_len) = 0;
+   }
+   PHAR_G(intercepted) = 1;
+}
+/* }}} */
+
+/* {{{ void phar_release_functions(TSRMLS_D) */
+void phar_release_functions(TSRMLS_D)
+{
+   PHAR_G(intercepted) = 0;
+}
+/* }}} */
+
+/* {{{ void phar_intercept_functions_init(TSRMLS_D) */
 #define PHAR_INTERCEPT(func) \
PHAR_G(orig_##func) = NULL; \
if (SUCCESS == zend_hash_find(CG(function_table), #func, 

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

2008-07-10 Thread Etienne Kneuss
colder  Thu Jul 10 13:16:01 2008 UTC

  Modified files:  
/php-src/ext/splspl_sxe.c 
  Log:
  Forgot to remove the count method here
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_sxe.c?r1=1.22r2=1.23diff_format=u
Index: php-src/ext/spl/spl_sxe.c
diff -u php-src/ext/spl/spl_sxe.c:1.22 php-src/ext/spl/spl_sxe.c:1.23
--- php-src/ext/spl/spl_sxe.c:1.22  Mon Dec 31 07:12:15 2007
+++ php-src/ext/spl/spl_sxe.c   Thu Jul 10 13:16:01 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_sxe.c,v 1.22 2007/12/31 07:12:15 sebastian Exp $ */
+/* $Id: spl_sxe.c,v 1.23 2008/07/10 13:16:01 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -145,17 +145,6 @@
RETURN_ZVAL(sxe-iter.data, 1, 0);
 }
 
-/* {{{ proto int SimpleXMLIterator::count() U
- Get number of child elements */
-SPL_METHOD(SimpleXMLIterator, count)
-{
-   long count = 0;
-
-   Z_OBJ_HANDLER_P(getThis(), count_elements)(getThis(), count TSRMLS_CC);
-   
-   RETURN_LONG(count);
-}
-
 static const zend_function_entry spl_funcs_SimpleXMLIterator[] = {
SPL_ME(SimpleXMLIterator, rewind, NULL, ZEND_ACC_PUBLIC)
SPL_ME(SimpleXMLIterator, valid,  NULL, ZEND_ACC_PUBLIC)
@@ -164,7 +153,6 @@
SPL_ME(SimpleXMLIterator, next,   NULL, ZEND_ACC_PUBLIC)
SPL_ME(SimpleXMLIterator, hasChildren,NULL, ZEND_ACC_PUBLIC)
SPL_ME(SimpleXMLIterator, getChildren,NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(SimpleXMLIterator, count,  NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 /* }}} */



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests rename_dir.phpt rmdir.phpt /ext/phar/tests/tar rename_dir.phpt rmdir.phpt /ext/phar/tests/zip rename_dir.phpt rmdir.phpt

2008-07-10 Thread Dmitry Stogov
dmitry  Thu Jul 10 14:27:21 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/phar/tests rename_dir.phpt rmdir.phpt 
/php-src/ext/phar/tests/tar rename_dir.phpt rmdir.phpt 
/php-src/ext/phar/tests/zip rename_dir.phpt rmdir.phpt 
  Log:
  Added tests that demonstrate serious PHAR errors
  They cannot be easly fixed without algorithms modification
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/rename_dir.phpt?view=markuprev=1.1
Index: php-src/ext/phar/tests/rename_dir.phpt
+++ php-src/ext/phar/tests/rename_dir.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/rmdir.phpt?view=markuprev=1.1
Index: php-src/ext/phar/tests/rmdir.phpt
+++ php-src/ext/phar/tests/rmdir.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/rename_dir.phpt?view=markuprev=1.1
Index: php-src/ext/phar/tests/tar/rename_dir.phpt
+++ php-src/ext/phar/tests/tar/rename_dir.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/rmdir.phpt?view=markuprev=1.1
Index: php-src/ext/phar/tests/tar/rmdir.phpt
+++ php-src/ext/phar/tests/tar/rmdir.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/zip/rename_dir.phpt?view=markuprev=1.1
Index: php-src/ext/phar/tests/zip/rename_dir.phpt
+++ php-src/ext/phar/tests/zip/rename_dir.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/zip/rmdir.phpt?view=markuprev=1.1
Index: php-src/ext/phar/tests/zip/rmdir.phpt
+++ php-src/ext/phar/tests/zip/rmdir.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar func_interceptors.c stream.c util.c

2008-07-10 Thread Dmitry Stogov
dmitry  Thu Jul 10 16:16:15 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   func_interceptors.c stream.c util.c 
  Log:
  Fixed wrong refcount updates
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/func_interceptors.c?r1=1.20.2.8r2=1.20.2.9diff_format=u
Index: php-src/ext/phar/func_interceptors.c
diff -u php-src/ext/phar/func_interceptors.c:1.20.2.8 
php-src/ext/phar/func_interceptors.c:1.20.2.9
--- php-src/ext/phar/func_interceptors.c:1.20.2.8   Thu Jul 10 11:36:50 2008
+++ php-src/ext/phar/func_interceptors.cThu Jul 10 16:16:15 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: func_interceptors.c,v 1.20.2.8 2008/07/10 11:36:50 dmitry Exp $ */
+/* $Id: func_interceptors.c,v 1.20.2.9 2008/07/10 16:16:15 dmitry Exp $ */
 
 #include phar_internal.h
 
@@ -658,7 +658,7 @@
efree(entry);
goto stat_entry;
}
-   if (SUCCESS == zend_hash_find((phar-virtual_dirs), 
entry, entry_len, (void **) data)) {
+   if (zend_hash_exists((phar-virtual_dirs), entry, 
entry_len)) {
efree(entry);
efree(arch);
if (IS_EXISTS_CHECK(type)) {
@@ -706,7 +706,7 @@
}
goto stat_entry;
}
-   if (SUCCESS == 
zend_hash_find((phar-virtual_dirs), entry + 1, entry_len - 1, (void **) 
data)) {
+   if (zend_hash_exists((phar-virtual_dirs), 
entry + 1, entry_len - 1)) {
PHAR_G(cwd) = save;
PHAR_G(cwd_len) = save_len;
efree(entry);
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/stream.c?r1=1.27.2.7r2=1.27.2.8diff_format=u
Index: php-src/ext/phar/stream.c
diff -u php-src/ext/phar/stream.c:1.27.2.7 php-src/ext/phar/stream.c:1.27.2.8
--- php-src/ext/phar/stream.c:1.27.2.7  Fri Jun 27 01:21:12 2008
+++ php-src/ext/phar/stream.c   Thu Jul 10 16:16:15 2008
@@ -608,7 +608,7 @@
php_url_free(resource);
return SUCCESS;
}
-   if (SUCCESS == zend_hash_find((phar-virtual_dirs), internal_file, 
internal_file_len, (void **) entry)) {
+   if (zend_hash_exists((phar-virtual_dirs), internal_file, 
internal_file_len)) {
phar_dostat(phar, NULL, ssb, 1, phar-alias, phar-alias_len 
TSRMLS_CC);
php_url_free(resource);
return SUCCESS;
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.21r2=1.55.2.22diff_format=u
Index: php-src/ext/phar/util.c
diff -u php-src/ext/phar/util.c:1.55.2.21 php-src/ext/phar/util.c:1.55.2.22
--- php-src/ext/phar/util.c:1.55.2.21   Mon Jun 23 19:18:01 2008
+++ php-src/ext/phar/util.c Thu Jul 10 16:16:15 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: util.c,v 1.55.2.21 2008/06/23 19:18:01 sfox Exp $ */
+/* $Id: util.c,v 1.55.2.22 2008/07/10 16:16:15 dmitry Exp $ */
 
 #include phar_internal.h
 
@@ -1358,7 +1358,7 @@
return entry;
}
if (dir) {
-   if (SUCCESS == zend_hash_find(phar-virtual_dirs, path, 
path_len, (void**)entry)) {
+   if (zend_hash_exists(phar-virtual_dirs, path, path_len)) {
/* a file or directory exists in a sub-directory of 
this path */
entry = (phar_entry_info *) ecalloc(1, 
sizeof(phar_entry_info));
/* this next line tells PharFileInfo-__destruct() to 
efree the filename */
@@ -1958,12 +1958,16 @@
  */
 static int phar_add_empty(HashTable *ht, char *arKey, uint nKeyLength)  /* {{{ 
*/
 {
-   char *dummy = (char*)1;
+   char **dummy;
+
if (SUCCESS == zend_hash_find(ht, arKey, nKeyLength, (void **)dummy)) {
-   dummy++;
-   }
+   (*dummy)++;
+   return SUCCESS;
+   } else {
+   char *dummy = (char*)1;
 
-   return zend_hash_update(ht, arKey, nKeyLength, (char *) dummy, 
sizeof(void *), NULL);
+   return zend_hash_add(ht, arKey, nKeyLength, (char *) dummy, 
sizeof(void *), NULL);
+   }
 }
 /* }}} */
 
@@ -1983,19 +1987,15 @@
 void phar_delete_virtual_dirs(phar_archive_data *phar, char *filename, int 
filename_len TSRMLS_DC) /* {{{ */
 {
char *s = filename;
+   char **dummy;
 
/* we use filename_len - 1 to avoid adding a virtual dir for empty 
directory entries */
for (; s - filename  filename_len - 1; s++) {
if (*s == '/') {
-   char *dummy;
-   if (FAILURE == zend_hash_find(phar-virtual_dirs, 
filename, s - filename, (void 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap php_imap.c

2008-07-10 Thread Felipe Pena
felipe  Thu Jul 10 17:44:09 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/imap   php_imap.c 
  Log:
  - Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't 
accept lengths of 1024)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.32r2=1.208.2.7.2.33diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.32 
php-src/ext/imap/php_imap.c:1.208.2.7.2.33
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.32  Wed Jun 11 02:32:22 2008
+++ php-src/ext/imap/php_imap.c Thu Jul 10 17:44:09 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.32 2008/06/11 02:32:22 philip Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.33 2008/07/10 17:44:09 felipe Exp $ */
 
 #define IMAP41
 
@@ -1587,8 +1587,8 @@
convert_to_long_ex(msgno);
if (myargc = 3) {
convert_to_long_ex(fromlength);
-   if (Z_LVAL_PP(fromlength)  0 || Z_LVAL_PP(fromlength) = 
MAILTMPLEN) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, From 
length has to be between 1 and %i, MAILTMPLEN);
+   if (Z_LVAL_PP(fromlength)  0 || Z_LVAL_PP(fromlength)  
MAILTMPLEN) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, From 
length has to be between 0 and %d, MAILTMPLEN);
RETURN_FALSE;
}
} else {
@@ -1596,8 +1596,8 @@
}
if (myargc = 4) {
convert_to_long_ex(subjectlength);
-   if (Z_LVAL_PP(subjectlength)  0 || Z_LVAL_PP(subjectlength) = 
MAILTMPLEN) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Subject 
length has to be between 1 and %i, MAILTMPLEN);
+   if (Z_LVAL_PP(subjectlength)  0 || Z_LVAL_PP(subjectlength)  
MAILTMPLEN) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Subject 
length has to be between 0 and %d, MAILTMPLEN);
RETURN_FALSE;
}
} else {



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/imap php_imap.c

2008-07-10 Thread Felipe Pena
felipe  Thu Jul 10 17:50:51 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/imap   php_imap.c 
  Log:
  - MFB: Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo 
doesn't accept lengths of 1024)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.14r2=1.208.2.7.2.26.2.15diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.14 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.15
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.14 Mon Jul  7 17:18:43 2008
+++ php-src/ext/imap/php_imap.c Thu Jul 10 17:50:51 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.14 2008/07/07 17:18:43 felipe Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.15 2008/07/10 17:50:51 felipe Exp $ */
 
 #define IMAP41
 
@@ -1977,16 +1977,16 @@
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
if (argc = 3) {
-   if (fromlength  0 || fromlength = MAILTMPLEN) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, From 
length has to be between 1 and %i, MAILTMPLEN);
+   if (fromlength  0 || fromlength  MAILTMPLEN) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, From 
length has to be between 0 and %d, MAILTMPLEN);
RETURN_FALSE;
}
} else {
fromlength = 0x00;
}
if (argc = 4) {
-   if (subjectlength  0 || subjectlength = MAILTMPLEN) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Subject 
length has to be between 1 and %i, MAILTMPLEN);
+   if (subjectlength  0 || subjectlength  MAILTMPLEN) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Subject 
length has to be between 0 and %d, MAILTMPLEN);
RETURN_FALSE;
}
} else {



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



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

2008-07-10 Thread Felipe Pena
felipe  Thu Jul 10 17:54:09 2008 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c 
  Log:
  - MFB: Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo 
doesn't accept lengths of 1024)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.254r2=1.255diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.254 php-src/ext/imap/php_imap.c:1.255
--- php-src/ext/imap/php_imap.c:1.254   Mon Jul  7 17:19:07 2008
+++ php-src/ext/imap/php_imap.c Thu Jul 10 17:54:08 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.254 2008/07/07 17:19:07 felipe Exp $ */
+/* $Id: php_imap.c,v 1.255 2008/07/10 17:54:08 felipe Exp $ */
 
 #define IMAP41
 
@@ -2007,8 +2007,8 @@
convert_to_long_ex(msgno);
if (myargc = 3) {
convert_to_long_ex(fromlength);
-   if (Z_LVAL_PP(fromlength)  0 || Z_LVAL_PP(fromlength) = 
MAILTMPLEN) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, From 
length has to be between 1 and %i, MAILTMPLEN);
+   if (Z_LVAL_PP(fromlength)  0 || Z_LVAL_PP(fromlength)  
MAILTMPLEN) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, From 
length has to be between 0 and %d, MAILTMPLEN);
RETURN_FALSE;
}
} else {
@@ -2016,8 +2016,8 @@
}
if (myargc = 4) {
convert_to_long_ex(subjectlength);
-   if (Z_LVAL_PP(subjectlength)  0 || Z_LVAL_PP(subjectlength) = 
MAILTMPLEN) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Subject 
length has to be between 1 and %i, MAILTMPLEN);
+   if (Z_LVAL_PP(subjectlength)  0 || Z_LVAL_PP(subjectlength)  
MAILTMPLEN) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Subject 
length has to be between 0 and %d, MAILTMPLEN);
RETURN_FALSE;
}
} else {



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



[PHP-CVS] cvs: win-installer / ExtensionsFragment.wxs PHPInstallerBase52.wxs PHPInstallerBase52NTS.wxs PHPInstallerBase60.wxs PHPInstallerBase60NTS.wxs

2008-07-10 Thread John Mertic
jmertic Thu Jul 10 19:31:05 2008 UTC

  Modified files:  
/win-installer  ExtensionsFragment.wxs PHPInstallerBase52.wxs 
PHPInstallerBase52NTS.wxs PHPInstallerBase60.wxs 
PHPInstallerBase60NTS.wxs 
  Log:
  Bug #45091 - Make sure that the SMNP support files get installed in the 
usr/mibs directory in the root directory.
  http://cvs.php.net/viewvc.cgi/win-installer/ExtensionsFragment.wxs?r1=1.1r2=1.2diff_format=u
Index: win-installer/ExtensionsFragment.wxs
diff -u win-installer/ExtensionsFragment.wxs:1.1 
win-installer/ExtensionsFragment.wxs:1.2
--- win-installer/ExtensionsFragment.wxs:1.1Sat Oct 13 19:10:53 2007
+++ win-installer/ExtensionsFragment.wxsThu Jul 10 19:31:05 2008
@@ -45,17 +45,7 @@
Section=PHP 
Value=quot;[INSTALLDIR]extquot; /
/Component
/Directory
-Directory Id=mibsdirectory Name=mibs
-   Component Id=mibsdir DiskId=1 
Guid=21B96C70-3A1E-11DC-8314-0800200C9A66
-   Environment Id=MIBDIRS 
-  Name=MIBDIRS 
-  Action=create 
-  System=yes 
-  Part=all 
-  Value=[!INSTALLDIR]\mibs/
-   /Component
-   /Directory
-   Directory Id=extrasdirectory Name=extras
+Directory Id=extrasdirectory Name=extras
Component Id=magicMIME DiskId=1 
Guid=C29559A6-DE77-4951-A8F8-6266B790DE20
File Id=filemagicMIME 
Name=MAGIC_1.MIM LongName=magic.mime Source=Files\extras\magic.mime /
/Component
@@ -118,5 +108,66 @@
/Directory
/Directory
/DirectoryRef
+DirectoryRef Id=mibsdirectory
+Component Id=mibsdir DiskId=1 
Guid=21B96C70-3A1E-11DC-8314-0800200C9A66
+File Id=mibsfile1 Name=AGENTX_1.TXT 
LongName=AGENTX-MIB.txt Source=Files\extras\mibs\AGENTX-MIB.txt /
+File Id=mibsfile2 Name=DISMAN_1.TXT 
LongName=DISMAN-SCHEDULE-MIB.txt 
Source=Files\extras\mibs\DISMAN-SCHEDULE-MIB.txt /
+File Id=mibsfile3 Name=DISMAN_2.TXT 
LongName=DISMAN-SCRIPT-MIB.txt 
Source=Files\extras\mibs\DISMAN-SCRIPT-MIB.txt /
+File Id=mibsfile4 Name=ETHERL_1.TXT 
LongName=EtherLike-MIB.txt Source=Files\extras\mibs\EtherLike-MIB.txt /
+File Id=mibsfile5 Name=HCNUM-TC.txt 
Source=Files\extras\mibs\HCNUM-TC.txt /
+File Id=mibsfile6 Name=HOST-R_1.TXT 
LongName=HOST-RESOURCES-MIB.txt 
Source=Files\extras\mibs\HOST-RESOURCES-MIB.txt /
+File Id=mibsfile7 Name=HOST-R_2.TXT 
LongName=HOST-RESOURCES-TYPES.txt 
Source=Files\extras\mibs\HOST-RESOURCES-TYPES.txt /
+File Id=mibsfile8 Name=IANA-A_1.TXT 
LongName=IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt 
Source=Files\extras\mibs\IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt /
+File Id=mibsfile9 Name=IANA-L_1.TXT 
LongName=IANA-LANGUAGE-MIB.txt 
Source=Files\extras\mibs\IANA-LANGUAGE-MIB.txt /
+File Id=mibsfile10 Name=IANAIF_1.TXT 
LongName=IANAifType-MIB.txt Source=Files\extras\mibs\IANAifType-MIB.txt /
+File Id=mibsfile11 Name=IF-INV_1.TXT 
LongName=IF-INVERTED-STACK-MIB.txt 
Source=Files\extras\mibs\IF-INVERTED-STACK-MIB.txt /
+File Id=mibsfile12 Name=IF-MIB.txt 
Source=Files\extras\mibs\IF-MIB.txt /
+File Id=mibsfile13 Name=INET-A_1.TXT 
LongName=INET-ADDRESS-MIB.txt Source=Files\extras\mibs\INET-ADDRESS-MIB.txt 
/
+File Id=mibsfile14 Name=IP-FOR_1.TXT 
LongName=IP-FORWARD-MIB.txt Source=Files\extras\mibs\IP-FORWARD-MIB.txt /
+File Id=mibsfile15 Name=IP-MIB.txt 
Source=Files\extras\mibs\IP-MIB.txt /
+File Id=mibsfile16 Name=IPV6-I_1.TXT 
LongName=IPV6-ICMP-MIB.txt Source=Files\extras\mibs\IPV6-ICMP-MIB.txt /
+File Id=mibsfile17 Name=IPV6-MIB.txt 
Source=Files\extras\mibs\IPV6-MIB.txt /
+File Id=mibsfile18 Name=IPV6-TC.txt 
Source=Files\extras\mibs\IPV6-TC.txt /
+File Id=mibsfile19 Name=IPV6-T_1.TXT 
LongName=IPV6-TCP-MIB.txt Source=Files\extras\mibs\IPV6-TCP-MIB.txt /
+File Id=mibsfile20 Name=IPV6-U_1.TXT 
LongName=IPV6-UDP-MIB.txt Source=Files\extras\mibs\IPV6-UDP-MIB.txt /
+File Id=mibsfile21 Name=MTA-MIB.txt 
Source=Files\extras\mibs\MTA-MIB.txt /
+File Id=mibsfile22 Name=NETWOR_1.TXT 
LongName=NETWORK-SERVICES-MIB.txt 
Source=Files\extras\mibs\NETWORK-SERVICES-MIB.txt /
+File Id=mibsfile23 Name=output.txt 
Source=Files\extras\mibs\output.txt /
+File Id=mibsfile24 Name=RFC-1215.txt 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/intl php_intl.c /ext/intl/dateformat dateformat_class.c dateformat_parse.c /ext/intl/tests dateformat_localtime.phpt dateformat_parse.phpt ut_common.inc

2008-07-10 Thread Stanislav Malyshev
stasThu Jul 10 21:58:02 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/intl   php_intl.c 
/php-src/ext/intl/dateformatdateformat_class.c dateformat_parse.c 
/php-src/ext/intl/tests dateformat_localtime.phpt 
dateformat_parse.phpt ut_common.inc 
  Log:
  fix date formatter positions (bug #14263)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/intl/php_intl.c?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/intl/php_intl.c
diff -u php-src/ext/intl/php_intl.c:1.1.2.1 php-src/ext/intl/php_intl.c:1.1.2.2
--- php-src/ext/intl/php_intl.c:1.1.2.1 Mon Jul  7 22:51:02 2008
+++ php-src/ext/intl/php_intl.c Thu Jul 10 21:58:02 2008
@@ -210,6 +210,12 @@
ZEND_ARG_INFO( 1, arg5 )  /* 1 = pass by reference */
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX( datefmt_parse_args, 0, 0, 2 )
+   ZEND_ARG_INFO( 0, formatter )
+   ZEND_ARG_INFO( 0, string )
+   ZEND_ARG_INFO( 1, position )
+ZEND_END_ARG_INFO()
+
 /* }}} */
 
 /* {{{ intl_functions
@@ -299,8 +305,8 @@
PHP_FE( datefmt_is_lenient, NULL )
PHP_FE( datefmt_set_lenient, NULL )
PHP_FE( datefmt_format, NULL )
-   PHP_FE( datefmt_parse, NULL )
-PHP_FE( datefmt_localtime , NULL )
+   PHP_FE( datefmt_parse, datefmt_parse_args )
+PHP_FE( datefmt_localtime , datefmt_parse_args )
PHP_FE( datefmt_get_error_code, NULL )
PHP_FE( datefmt_get_error_message, NULL )
 
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/dateformat/dateformat_class.c?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/intl/dateformat/dateformat_class.c
diff -u php-src/ext/intl/dateformat/dateformat_class.c:1.1.2.1 
php-src/ext/intl/dateformat/dateformat_class.c:1.1.2.2
--- php-src/ext/intl/dateformat/dateformat_class.c:1.1.2.1  Mon Jul  7 
23:10:15 2008
+++ php-src/ext/intl/dateformat/dateformat_class.c  Thu Jul 10 21:58:02 2008
@@ -86,6 +86,10 @@
 /* {{{ IntlDateFormatter_class_functions
  * Every 'IntlDateFormatter' class method has an entry in this table
  */
+static ZEND_BEGIN_ARG_INFO_EX( datefmt_parse_args, 0, 0, 1 )
+   ZEND_ARG_INFO( 0, string )
+   ZEND_ARG_INFO( 1, position )
+ZEND_END_ARG_INFO()
 
 static function_entry IntlDateFormatter_class_functions[] = {
PHP_ME( IntlDateFormatter, __construct, NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
@@ -102,8 +106,8 @@
PHP_NAMED_FE( setLenient, ZEND_FN( datefmt_set_lenient ), NULL )
PHP_NAMED_FE( isLenient, ZEND_FN( datefmt_is_lenient ), NULL )
PHP_NAMED_FE( format, ZEND_FN( datefmt_format ), NULL )
-   PHP_NAMED_FE( parse, ZEND_FN( datefmt_parse), NULL )
-   PHP_NAMED_FE( localtime, ZEND_FN( datefmt_localtime ), NULL )
+   PHP_NAMED_FE( parse, ZEND_FN( datefmt_parse), datefmt_parse_args )
+   PHP_NAMED_FE( localtime, ZEND_FN( datefmt_localtime ), 
datefmt_parse_args )
PHP_NAMED_FE( getErrorCode, ZEND_FN( datefmt_get_error_code ), NULL )
PHP_NAMED_FE( getErrorMessage, ZEND_FN( datefmt_get_error_message ), 
NULL )
{ NULL, NULL, NULL }
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/dateformat/dateformat_parse.c?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/intl/dateformat/dateformat_parse.c
diff -u php-src/ext/intl/dateformat/dateformat_parse.c:1.1.2.1 
php-src/ext/intl/dateformat/dateformat_parse.c:1.1.2.2
--- php-src/ext/intl/dateformat/dateformat_parse.c:1.1.2.1  Mon Jul  7 
23:10:15 2008
+++ php-src/ext/intl/dateformat/dateformat_parse.c  Thu Jul 10 21:58:02 2008
@@ -33,7 +33,7 @@
  * if set to 1 - store any error encountered  in the parameter parse_error 
 
  * if set to 0 - no need to store any error encountered  in the parameter 
parse_error  
 */
-static void internal_parse_to_timestamp(IntlDateFormatter_object *mfo, char* 
text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){
+static void internal_parse_to_timestamp(IntlDateFormatter_object *mfo, char* 
text_to_parse , int32_t text_len, int32_t *parse_pos , zval *return_value 
TSRMLS_DC){
longresult =  0;
UDate   timestamp   =0;
UChar*  text_utf16  = NULL;
@@ -43,7 +43,7 @@
 intl_convert_utf8_to_utf16(text_utf16 , text_utf16_len , 
text_to_parse , text_len, INTL_DATA_ERROR_CODE(mfo));
 INTL_METHOD_CHECK_STATUS(mfo, Error converting timezone to UTF-16 );
 
-   timestamp = udat_parse( DATE_FORMAT_OBJECT(mfo), text_utf16 , 
text_utf16_len , parse_pos , INTL_DATA_ERROR_CODE(mfo));
+   timestamp = udat_parse( DATE_FORMAT_OBJECT(mfo), text_utf16 , 
text_utf16_len , parse_pos , INTL_DATA_ERROR_CODE(mfo));
if( text_utf16 ){
efree(text_utf16);
}
@@ -78,7 +78,7 @@
 /* {{{
  * Internal function which calls the udat_parseCalendar
 */
-static void internal_parse_to_localtime(IntlDateFormatter_object *mfo, char* 
text_to_parse , int32_t text_len, int parse_pos , zval 

[PHP-CVS] cvs: php-src /ext/standard/tests/strings strnatcasecmp_basic.phpt strnatcasecmp_variation1.phpt

2008-07-10 Thread David Soria Parra
dsp Thu Jul 10 23:36:15 2008 UTC

  Added files: 
/php-src/ext/standard/tests/strings strnatcasecmp_basic.phpt 
strnatcasecmp_variation1.phpt 
  Log:
  PHP Testfest. Tests done by Felix De Vliegher
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strnatcasecmp_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strnatcasecmp_basic.phpt
+++ php-src/ext/standard/tests/strings/strnatcasecmp_basic.phpt
--TEST--
Test strnatcasecmp() function : basic functionality 
--CREDITS--
Felix De Vliegher [EMAIL PROTECTED]
--FILE--
?php
/* Prototype  : int strnatcasecmp(string s1, string s2)
 * Description: Returns the result of case-insensitive string comparison using 
'natural' algorithm 
 * Source code: ext/standard/string.c
 * Alias to functions: 
 */

function str_dump($one, $two) {
var_dump(strnatcasecmp($one, $two));
}

echo *** Testing strnatcasecmp() : basic functionality ***\n;

// Calling strnatcasecmp() with all possible arguments
str_dump('A', 'a');
str_dump('a10', 'A20');
str_dump('A1b', 'a');
str_dump('x2-y7', 'x8-y8');
str_dump('1.010', '1.001');
str_dump(' ab', ' aB');
str_dump('acc ', 'acc');
str_dump(11.5, 10.5);
str_dump(10.5, 10.5E1);
str_dump('Rfc822.txt', 'rfc2086.txt');
str_dump('Rfc822.txt', 'rfc822.TXT');
str_dump('pIc 6', 'pic   7');
str_dump(0xFFF, 0Xfff);

?
===DONE===
--EXPECT--
*** Testing strnatcasecmp() : basic functionality ***
int(0)
int(-1)
int(1)
int(-1)
int(1)
int(0)
int(1)
int(1)
int(-1)
int(-1)
int(0)
int(-1)
int(0)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strnatcasecmp_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
+++ php-src/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
--TEST--
Test strnatcasecmp() function : variation 
--CREDITS--
Felix De Vliegher [EMAIL PROTECTED]
--FILE--
?php
/* Prototype  : int strnatcasecmp(string s1, string s2)
 * Description: Returns the result of case-insensitive string comparison using 
'natural' algorithm 
 * Source code: ext/standard/string.c
 * Alias to functions: 
 */

/* Preparation */
class a
{
function __toString()
{
return Hello WORLD;
}
}

class b
{
function __toString()
{
return HELLO world;
}
}

$a = new a();
$b = new b();

function str_dump($a, $b) {
var_dump(strnatcasecmp($a, $b));
}

echo *** Testing strnatcasecmp() : variation ***\n;

str_dump(chr(128), chr(255));
str_dump('0', false);
str_dump('fooBar', '');
str_dump('', -1);
str_dump(Hello\0world, Helloworld);
str_dump(\x0, \0);
str_dump($a, $b);

?
===DONE===
--EXPECT--
*** Testing strnatcasecmp() : variation ***
int(-1)
int(1)
int(6)
int(-2)
int(-1)
int(0)
int(0)
===DONE===



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings strnatcasecmp_basic.phpt strnatcasecmp_variation1.phpt

2008-07-10 Thread David Soria Parra
dsp Thu Jul 10 23:46:49 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings strnatcasecmp_basic.phpt 
strnatcasecmp_variation1.phpt 
  Log:
  PHP Testfest. Tests done by Felix De Vliegher
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strnatcasecmp_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strnatcasecmp_basic.phpt
+++ php-src/ext/standard/tests/strings/strnatcasecmp_basic.phpt
--TEST--
Test strnatcasecmp() function : basic functionality 
--CREDITS--
Felix De Vliegher [EMAIL PROTECTED]
--FILE--
?php
/* Prototype  : int strnatcasecmp(string s1, string s2)
 * Description: Returns the result of case-insensitive string comparison using 
'natural' algorithm 
 * Source code: ext/standard/string.c
 * Alias to functions: 
 */

function str_dump($one, $two) {
var_dump(strnatcasecmp($one, $two));
}

echo *** Testing strnatcasecmp() : basic functionality ***\n;

// Calling strnatcasecmp() with all possible arguments
str_dump('A', 'a');
str_dump('a10', 'A20');
str_dump('A1b', 'a');
str_dump('x2-y7', 'x8-y8');
str_dump('1.010', '1.001');
str_dump(' ab', ' aB');
str_dump('acc ', 'acc');
str_dump(11.5, 10.5);
str_dump(10.5, 10.5E1);
str_dump('Rfc822.txt', 'rfc2086.txt');
str_dump('Rfc822.txt', 'rfc822.TXT');
str_dump('pIc 6', 'pic   7');
str_dump(0xFFF, 0Xfff);

?
===DONE===
--EXPECT--
*** Testing strnatcasecmp() : basic functionality ***
int(0)
int(-1)
int(1)
int(-1)
int(1)
int(0)
int(1)
int(1)
int(-1)
int(-1)
int(0)
int(-1)
int(0)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strnatcasecmp_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
+++ php-src/ext/standard/tests/strings/strnatcasecmp_variation1.phpt
--TEST--
Test strnatcasecmp() function : variation 
--CREDITS--
Felix De Vliegher [EMAIL PROTECTED]
--FILE--
?php
/* Prototype  : int strnatcasecmp(string s1, string s2)
 * Description: Returns the result of case-insensitive string comparison using 
'natural' algorithm 
 * Source code: ext/standard/string.c
 * Alias to functions: 
 */

/* Preparation */
class a
{
function __toString()
{
return Hello WORLD;
}
}

class b
{
function __toString()
{
return HELLO world;
}
}

$a = new a();
$b = new b();

function str_dump($a, $b) {
var_dump(strnatcasecmp($a, $b));
}

echo *** Testing strnatcasecmp() : variation ***\n;

str_dump(chr(128), chr(255));
str_dump('0', false);
str_dump('fooBar', '');
str_dump('', -1);
str_dump(Hello\0world, Helloworld);
str_dump(\x0, \0);
str_dump($a, $b);

?
===DONE===
--EXPECT--
*** Testing strnatcasecmp() : variation ***
int(-1)
int(1)
int(6)
int(-2)
int(-1)
int(0)
int(0)
===DONE===



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