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

2005-08-09 Thread changelog
changelog   Wed Aug 10 01:38:21 2005 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.2068r2=1.2069ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2068 php-src/ChangeLog:1.2069
--- php-src/ChangeLog:1.2068Tue Aug  9 01:39:27 2005
+++ php-src/ChangeLog   Wed Aug 10 01:38:19 2005
@@ -1,3 +1,181 @@
+2005-08-09  Andi Gutmans  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  NEWS:
+  - This didn't end up being included
+
+2005-08-09  Johannes Schlüter  [EMAIL PROTECTED]
+
+* NEWS
+  ext/standard/string.c
+  ext/standard/tests/strings/stristr.phpt
+  ext/standard/tests/strings/strstr.phpt:
+  - Added option to strstr() and stristr() to get a particular haystack
+  component
+
+2005-08-09  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/url.h:
+  Missing patch bit.
+
+2005-08-09  Andrei Zmievski  [EMAIL PROTECTED]
+
+* (PHP_4_4)
+  ext/pcre/config.m4
+  ext/pcre/pcrelib/AUTHORS
+  ext/pcre/pcrelib/COPYING
+  ext/pcre/pcrelib/ChangeLog
+  ext/pcre/pcrelib/LICENCE
+  ext/pcre/pcrelib/NEWS
+  ext/pcre/pcrelib/NON-UNIX-USE
+  ext/pcre/pcrelib/README
+  ext/pcre/pcrelib/chartables.c
+  ext/pcre/pcrelib/dftables.c
+  ext/pcre/pcrelib/get.c
+  ext/pcre/pcrelib/internal.h
+  ext/pcre/pcrelib/libpcre.def
+  ext/pcre/pcrelib/libpcreposix.def
+  ext/pcre/pcrelib/maketables.c
+  ext/pcre/pcrelib/pcre.c
+  ext/pcre/pcrelib/pcre.def
+  ext/pcre/pcrelib/pcre.h
+  ext/pcre/pcrelib/pcre_chartables.c
+  ext/pcre/pcrelib/pcre_compile.c
+  ext/pcre/pcrelib/pcre_config.c
+  ext/pcre/pcrelib/pcre_dfa_exec.c
+  ext/pcre/pcrelib/pcre_exec.c
+  ext/pcre/pcrelib/pcre_fullinfo.c
+  ext/pcre/pcrelib/pcre_get.c
+  ext/pcre/pcrelib/pcre_globals.c
+  ext/pcre/pcrelib/pcre_info.c
+  ext/pcre/pcrelib/pcre_internal.h
+  ext/pcre/pcrelib/pcre_maketables.c
+  ext/pcre/pcrelib/pcre_ord2utf8.c
+  ext/pcre/pcrelib/pcre_printint.c
+  ext/pcre/pcrelib/pcre_refcount.c
+  ext/pcre/pcrelib/pcre_scanner.cc
+  ext/pcre/pcrelib/pcre_scanner.h
+  ext/pcre/pcrelib/pcre_scanner_unittest.cc
+  ext/pcre/pcrelib/pcre_stringpiece.cc
+  ext/pcre/pcrelib/pcre_stringpiece.h
+  ext/pcre/pcrelib/pcre_stringpiece_unittest.cc
+  ext/pcre/pcrelib/pcre_study.c
+  ext/pcre/pcrelib/pcre_tables.c
+  ext/pcre/pcrelib/pcre_try_flipped.c
+  ext/pcre/pcrelib/pcre_ucp_findchar.c
+  ext/pcre/pcrelib/pcre_valid_utf8.c
+  ext/pcre/pcrelib/pcre_version.c
+  ext/pcre/pcrelib/pcre_xclass.c
+  ext/pcre/pcrelib/pcrecpp.cc
+  ext/pcre/pcrelib/pcrecpp.h
+  ext/pcre/pcrelib/pcrecpp_unittest.cc
+  ext/pcre/pcrelib/pcregrep.c
+  ext/pcre/pcrelib/pcreposix.c
+  ext/pcre/pcrelib/pcreposix.h
+  ext/pcre/pcrelib/pcretest.c
+  ext/pcre/pcrelib/study.c
+  ext/pcre/pcrelib/ucp.c
+  ext/pcre/pcrelib/ucp.h
+  ext/pcre/pcrelib/ucp_findchar.c
+  ext/pcre/pcrelib/ucptypetable.c
+  ext/pcre/pcrelib/doc/Tech.Notes
+  ext/pcre/pcrelib/doc/pcre.txt
+  ext/pcre/pcrelib/testdata/grepinput
+  ext/pcre/pcrelib/testdata/grepinputx
+  ext/pcre/pcrelib/testdata/greplist
+  ext/pcre/pcrelib/testdata/grepoutput
+  ext/pcre/pcrelib/testdata/testinput1
+  ext/pcre/pcrelib/testdata/testinput2
+  ext/pcre/pcrelib/testdata/testinput3
+  ext/pcre/pcrelib/testdata/testinput4
+  ext/pcre/pcrelib/testdata/testinput5
+  ext/pcre/pcrelib/testdata/testinput6
+  ext/pcre/pcrelib/testdata/testinput7
+  ext/pcre/pcrelib/testdata/testinput8
+  ext/pcre/pcrelib/testdata/testinput9
+  ext/pcre/pcrelib/testdata/testoutput1
+  ext/pcre/pcrelib/testdata/testoutput2
+  ext/pcre/pcrelib/testdata/testoutput3
+  ext/pcre/pcrelib/testdata/testoutput4
+  ext/pcre/pcrelib/testdata/testoutput5
+  ext/pcre/pcrelib/testdata/testoutput6
+  ext/pcre/pcrelib/testdata/testoutput7
+  ext/pcre/pcrelib/testdata/testoutput8
+  ext/pcre/pcrelib/testdata/testoutput9:
+  Upgrade to PCRE 6.2.
+
+* ext/pcre/pcrelib/internal.h:
+  Remove old internal.h file.
+
+2005-08-09  Jani Taskinen  [EMAIL PROTECTED]
+
+* NEWS:
+  reword
+
+2005-08-09  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* NEWS
+  ext/standard/basic_functions.c:
+  News and constants for parse_url().
+
+* ext/standard/url.c:
+  Added option to parse_url() to retrieve a particular URL component.
+
+* ext/curl/interface.c
+  ext/curl/php_curl.h:
+  Added curl_setopt_array(), allowing setting of multiple cURL options.
+  Added CURLINFO_HEADER_OUT to facilitate request retrieval.
+
+2005-08-09  Derick Rethans  [EMAIL PROTECTED]
+
+* buildconf:
+  - Fixed buildconf for PHP 6.
+
+2005-08-09  Sebastian Bergmann  [EMAIL PROTECTED]
+
+* ext/pcre/config.w32:
+  MFB: 

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

2005-08-09 Thread changelog
changelog   Wed Aug 10 01:38:31 2005 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.746r2=1.747ty=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.746 ZendEngine2/ChangeLog:1.747
--- ZendEngine2/ChangeLog:1.746 Tue Aug  9 01:39:37 2005
+++ ZendEngine2/ChangeLog   Wed Aug 10 01:38:30 2005
@@ -1,3 +1,23 @@
+2005-08-09  Derick Rethans  [EMAIL PROTECTED]
+
+* zend_extensions.h
+  zend_modules.h:
+  - Changing the API numbers, which might be a bit premature, but it allows
+to differentiate between different branches.
+  - Bumbed the version number to 6.0.0-dev. I know we didn't discuss this
+  yet,
+but I feel it should be 6.0. See mail to the mailinglist.
+
+2005-08-09  Andi Gutmans  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  zend.h:
+  - No release today. Found a critical bug...
+
+* (PHP_5_1)
+  zend.h:
+  - RC1
+
 2005-08-08  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_API.c:
@@ -9409,7 +9429,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.746 2005/08/09 05:39:37 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.747 2005/08/10 05:38:30 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -11133,7 +11153,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.746 2005/08/09 05:39:37 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.747 2005/08/10 05:38:30 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src(PHP_5_1) /ext/pcre config.w32

2005-08-09 Thread Sebastian Bergmann
sebastian   Tue Aug  9 02:25:27 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/pcre   config.w32 
  Log:
  Sync with config.m4.
  
http://cvs.php.net/diff.php/php-src/ext/pcre/config.w32?r1=1.4r2=1.4.2.1ty=u
Index: php-src/ext/pcre/config.w32
diff -u php-src/ext/pcre/config.w32:1.4 php-src/ext/pcre/config.w32:1.4.2.1
--- php-src/ext/pcre/config.w32:1.4 Sat May 28 02:30:46 2005
+++ php-src/ext/pcre/config.w32 Tue Aug  9 02:25:24 2005
@@ -1,12 +1,12 @@
-// $Id: config.w32,v 1.4 2005/05/28 06:30:46 sebastian Exp $
+// $Id: config.w32,v 1.4.2.1 2005/08/09 06:25:24 sebastian Exp $
 // vim:ft=javascript
 
 ARG_WITH(pcre-regex, Perl Compatible Regular Expressions, yes);
 
 if (PHP_PCRE_REGEX == yes) {
EXTENSION(pcre, php_pcre.c, PHP_PCRE_REGEX_SHARED,
-   -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 
-DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=1000 -Iext/pcre/pcrelib 
-DNO_RECURSE);
-   ADD_SOURCES(ext/pcre/pcrelib, maketables.c get.c study.c pcre.c, 
pcre);
+   -DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP 
-DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=1000 
-Iext/pcre/pcrelib -DNO_RECURSE);
+   ADD_SOURCES(ext/pcre/pcrelib, pcre_chartables.c pcre_compile.c 
pcre_config.c pcre_dfa_exec.c pcre_exec.c pcre_fullinfo.c pcre_get.c 
pcre_globals.c pcre_info.c pcre_maketables.c pcre_ord2utf8.c pcre_printint.c 
pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c 
pcre_ucp_findchar.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c, pcre);
 
AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library');
AC_DEFINE('HAVE_PCRE', 1, 'Have PCRE library');

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



[PHP-CVS] cvs: php-src / NEWS

2005-08-09 Thread Jani Taskinen
sniper  Tue Aug  9 04:08:21 2005 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  UN
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027r2=1.2028ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027 php-src/NEWS:1.2028
--- php-src/NEWS:1.2027 Mon Aug  8 17:35:03 2005
+++ php-src/NEWSTue Aug  9 04:08:20 2005
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? 2005, PHP 5.1
+- Upgraded PCRE library to version 6.2. (Andrei)
 - Updated bundled libraries in Windows distribution. (Edin)
   . zlib 1.2.3
   . curl 7.14.0

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



[PHP-CVS] cvs: php-src / configure.in /main php.h php_version.h ZendEngine2 zend_extensions.h zend_modules.h

2005-08-09 Thread Derick Rethans
derick  Tue Aug  9 04:47:58 2005 EDT

  Modified files:  
/php-srcconfigure.in 
/ZendEngine2zend_extensions.h zend_modules.h 
/php-src/main   php.h php_version.h 
  Log:
  - Changing the API numbers, which might be a bit premature, but it allows
to differentiate between different branches.
  - Bumbed the version number to 6.0.0-dev. I know we didn't discuss this yet,
but I feel it should be 6.0. See mail to the mailinglist.
  
  
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.579r2=1.580ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579 php-src/configure.in:1.580
--- php-src/configure.in:1.579  Mon Aug  8 12:06:47 2005
+++ php-src/configure.inTue Aug  9 04:47:52 2005
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579 2005/08/08 16:06:47 sniper Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.580 2005/08/09 08:47:52 derick Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -39,8 +39,8 @@
 
 AC_CONFIG_HEADER(main/php_config.h)
 
-MAJOR_VERSION=5
-MINOR_VERSION=1
+MAJOR_VERSION=6
+MINOR_VERSION=0
 RELEASE_VERSION=0
 EXTRA_VERSION=-dev
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
http://cvs.php.net/diff.php/ZendEngine2/zend_extensions.h?r1=1.67r2=1.68ty=u
Index: ZendEngine2/zend_extensions.h
diff -u ZendEngine2/zend_extensions.h:1.67 ZendEngine2/zend_extensions.h:1.68
--- ZendEngine2/zend_extensions.h:1.67  Wed Aug  3 09:30:52 2005
+++ ZendEngine2/zend_extensions.h   Tue Aug  9 04:47:55 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_extensions.h,v 1.67 2005/08/03 13:30:52 sniper Exp $ */
+/* $Id: zend_extensions.h,v 1.68 2005/08/09 08:47:55 derick Exp $ */
 
 #ifndef ZEND_EXTENSIONS_H
 #define ZEND_EXTENSIONS_H
@@ -27,7 +27,7 @@
 /* The first number is the engine version and the rest is the date.
  * This way engine 2 API no. is always greater than engine 1 API no..
  */
-#define ZEND_EXTENSION_API_NO  220050617
+#define ZEND_EXTENSION_API_NO  220050809
 
 typedef struct _zend_extension_version_info {
int zend_extension_api_no;
http://cvs.php.net/diff.php/ZendEngine2/zend_modules.h?r1=1.67r2=1.68ty=u
Index: ZendEngine2/zend_modules.h
diff -u ZendEngine2/zend_modules.h:1.67 ZendEngine2/zend_modules.h:1.68
--- ZendEngine2/zend_modules.h:1.67 Wed Aug  3 09:30:55 2005
+++ ZendEngine2/zend_modules.h  Tue Aug  9 04:47:56 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_modules.h,v 1.67 2005/08/03 13:30:55 sniper Exp $ */
+/* $Id: zend_modules.h,v 1.68 2005/08/09 08:47:56 derick Exp $ */
 
 #ifndef MODULES_H
 #define MODULES_H
@@ -38,7 +38,7 @@
 extern struct _zend_arg_info fourth_arg_force_ref[5];
 extern struct _zend_arg_info all_args_by_ref[1];
 
-#define ZEND_MODULE_API_NO 20050617
+#define ZEND_MODULE_API_NO 20050809
 #ifdef ZTS
 #define USING_ZTS 1
 #else
http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.221r2=1.222ty=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.221 php-src/main/php.h:1.222
--- php-src/main/php.h:1.221Sun Aug  7 11:13:50 2005
+++ php-src/main/php.h  Tue Aug  9 04:47:57 2005
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.221 2005/08/07 15:13:50 hholzgra Exp $ */
+/* $Id: php.h,v 1.222 2005/08/09 08:47:57 derick Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -26,7 +26,7 @@
 #include dmalloc.h
 #endif
 
-#define PHP_API_VERSION 20041225
+#define PHP_API_VERSION 20050809
 #define PHP_HAVE_STREAMS
 #define YYDEBUG 0
 
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.112r2=1.113ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.112 php-src/main/php_version.h:1.113
--- php-src/main/php_version.h:1.112Thu Jul 14 10:01:02 2005
+++ php-src/main/php_version.h  Tue Aug  9 04:47:58 2005
@@ -1,7 +1,7 @@
 /* automatically generated by configure */
 /* edit configure.in to change version number */
-#define PHP_MAJOR_VERSION 5
-#define PHP_MINOR_VERSION 1
+#define PHP_MAJOR_VERSION 6
+#define PHP_MINOR_VERSION 0
 #define PHP_RELEASE_VERSION 0
 #define PHP_EXTRA_VERSION -dev
-#define PHP_VERSION 5.1.0-dev
+#define PHP_VERSION 6.0.0-dev

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



[PHP-CVS] cvs: php-src /ext/pcre config.w32

2005-08-09 Thread Sebastian Bergmann
sebastian   Tue Aug  9 05:46:57 2005 EDT

  Modified files:  
/php-src/ext/pcre   config.w32 
  Log:
  MFB: Sync with config.m4.
  
http://cvs.php.net/diff.php/php-src/ext/pcre/config.w32?r1=1.4r2=1.5ty=u
Index: php-src/ext/pcre/config.w32
diff -u php-src/ext/pcre/config.w32:1.4 php-src/ext/pcre/config.w32:1.5
--- php-src/ext/pcre/config.w32:1.4 Sat May 28 02:30:46 2005
+++ php-src/ext/pcre/config.w32 Tue Aug  9 05:46:52 2005
@@ -1,12 +1,12 @@
-// $Id: config.w32,v 1.4 2005/05/28 06:30:46 sebastian Exp $
+// $Id: config.w32,v 1.5 2005/08/09 09:46:52 sebastian Exp $
 // vim:ft=javascript
 
 ARG_WITH(pcre-regex, Perl Compatible Regular Expressions, yes);
 
 if (PHP_PCRE_REGEX == yes) {
EXTENSION(pcre, php_pcre.c, PHP_PCRE_REGEX_SHARED,
-   -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 
-DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=1000 -Iext/pcre/pcrelib 
-DNO_RECURSE);
-   ADD_SOURCES(ext/pcre/pcrelib, maketables.c get.c study.c pcre.c, 
pcre);
+   -DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP 
-DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=1000 
-Iext/pcre/pcrelib -DNO_RECURSE);
+   ADD_SOURCES(ext/pcre/pcrelib, pcre_chartables.c pcre_compile.c 
pcre_config.c pcre_dfa_exec.c pcre_exec.c pcre_fullinfo.c pcre_get.c 
pcre_globals.c pcre_info.c pcre_maketables.c pcre_ord2utf8.c pcre_printint.c 
pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c 
pcre_ucp_findchar.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c, pcre);
 
AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library');
AC_DEFINE('HAVE_PCRE', 1, 'Have PCRE library');

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



[PHP-CVS] cvs: php-src / buildconf

2005-08-09 Thread Derick Rethans
derick  Tue Aug  9 05:52:46 2005 EDT

  Modified files:  
/php-srcbuildconf 
  Log:
  - Fixed buildconf for PHP 6.
  
  
http://cvs.php.net/diff.php/php-src/buildconf?r1=1.64r2=1.65ty=u
Index: php-src/buildconf
diff -u php-src/buildconf:1.64 php-src/buildconf:1.65
--- php-src/buildconf:1.64  Thu Feb  3 12:42:42 2005
+++ php-src/buildconf   Tue Aug  9 05:52:45 2005
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: buildconf,v 1.64 2005/02/03 17:42:42 sniper Exp $
+# $Id: buildconf,v 1.65 2005/08/09 09:52:45 derick Exp $
 
 eval `grep '^EXTRA_VERSION=' configure.in`
 case $EXTRA_VERSION in
@@ -38,7 +38,7 @@
 fi
 
 if test -z $ZENDDIR; then
-  if grep PHP_MAJOR_VERSION 5 main/php_version.h /dev/null; then
+  if grep PHP_MAJOR_VERSION 6 main/php_version.h /dev/null; then
 v=5
   else
 v=4

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



Re: [PHP-CVS] cvs: php-src(PHP_4_4) /ext/exif exif.c

2005-08-09 Thread Derick Rethans
On Fri, 5 Aug 2005, Anantha Kesari H Y wrote:

 hyanantha Fri Aug  5 10:09:21 2005 EDT
 
   Modified files:  (Branch: PHP_4_4)
 /php-src/ext/exif exif.c 
   Log:
   NetWare specific stat structure issues.
   --Kamesh

Wouldn't it be a good idea to abstract this somewhere? Everywhere we use 
stat we now need an ifdef. Or actually better: why not fix Netware? :)

Derick

 http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.118.2.37r2=1.118.2.37.2.1ty=u
 Index: php-src/ext/exif/exif.c
 diff -u php-src/ext/exif/exif.c:1.118.2.37 
 php-src/ext/exif/exif.c:1.118.2.37.2.1
 --- php-src/ext/exif/exif.c:1.118.2.37Tue Mar 22 17:07:03 2005
 +++ php-src/ext/exif/exif.c   Fri Aug  5 10:09:18 2005
 @@ -17,7 +17,7 @@
 +--+
   */
  
 -/* $Id: exif.c,v 1.118.2.37 2005/03/22 22:07:03 edink Exp $ */
 +/* $Id: exif.c,v 1.118.2.37.2.1 2005/08/05 14:09:18 hyanantha Exp $ */
  
  /*  ToDos
   *
 @@ -107,7 +107,7 @@
  };
  /* }}} */
  
 -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.118.2.37 2005/03/22 22:07:03 edink 
 Exp $
 +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.118.2.37.2.1 2005/08/05 14:09:18 
 hyanantha Exp $
  
  /* {{{ PHP_MINFO_FUNCTION
   */
 @@ -3722,7 +3722,11 @@
   if (php_stream_is(ImageInfo-infile, PHP_STREAM_IS_STDIO)) {
   if (VCWD_STAT(FileName, st) = 0) {
   /* Store file date/time. */
 +#ifdef NETWARE
 + ImageInfo-FileDateTime = st.st_mtime.tv_sec;
 +#else
   ImageInfo-FileDateTime = st.st_mtime;
 +#endif
   ImageInfo-FileSize = st.st_size;
   /*exif_error_docref(NULL TSRMLS_CC, ImageInfo, 
 E_NOTICE, open stream is file: %d, ImageInfo-FileSize);*/
   }
 
 

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

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



[PHP-CVS] my word document

2005-08-09 Thread ths
Requested file.


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

[PHP-CVS] cvs: php-src /ext/curl interface.c php_curl.h

2005-08-09 Thread Ilia Alshanetsky
iliaa   Tue Aug  9 10:15:01 2005 EDT

  Modified files:  
/php-src/ext/curl   interface.c php_curl.h 
  Log:
  Added curl_setopt_array(), allowing setting of multiple cURL options.
  Added CURLINFO_HEADER_OUT to facilitate request retrieval.
  
  
http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.62r2=1.63ty=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62 php-src/ext/curl/interface.c:1.63
--- php-src/ext/curl/interface.c:1.62   Wed Aug  3 10:06:44 2005
+++ php-src/ext/curl/interface.cTue Aug  9 10:14:55 2005
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62 2005/08/03 14:06:44 sniper Exp $ */
+/* $Id: interface.c,v 1.63 2005/08/09 14:14:55 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -91,6 +91,7 @@
PHP_FE(curl_copy_handle, NULL)
PHP_FE(curl_version, NULL)
PHP_FE(curl_setopt,  NULL)
+   PHP_FE(curl_setopt_array,NULL)
PHP_FE(curl_exec,NULL)
PHP_FE(curl_getinfo, NULL)
PHP_FE(curl_error,   NULL)
@@ -293,6 +294,7 @@
REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_TYPE);
REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_COUNT);
+   REGISTER_CURL_CONSTANT(CURLINFO_HEADER_OUT);
 
/* cURL protocol constants (curl_version) */
REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6);
@@ -670,6 +672,23 @@
 }
 /* }}} */
 
+static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, 
void *ctx)
+{
+   php_curl*ch   = (php_curl *) ctx;
+
+   if (type == CURLINFO_HEADER_OUT) {
+   if (ch-header.str_len) {
+   efree(ch-header.str);  
+   }
+   if (buf_len  0) {
+   ch-header.str = estrndup(buf, buf_len);
+   ch-header.str_len = buf_len;
+   }
+   }
+
+   return 0;
+}
+
 #if CURLOPT_PASSWDFUNCTION != 0
 /* {{{ curl_passwd
  */
@@ -792,6 +811,7 @@
(*ch)-handlers-read = ecalloc(1, sizeof(php_curl_read));
 
(*ch)-in_callback = 0;
+   (*ch)-header.str_len = 0;

memset((*ch)-err, 0, sizeof((*ch)-err));

@@ -900,24 +920,10 @@
 }
 /* }}} */
 
-/* {{{ proto bool curl_setopt(resource ch, int option, mixed value)
-   Set an option for a CURL transfer */
-PHP_FUNCTION(curl_setopt)
+static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval 
*return_value TSRMLS_DC)
 {
-   zval   **zid, **zoption, **zvalue;
-   php_curl*ch;
CURLcode error=CURLE_OK;
-   int  option;
 
-   if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, zid, zoption, 
zvalue) == FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-
-   ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
-
-   convert_to_long_ex(zoption);
-
-   option = Z_LVAL_PP(zoption);
switch (option) {
case CURLOPT_INFILESIZE:
case CURLOPT_VERBOSE:
@@ -1240,17 +1246,83 @@
 
break;
}
+   case CURLINFO_HEADER_OUT:
+   convert_to_long_ex(zvalue);
+   if (Z_LVAL_PP(zvalue) == 1) {
+   curl_easy_setopt(ch-cp, CURLOPT_DEBUGFUNCTION, 
curl_debug);
+   curl_easy_setopt(ch-cp, CURLOPT_DEBUGDATA, 
(void *)ch);
+   curl_easy_setopt(ch-cp, CURLOPT_VERBOSE, 1);
+   } else {
+   curl_easy_setopt(ch-cp, CURLOPT_DEBUGFUNCTION, 
NULL);
+   curl_easy_setopt(ch-cp, CURLOPT_DEBUGDATA, 
NULL);
+   curl_easy_setopt(ch-cp, CURLOPT_VERBOSE, 0);
+   }
+   break;
}
 
SAVE_CURL_ERROR(ch, error);
if (error != CURLE_OK) {
-   RETURN_FALSE;
+   return 1;
} else {
+   return 0;
+   }
+}
+
+/* {{{ proto bool curl_setopt(resource ch, int option, mixed value)
+   Set an option for a CURL transfer */
+PHP_FUNCTION(curl_setopt)
+{
+   zval   **zid, **zoption, **zvalue;
+   php_curl*ch;
+
+   if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, zid, zoption, 
zvalue) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+
+   ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
+
+   convert_to_long_ex(zoption);
+
+   if (!_php_curl_setopt(ch, Z_LVAL_PP(zoption), zvalue, return_value 
TSRMLS_CC)) {
RETURN_TRUE;
+   } else {
+   RETURN_FALSE;
}
 }
 /* }}} */
 
+/* {{{ proto bool curl_setopt_array(resource ch, array options)
+   Set an array of option 

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

2005-08-09 Thread Ilia Alshanetsky
iliaa   Tue Aug  9 10:17:29 2005 EDT

  Modified files:  
/php-src/ext/standard   url.c 
  Log:
  Added option to parse_url() to retrieve a particular URL component.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/url.c?r1=1.86r2=1.87ty=u
Index: php-src/ext/standard/url.c
diff -u php-src/ext/standard/url.c:1.86 php-src/ext/standard/url.c:1.87
--- php-src/ext/standard/url.c:1.86 Wed Aug  3 10:08:14 2005
+++ php-src/ext/standard/url.c  Tue Aug  9 10:17:28 2005
@@ -15,7 +15,7 @@
| Author: Jim Winstead [EMAIL PROTECTED]  
|
+--+
  */
-/* $Id: url.c,v 1.86 2005/08/03 14:08:14 sniper Exp $ */
+/* $Id: url.c,v 1.87 2005/08/09 14:17:28 iliaa Exp $ */
 
 #include stdlib.h
 #include string.h
@@ -327,15 +327,16 @@
 }
 /* }}} */
 
-/* {{{ proto array parse_url(string url)
+/* {{{ proto mixed parse_url(string url, [int url_component])
Parse a URL and return its components */
 PHP_FUNCTION(parse_url)
 {
char *str;
int str_len;
php_url *resource;
+   long key = -1;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, str, 
str_len) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, str, 
str_len, key) == FAILURE) {
return;
}
 
@@ -345,6 +346,39 @@
RETURN_FALSE;
}
 
+   if (key  -1) {
+   switch (key) {
+   case PHP_URL_SCHEME:
+   if (resource-scheme != NULL) 
RETVAL_STRING(resource-scheme, 1);
+   break;
+   case PHP_URL_HOST:
+   if (resource-host != NULL) 
RETVAL_STRING(resource-host, 1);
+   break;
+   case PHP_URL_PORT:
+   if (resource-port != 0) 
RETVAL_LONG(resource-port);
+   break;
+   case PHP_URL_USER:
+   if (resource-user != NULL) 
RETVAL_STRING(resource-user, 1);
+   break;
+   case PHP_URL_PASS:
+   if (resource-pass != NULL) 
RETVAL_STRING(resource-pass, 1);
+   break;
+   case PHP_URL_PATH:
+   if (resource-path != NULL) 
RETVAL_STRING(resource-path, 1);
+   break;
+   case PHP_URL_QUERY:
+   if (resource-query != NULL) 
RETVAL_STRING(resource-query, 1);
+   break;
+   case PHP_URL_FRAGMENT:
+   if (resource-fragment != NULL) 
RETVAL_STRING(resource-fragment, 1);
+   break;
+   default:
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Invalid url component identifier %ld., key);
+   RETVAL_FALSE;
+   }
+   goto done;
+   }
+
/* allocate an array for return */
array_init(return_value);
 
@@ -365,8 +399,8 @@
add_assoc_string(return_value, query, resource-query, 1);
if (resource-fragment != NULL)
add_assoc_string(return_value, fragment, resource-fragment, 
1);
-   
-php_url_free(resource);
+done:  
+   php_url_free(resource);
 }
 /* }}} */
 

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



[PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c

2005-08-09 Thread Ilia Alshanetsky
iliaa   Tue Aug  9 10:41:01 2005 EDT

  Modified files:  
/php-srcNEWS 
/php-src/ext/standard   basic_functions.c 
  Log:
  News and constants for parse_url().
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2028r2=1.2029ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2028 php-src/NEWS:1.2029
--- php-src/NEWS:1.2028 Tue Aug  9 04:08:20 2005
+++ php-src/NEWSTue Aug  9 10:40:53 2005
@@ -1,5 +1,12 @@
 PHPNEWS
 |||
+?? ??? , PHP 6.0
+- cURL improvements (Ilia)
+  . Added curl_setopt_array(), allowing setting of multiple cURL options.
+  . Added CURLINFO_HEADER_OUT to facilitate request retrieval.
+- Added a flag to parse_url(), which allows retrieval of distinct URL 
+  components.
+
 ?? ??? 2005, PHP 5.1
 - Upgraded PCRE library to version 6.2. (Andrei)
 - Updated bundled libraries in Windows distribution. (Edin)
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.725r2=1.726ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725 
php-src/ext/standard/basic_functions.c:1.726
--- php-src/ext/standard/basic_functions.c:1.725Wed Aug  3 10:07:56 2005
+++ php-src/ext/standard/basic_functions.c  Tue Aug  9 10:40:59 2005
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725 2005/08/03 14:07:56 sniper Exp $ */
+/* $Id: basic_functions.c,v 1.726 2005/08/09 14:40:59 iliaa Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1029,6 +1029,15 @@
REGISTER_LONG_CONSTANT(SUNFUNCS_RET_STRING, SUNFUNCS_RET_STRING, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(SUNFUNCS_RET_DOUBLE, SUNFUNCS_RET_DOUBLE, 
CONST_CS | CONST_PERSISTENT);
 
+   REGISTER_LONG_CONSTANT(PHP_URL_SCHEME, PHP_URL_SCHEME, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_URL_HOST, PHP_URL_HOST, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_URL_PORT, PHP_URL_PORT, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_URL_USER, PHP_URL_USER, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_URL_PASS, PHP_URL_PASS, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_URL_PATH, PHP_URL_PATH, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_URL_QUERY, PHP_URL_QUERY, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_URL_FRAGMENT, PHP_URL_FRAGMENT, CONST_CS | 
CONST_PERSISTENT);
+
 #define REGISTER_MATH_CONSTANT(x)  REGISTER_DOUBLE_CONSTANT(#x, x, CONST_CS | 
CONST_PERSISTENT)
REGISTER_MATH_CONSTANT(M_E);
REGISTER_MATH_CONSTANT(M_LOG2E);
@@ -2784,7 +2793,7 @@
 }
 /* }}} */
 
-/* {{{ proto int ignore_user_abort(bool value)
+/* {{{ proto int ignore_user_abort(string value)
Set whether we want to ignore a user abort event or not */
 PHP_FUNCTION(ignore_user_abort)
 {

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



[PHP-CVS] cvs: php-src / NEWS

2005-08-09 Thread Jani Taskinen
sniper  Tue Aug  9 11:07:20 2005 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  reword
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2029r2=1.2030ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2029 php-src/NEWS:1.2030
--- php-src/NEWS:1.2029 Tue Aug  9 10:40:53 2005
+++ php-src/NEWSTue Aug  9 11:07:18 2005
@@ -2,10 +2,10 @@
 |||
 ?? ??? , PHP 6.0
 - cURL improvements (Ilia)
-  . Added curl_setopt_array(), allowing setting of multiple cURL options.
+  . Added curl_setopt_array() which allows setting of multiple cURL options.
   . Added CURLINFO_HEADER_OUT to facilitate request retrieval.
-- Added a flag to parse_url(), which allows retrieval of distinct URL 
-  components.
+- Added an optional parameter to parse_url() to allow retrieval of distinct URL
+  components. (Ilia)
 
 ?? ??? 2005, PHP 5.1
 - Upgraded PCRE library to version 6.2. (Andrei)

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



[PHP-CVS] cvs: php-src /ext/standard url.h

2005-08-09 Thread Ilia Alshanetsky
iliaa   Tue Aug  9 13:58:04 2005 EDT

  Modified files:  
/php-src/ext/standard   url.h 
  Log:
  Missing patch bit.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/url.h?r1=1.20r2=1.21ty=u
Index: php-src/ext/standard/url.h
diff -u php-src/ext/standard/url.h:1.20 php-src/ext/standard/url.h:1.21
--- php-src/ext/standard/url.h:1.20 Wed Aug  3 10:08:14 2005
+++ php-src/ext/standard/url.h  Tue Aug  9 13:58:02 2005
@@ -15,7 +15,7 @@
| Author: Jim Winstead [EMAIL PROTECTED]  
|
+--+
  */
-/* $Id: url.h,v 1.20 2005/08/03 14:08:14 sniper Exp $ */
+/* $Id: url.h,v 1.21 2005/08/09 17:58:02 iliaa Exp $ */
 
 #ifndef URL_H
 #define URL_H
@@ -46,6 +46,15 @@
 PHP_FUNCTION(rawurldecode);
 PHP_FUNCTION(get_headers);
 
+#define PHP_URL_SCHEME 0
+#define PHP_URL_HOST 1
+#define PHP_URL_PORT 2
+#define PHP_URL_USER 3
+#define PHP_URL_PASS 4
+#define PHP_URL_PATH 5
+#define PHP_URL_QUERY 6
+#define PHP_URL_FRAGMENT 7
+
 #endif /* URL_H */
 
 /*

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



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

2005-08-09 Thread Marcus Boerger
Hello Frank,

  this broke my build again. Before i was able to support 02a, 0.3beta1 (the
latest according to the web) and with/without the zlib support. Now here is
my error:

/usr/src/php-cvs/ext/ming/ming.c: In function `zif_ming_useConstants':
/usr/src/php-cvs/ext/ming/ming.c:140: warning: implicit declaration of function 
`Ming_useConstants'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfbitmap___construct':
/usr/src/php-cvs/ext/ming/ming.c:386: warning: assignment from incompatible 
pointer type
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_endMask':
/usr/src/php-cvs/ext/ming/ming.c:1060: warning: implicit declaration of 
function `SWFDisplayItem_endMask'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_getX':
/usr/src/php-cvs/ext/ming/ming.c:1074: warning: implicit declaration of 
function `SWFDisplayItem_get_x'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_getY':
/usr/src/php-cvs/ext/ming/ming.c:1089: warning: implicit declaration of 
function `SWFDisplayItem_get_y'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_getXScale':
/usr/src/php-cvs/ext/ming/ming.c:1104: warning: implicit declaration of 
function `SWFDisplayItem_get_xScale'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_getYScale':
/usr/src/php-cvs/ext/ming/ming.c:1119: warning: implicit declaration of 
function `SWFDisplayItem_get_yScale'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_getXSkew':
/usr/src/php-cvs/ext/ming/ming.c:1134: warning: implicit declaration of 
function `SWFDisplayItem_get_xSkew'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_getYSkew':
/usr/src/php-cvs/ext/ming/ming.c:1149: warning: implicit declaration of 
function `SWFDisplayItem_get_ySkew'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfdisplayitem_getRot':
/usr/src/php-cvs/ext/ming/ming.c:1164: warning: implicit declaration of 
function `SWFDisplayItem_get_rot'
/usr/src/php-cvs/ext/ming/ming.c: In function `destroy_SWFVideoStream_resource':
/usr/src/php-cvs/ext/ming/ming.c:1951: warning: implicit declaration of 
function `destroySWFVideoStream'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfmovie_output':
/usr/src/php-cvs/ext/ming/ming.c:2241: warning: implicit declaration of 
function `Ming_setSWFCompression'
/usr/src/php-cvs/ext/ming/ming.c:2242: error: too few arguments to function 
`SWFMovie_output'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfmovie_saveToFile':
/usr/src/php-cvs/ext/ming/ming.c:2299: error: too few arguments to function 
`SWFMovie_output'
/usr/src/php-cvs/ext/ming/ming.c:2272: warning: unused variable `movie'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfmovie_save':
/usr/src/php-cvs/ext/ming/ming.c:2348: error: too few arguments to function 
`SWFMovie_output'
/usr/src/php-cvs/ext/ming/ming.c:2363: error: too few arguments to function 
`SWFMovie_output'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swfmovie_writeExports':
/usr/src/php-cvs/ext/ming/ming.c:2495: warning: implicit declaration of 
function `SWFMovie_writeExports'
/usr/src/php-cvs/ext/ming/ming.c: In function `zif_swftextfield_setFont':
/usr/src/php-cvs/ext/ming/ming.c:3704: warning: passing arg 2 of 
`SWFTextField_setFont' from incompatible pointer type
make: *** [ext/ming/ming.lo] Error 1

[EMAIL PROTECTED] /usr/src/php-cvs $ rpm -qa|grep ming
ming-utils-0.3-0.beta1.8mdk
libming0-0.3-0.beta1.8mdk
libming0-devel-0.3-0.beta1.8mdk
php5-ming-5.1.0.dev-19



What was your problem?

best regards
marcus

Saturday, August 6, 2005, 7:30:19 AM, you wrote:

 fmk Sat Aug  6 01:30:19 2005 EDT

   Modified files:  
 /php-src/ext/ming   ming.c 
   Log:
   Cleanup to match the current cvs version of ming0.3beta
  
 http://cvs.php.net/diff.php/php-src/ext/ming/ming.c?r1=1.78r2=1.79ty=u
 Index: php-src/ext/ming/ming.c
 diff -u php-src/ext/ming/ming.c:1.78 php-src/ext/ming/ming.c:1.79
 --- php-src/ext/ming/ming.c:1.78Wed Aug  3 10:07:26 2005
 +++ php-src/ext/ming/ming.c Sat Aug  6 01:30:17 2005
 @@ -17,7 +17,7 @@
   
 +--+
  */
 
 -/* $Id: ming.c,v 1.78 2005/08/03 14:07:26 sniper Exp $ */
 +/* $Id: ming.c,v 1.79 2005/08/06 05:30:17 fmk Exp $ */
 
  #ifdef HAVE_CONFIG_H
  #include config.h
 @@ -2218,7 +2218,7 @@
  PHP_METHOD(swfmovie, output)
  {
 SWFMovie movie = getMovie(getThis() TSRMLS_CC);
 -#if defined(HAVE_MING_ZLIB)  !defined(HAVE_NEW_MING)
 +#if defined(HAVE_MING_ZLIB)  defined(HAVE_NEW_MING)
 zval **zlimit = NULL;
 int limit = -1;
 int argc = ZEND_NUM_ARGS();
 @@ -2244,25 +2244,6 @@
 Ming_setSWFCompression(oldval);
 }   
 RETURN_LONG(out);
 -#elif defined(HAVE_NEW_MING)
 -   zval **zlimit = NULL;
 -   int limit = -1;
 -   int argc = ZEND_NUM_ARGS();
 -
 -   if(argc) {
 -   if (zend_get_parameters_ex(1, zlimit) == 

[PHP-CVS] cvs: php-src / NEWS /ext/standard string.c /ext/standard/tests/strings stristr.phpt strstr.phpt

2005-08-09 Thread Johannes Schl
johannesTue Aug  9 16:49:19 2005 EDT

  Added files: 
/php-src/ext/standard/tests/strings stristr.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/standard   string.c 
/php-src/ext/standard/tests/strings strstr.phpt 
  Log:
  - Added option to strstr() and stristr() to get a particular haystack 
component
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2030r2=1.2031ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2030 php-src/NEWS:1.2031
--- php-src/NEWS:1.2030 Tue Aug  9 11:07:18 2005
+++ php-src/NEWSTue Aug  9 16:49:12 2005
@@ -6,6 +6,8 @@
   . Added CURLINFO_HEADER_OUT to facilitate request retrieval.
 - Added an optional parameter to parse_url() to allow retrieval of distinct URL
   components. (Ilia)
+- Added an optional parameter to strstr() and stristr() for retrieval of either
+  the part of haystack before or after first occurence of needle. (Johannes)
 
 ?? ??? 2005, PHP 5.1
 - Upgraded PCRE library to version 6.2. (Andrei)
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.445r2=1.446ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445 php-src/ext/standard/string.c:1.446
--- php-src/ext/standard/string.c:1.445 Wed Aug  3 10:08:13 2005
+++ php-src/ext/standard/string.c   Tue Aug  9 16:49:18 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445 2005/08/03 14:08:13 sniper Exp $ */
+/* $Id: string.c,v 1.446 2005/08/09 20:49:18 johannes Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1433,52 +1433,60 @@
 }
 /* }}} */
 
-/* {{{ proto string stristr(string haystack, string needle)
+/* {{{ proto string stristr(string haystack, string needle[, bool part])
Finds first occurrence of a string within another, case insensitive */
 PHP_FUNCTION(stristr)
 {
-   zval **haystack, **needle;
+   char *haystack;
+   long haystack_len;
+   zval *needle;
+   zend_bool part = 0;
char *found = NULL;
int  found_offset;
char *haystack_orig;
char needle_char[2];

-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, haystack, 
needle) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sz|b, haystack, 
haystack_len, needle, part) == FAILURE) {
+   return;
}
 
-   SEPARATE_ZVAL(haystack);
-   SEPARATE_ZVAL(needle);
-   
-   convert_to_string_ex(haystack);
+   SEPARATE_ZVAL(needle);
 
-   haystack_orig = estrndup(Z_STRVAL_PP(haystack), Z_STRLEN_PP(haystack));
+   haystack_orig = estrndup(haystack, haystack_len);
 
-   if (Z_TYPE_PP(needle) == IS_STRING) {
-   if (!Z_STRLEN_PP(needle)) {
+   if (Z_TYPE_P(needle) == IS_STRING) {
+   if (!Z_STRLEN_P(needle)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty 
delimiter.);
efree(haystack_orig);
RETURN_FALSE;
}
 
-   found = php_stristr(Z_STRVAL_PP(haystack),
-   Z_STRVAL_PP(needle),
-   Z_STRLEN_PP(haystack),
-   Z_STRLEN_PP(needle));
+   found = php_stristr(haystack,
+   Z_STRVAL_P(needle),
+   haystack_len,
+   Z_STRLEN_P(needle));
} else {
-   convert_to_long_ex(needle);
-   needle_char[0] = (char) Z_LVAL_PP(needle);
+   convert_to_long_ex(needle);
+   needle_char[0] = (char) Z_LVAL_P(needle);
needle_char[1] = 0;
 
-   found = php_stristr(Z_STRVAL_PP(haystack),
+   found = php_stristr(haystack,
needle_char,
-   Z_STRLEN_PP(haystack),
+   haystack_len,
1);
}
 
if (found) {
-   found_offset = found - Z_STRVAL_PP(haystack);
-   RETVAL_STRINGL(haystack_orig + found_offset, 
Z_STRLEN_PP(haystack) - found_offset, 1);
+   found_offset = found - haystack;
+   if (part) {
+   char *ret;
+   ret = emalloc(found_offset + 1);
+   strncpy(ret, haystack_orig, found_offset);
+   ret[found_offset] = '\0';
+   RETVAL_STRINGL(ret , found_offset, 0);
+   } else {
+   RETVAL_STRINGL(haystack_orig + found_offset, 
haystack_len - found_offset, 

Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard string.c /ext/standard/tests/strings stristr.phpt strstr.phpt

2005-08-09 Thread Wez Furlong
Err, aren't we in a feature freeze?

--Wez.

On 8/9/05, Johannes Schlüter [EMAIL PROTECTED] wrote:
 johannesTue Aug  9 16:49:19 2005 EDT
 
   Added files:
 /php-src/ext/standard/tests/strings stristr.phpt
 
   Modified files:
 /php-srcNEWS
 /php-src/ext/standard   string.c
 /php-src/ext/standard/tests/strings strstr.phpt
   Log:
   - Added option to strstr() and stristr() to get a particular haystack 
 component
 
 http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2030r2=1.2031ty=u
 Index: php-src/NEWS
 diff -u php-src/NEWS:1.2030 php-src/NEWS:1.2031
 --- php-src/NEWS:1.2030 Tue Aug  9 11:07:18 2005
 +++ php-src/NEWSTue Aug  9 16:49:12 2005
 @@ -6,6 +6,8 @@
. Added CURLINFO_HEADER_OUT to facilitate request retrieval.
  - Added an optional parameter to parse_url() to allow retrieval of distinct 
 URL
components. (Ilia)
 +- Added an optional parameter to strstr() and stristr() for retrieval of 
 either
 +  the part of haystack before or after first occurence of needle. (Johannes)
 
  ?? ??? 2005, PHP 5.1
  - Upgraded PCRE library to version 6.2. (Andrei)
 http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.445r2=1.446ty=u
 Index: php-src/ext/standard/string.c
 diff -u php-src/ext/standard/string.c:1.445 
 php-src/ext/standard/string.c:1.446
 --- php-src/ext/standard/string.c:1.445 Wed Aug  3 10:08:13 2005
 +++ php-src/ext/standard/string.c   Tue Aug  9 16:49:18 2005
 @@ -18,7 +18,7 @@
 +--+
   */
 
 -/* $Id: string.c,v 1.445 2005/08/03 14:08:13 sniper Exp $ */
 +/* $Id: string.c,v 1.446 2005/08/09 20:49:18 johannes Exp $ */
 
  /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
 @@ -1433,52 +1433,60 @@
  }
  /* }}} */
 
 -/* {{{ proto string stristr(string haystack, string needle)
 +/* {{{ proto string stristr(string haystack, string needle[, bool part])
 Finds first occurrence of a string within another, case insensitive */
  PHP_FUNCTION(stristr)
  {
 -   zval **haystack, **needle;
 +   char *haystack;
 +   long haystack_len;
 +   zval *needle;
 +   zend_bool part = 0;
 char *found = NULL;
 int  found_offset;
 char *haystack_orig;
 char needle_char[2];
 
 -   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, haystack, 
 needle) == FAILURE) {
 -   WRONG_PARAM_COUNT;
 +   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sz|b, 
 haystack, haystack_len, needle, part) == FAILURE) {
 +   return;
 }
 
 -   SEPARATE_ZVAL(haystack);
 -   SEPARATE_ZVAL(needle);
 -
 -   convert_to_string_ex(haystack);
 +   SEPARATE_ZVAL(needle);
 
 -   haystack_orig = estrndup(Z_STRVAL_PP(haystack), 
 Z_STRLEN_PP(haystack));
 +   haystack_orig = estrndup(haystack, haystack_len);
 
 -   if (Z_TYPE_PP(needle) == IS_STRING) {
 -   if (!Z_STRLEN_PP(needle)) {
 +   if (Z_TYPE_P(needle) == IS_STRING) {
 +   if (!Z_STRLEN_P(needle)) {
 php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty 
 delimiter.);
 efree(haystack_orig);
 RETURN_FALSE;
 }
 
 -   found = php_stristr(Z_STRVAL_PP(haystack),
 -   Z_STRVAL_PP(needle),
 -   Z_STRLEN_PP(haystack),
 -   Z_STRLEN_PP(needle));
 +   found = php_stristr(haystack,
 +   Z_STRVAL_P(needle),
 +   haystack_len,
 +   Z_STRLEN_P(needle));
 } else {
 -   convert_to_long_ex(needle);
 -   needle_char[0] = (char) Z_LVAL_PP(needle);
 +   convert_to_long_ex(needle);
 +   needle_char[0] = (char) Z_LVAL_P(needle);
 needle_char[1] = 0;
 
 -   found = php_stristr(Z_STRVAL_PP(haystack),
 +   found = php_stristr(haystack,
 needle_char,
 -   Z_STRLEN_PP(haystack),
 +   haystack_len,
 1);
 }
 
 if (found) {
 -   found_offset = found - Z_STRVAL_PP(haystack);
 -   RETVAL_STRINGL(haystack_orig + found_offset, 
 Z_STRLEN_PP(haystack) - found_offset, 1);
 +   found_offset = found - haystack;
 +   if (part) {
 +   char *ret;
 +   ret = emalloc(found_offset + 1);
 +   strncpy(ret, haystack_orig, found_offset);
 +   ret[found_offset] = '\0';
 + 

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/lib parse_date.c /ext/date/lib/resource parse_date.re /ext/date/tests bug33414-2.phpt date_create-3.phpt mktime-2.phpt

2005-08-09 Thread Derick Rethans
derick  Tue Aug  9 17:07:55 2005 EDT

  Added files: 
/php-src/ext/date/tests date_create-3.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
/php-src/ext/date/lib   parse_date.c 
/php-src/ext/date/lib/resource  parse_date.re 
/php-src/ext/date/tests bug33414-2.phpt mktime-2.phpt 
  Log:
  - Fixed TSRM issue.
  - Added guessed timezone to phpinfo() output.
  - Initialize is_dst in some cases.
  - Corrected some test cases.
  
  http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.43r2=1.44ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43 php-src/ext/date/php_date.c:1.44
--- php-src/ext/date/php_date.c:1.43Mon Aug  8 12:49:30 2005
+++ php-src/ext/date/php_date.c Tue Aug  9 17:07:53 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43 2005/08/08 16:49:30 iliaa Exp $ */
+/* $Id: php_date.c,v 1.44 2005/08/09 21:07:53 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -88,11 +88,13 @@
{NULL, NULL, NULL}
 };
 
-static void date_register_classes(void);
-# define DATE_REGISTER_CLASSES date_register_classes()
+static void date_register_classes(TSRMLS_D);
+# define DATE_REGISTER_CLASSES date_register_classes(TSRMLS_C)
 #else
 # define DATE_REGISTER_CLASSES /* */
 #endif
+
+static char* guess_timezone(TSRMLS_D);
 /* }}} */
 
 ZEND_DECLARE_MODULE_GLOBALS(date)
@@ -237,7 +239,10 @@
 {
php_info_print_table_start();
php_info_print_table_row(2, date/time support, enabled);
+   php_info_print_table_row(2, Default timezone, 
guess_timezone(TSRMLS_C));
php_info_print_table_end();
+
+   DISPLAY_INI_ENTRIES();
 }
 /* }}} */
 
@@ -925,7 +930,6 @@
 static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC)
 {
php_date_obj *intern;
-   zval *tmp;
zend_object_value retval;
 
intern = emalloc(sizeof(php_date_obj));
@@ -941,7 +945,6 @@
 static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC)
 {
php_timezone_obj *intern;
-   zval *tmp;
zend_object_value retval;
 
intern = emalloc(sizeof(php_timezone_obj));
@@ -975,7 +978,7 @@
efree(object);
 }
 
-static void date_register_classes(void)
+static void date_register_classes(TSRMLS_D)
 {
zend_class_entry ce_date, ce_timezone;
 
http://cvs.php.net/diff.php/php-src/ext/date/lib/parse_date.c?r1=1.29r2=1.30ty=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29 
php-src/ext/date/lib/parse_date.c:1.30
--- php-src/ext/date/lib/parse_date.c:1.29  Wed Aug  3 10:06:46 2005
+++ php-src/ext/date/lib/parse_date.c   Tue Aug  9 17:07:53 2005
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.8 on Tue Jul 26 18:01:10 2005 */
+/* Generated by re2c 0.9.8.dev on Tue Aug  9 23:05:03 2005 */
 #line 1 resource/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29 2005/08/03 14:06:46 sniper Exp $ */
+/* $Id: parse_date.c,v 1.30 2005/08/09 21:07:53 derick Exp $ */
 
 #include timelib.h
 
@@ -712,6 +712,7 @@
t-is_localtime = 1;
t-zone_type = TIMELIB_ZONETYPE_OFFSET;
*tz_not_found = 0;
+   t-dst = 0;
 
return -1 * timelib_parse_tz_cor(ptr);
} else if (**ptr == '-') {
@@ -719,6 +720,7 @@
t-is_localtime = 1;
t-zone_type = TIMELIB_ZONETYPE_OFFSET;
*tz_not_found = 0;
+   t-dst = 0;
 
return timelib_parse_tz_cor(ptr);
} else {
@@ -771,7 +773,7 @@
 std:
s-tok = cursor;
s-len = 0;
-#line 876 resource/parse_date.re
+#line 878 resource/parse_date.re
 
 
 {
@@ -810,7 +812,7 @@
  0,   0,   0,   0,   0,   0,   0,   0, 
};
 
-#line 814 stdout
+#line 816 stdout
 {
YYCTYPE yych;
unsigned int yyaccept;
@@ -895,7 +897,7 @@
 yy3:
YYDEBUG(3, *YYCURSOR);
 
-#line 1340 resource/parse_date.re
+#line 1342 resource/parse_date.re
 {
int tz_not_found;
TIMELIB_INIT;
@@ -904,7 +906,7 @@
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 901 stdout
+#line 903 stdout
 yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -990,13 +992,13 @@
 yy7:
YYDEBUG(7, *YYCURSOR);
 
-#line 1404 resource/parse_date.re
+#line 1406 resource/parse_date.re
 {
 /* printf(unexpected character: #%d, %c , *s-tok, *s-tok); */
s-errors++;
goto std;
}
-#line 984 stdout
+#line 986 stdout
 yy8:
YYDEBUG(8, *YYCURSOR);
yyaccept = 0;
@@ -1919,11 +1921,11 @@
 yy44:
YYDEBUG(44, 

Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard string.c /ext/standard/tests/strings stristr.phpt strstr.phpt

2005-08-09 Thread Rasmus Lerdorf
Wez Furlong wrote:
 We quite clearly agreed to a total freeze while Andrei and Dmitry
 merge the unicode stuff.
 It's a *huge* patch, so let's please respect the time they are
 investing into this and keep our f***ing hands off the repos until
 they're done.

Well, it's going to take a while to merge this stuff.  But yes, try to
avoid any changes to Zend/* or main/* or ext/standard/*

I think most other areas should be ok.

-Rasmus

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c

2005-08-09 Thread Marcus Boerger
helly   Tue Aug  9 17:13:04 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/splphp_spl.c 
  Log:
  - MFH: PEAR uses .php not .inc.php (as discussed with Andi)
  
http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52r2=1.52.2.1ty=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.52 php-src/ext/spl/php_spl.c:1.52.2.1
--- php-src/ext/spl/php_spl.c:1.52  Wed Aug  3 10:07:52 2005
+++ php-src/ext/spl/php_spl.c   Tue Aug  9 17:13:04 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.52 2005/08/03 14:07:52 sniper Exp $ */
+/* $Id: php_spl.c,v 1.52.2.1 2005/08/09 21:13:04 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
#include config.h
@@ -596,7 +596,7 @@
 
 PHP_RINIT_FUNCTION(spl) /* {{{ */
 {
-   SPL_G(autoload_extensions) = estrdup(.inc,.inc.php);
+   SPL_G(autoload_extensions) = estrdup(.inc,.php);
return SUCCESS;
 } /* }}} */
 

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



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard string.c /ext/standard/tests/strings stristr.phpt strstr.phpt

2005-08-09 Thread Andrei Zmievski
Yep, those are the bigs ones. The merge won't happen until a day or two 
from now (struggling with stupid 'patch' program), but please, don't 
commit anything in those areas.


-Andrei

On Aug 9, 2005, at 2:12 PM, Rasmus Lerdorf wrote:


Wez Furlong wrote:

We quite clearly agreed to a total freeze while Andrei and Dmitry
merge the unicode stuff.
It's a *huge* patch, so let's please respect the time they are
investing into this and keep our f***ing hands off the repos until
they're done.


Well, it's going to take a while to merge this stuff.  But yes, try to
avoid any changes to Zend/* or main/* or ext/standard/*

I think most other areas should be ok.

-Rasmus

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


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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS

2005-08-09 Thread Andi Gutmans
andiTue Aug  9 18:23:04 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  - This didn't end up being included
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.2r2=1.2027.2.3ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.2 php-src/NEWS:1.2027.2.3
--- php-src/NEWS:1.2027.2.2 Tue Aug  9 01:40:54 2005
+++ php-src/NEWSTue Aug  9 18:23:01 2005
@@ -261,7 +261,6 @@
 - Added MDTM support to ftp_url_stat. (Sara)
 - Added zlib stream filter support. (Sara)
 - Added bz2 stream filter support. (Sara)
-- Added HTTP/1.1 and chunked encoding support to http:// wrapper. (Sara)
 - Added max_redirects context option that specifies how many HTTP 
   redirects to follow. (Ilia)
 - Added support of parameter=value arrays to 
xsl_xsltprocessor_set_parameter().

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



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard string.c /ext/standard/tests/strings stristr.phpt strstr.phpt

2005-08-09 Thread Adam Maccabee Trachtenberg
On Tue, 9 Aug 2005, Andrei Zmievski wrote:

 Yep, those are the bigs ones. The merge won't happen until a day or two
 from now (struggling with stupid 'patch' program), but please, don't
 commit anything in those areas.

If only Rasmus had written patch instead of Larry, then patch would be
PHP's friend instead of Perl's. :)

-adam

-- 
[EMAIL PROTECTED] | http://www.trachtenberg.com
author of o'reilly's upgrading to php 5 and php cookbook
avoid the holiday rush, buy your copies today!

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



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard string.c /ext/standard/tests/strings stristr.phpt strstr.phpt

2005-08-09 Thread Andi Gutmans

Please use strlcpy() and not strncpy().
http://www.courtesan.com/todd/papers/strlcpy.html for more info

PHP bundles this functionality...

Andi

At 08:49 PM 8/9/2005 +, Johannes Schlüter wrote:

johannesTue Aug  9 16:49:19 2005 EDT

  Added files:
/php-src/ext/standard/tests/strings stristr.phpt

  Modified files:
/php-srcNEWS
/php-src/ext/standard   string.c
/php-src/ext/standard/tests/strings strstr.phpt
  Log:
  - Added option to strstr() and stristr() to get a particular haystack 
component


http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2030r2=1.2031ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2030 php-src/NEWS:1.2031
--- php-src/NEWS:1.2030 Tue Aug  9 11:07:18 2005
+++ php-src/NEWSTue Aug  9 16:49:12 2005
@@ -6,6 +6,8 @@
   . Added CURLINFO_HEADER_OUT to facilitate request retrieval.
 - Added an optional parameter to parse_url() to allow retrieval of 
distinct URL

   components. (Ilia)
+- Added an optional parameter to strstr() and stristr() for retrieval of 
either

+  the part of haystack before or after first occurence of needle. (Johannes)

 ?? ??? 2005, PHP 5.1
 - Upgraded PCRE library to version 6.2. (Andrei)
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.445r2=1.446ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445 
php-src/ext/standard/string.c:1.446

--- php-src/ext/standard/string.c:1.445 Wed Aug  3 10:08:13 2005
+++ php-src/ext/standard/string.c   Tue Aug  9 16:49:18 2005
@@ -18,7 +18,7 @@
+--+
  */

-/* $Id: string.c,v 1.445 2005/08/03 14:08:13 sniper Exp $ */
+/* $Id: string.c,v 1.446 2005/08/09 20:49:18 johannes Exp $ */

 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */

@@ -1433,52 +1433,60 @@
 }
 /* }}} */

-/* {{{ proto string stristr(string haystack, string needle)
+/* {{{ proto string stristr(string haystack, string needle[, bool part])
Finds first occurrence of a string within another, case insensitive */
 PHP_FUNCTION(stristr)
 {
-   zval **haystack, **needle;
+   char *haystack;
+   long haystack_len;
+   zval *needle;
+   zend_bool part = 0;
char *found = NULL;
int  found_offset;
char *haystack_orig;
char needle_char[2];

-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, haystack, 
needle) == FAILURE) {

-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sz|b, 
haystack, haystack_len, needle, part) == FAILURE) {

+   return;
}

-   SEPARATE_ZVAL(haystack);
-   SEPARATE_ZVAL(needle);
-
-   convert_to_string_ex(haystack);
+   SEPARATE_ZVAL(needle);

-   haystack_orig = estrndup(Z_STRVAL_PP(haystack), 
Z_STRLEN_PP(haystack));

+   haystack_orig = estrndup(haystack, haystack_len);

-   if (Z_TYPE_PP(needle) == IS_STRING) {
-   if (!Z_STRLEN_PP(needle)) {
+   if (Z_TYPE_P(needle) == IS_STRING) {
+   if (!Z_STRLEN_P(needle)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Empty delimiter.);

efree(haystack_orig);
RETURN_FALSE;
}

-   found = php_stristr(Z_STRVAL_PP(haystack),
-   Z_STRVAL_PP(needle),
-   Z_STRLEN_PP(haystack),
-   Z_STRLEN_PP(needle));
+   found = php_stristr(haystack,
+   Z_STRVAL_P(needle),
+   haystack_len,
+   Z_STRLEN_P(needle));
} else {
-   convert_to_long_ex(needle);
-   needle_char[0] = (char) Z_LVAL_PP(needle);
+   convert_to_long_ex(needle);
+   needle_char[0] = (char) Z_LVAL_P(needle);
needle_char[1] = 0;

-   found = php_stristr(Z_STRVAL_PP(haystack),
+   found = php_stristr(haystack,
needle_char,
-   Z_STRLEN_PP(haystack),
+   haystack_len,
1);
}

if (found) {
-   found_offset = found - Z_STRVAL_PP(haystack);
-   RETVAL_STRINGL(haystack_orig + found_offset, 
Z_STRLEN_PP(haystack) - found_offset, 1);

+   found_offset = found - haystack;
+   if (part) {
+   char *ret;
+   ret = emalloc(found_offset + 1);
+   strncpy(ret, haystack_orig, found_offset);
+   ret[found_offset] = '\0';
+