Re: [PHP-CVS] cvs: php-src /ext/xmldbx CREDITS config.m4 php_xmldbx.h sessionxml.php xmldbx.c xmldbx.h xmldbx.php

2006-01-27 Thread Ilia Alshanetsky
Why was this committed to core and not to pecl, as is the procedure for 
all new extensions?


Ilia

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



[PHP-CVS] cvs: php-src /ext/date php_date.c php_date.h

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:18:18 2006 UTC

  Modified files:  
/php-src/ext/date   php_date.c php_date.h 
  Log:
  MFB51 Export symbols that will allow building WDDX as shared object
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.83&r2=1.84&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.83 php-src/ext/date/php_date.c:1.84
--- php-src/ext/date/php_date.c:1.83Tue Jan 17 12:18:52 2006
+++ php-src/ext/date/php_date.c Sat Jan 28 06:18:18 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.83 2006/01/17 12:18:52 dmitry Exp $ */
+/* $Id: php_date.c,v 1.84 2006/01/28 06:18:18 fmk Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -908,7 +908,7 @@
 /* }}} */
 
 /* {{{ php_parse_date: Backwards compability function */
-signed long php_parse_date(char *string, signed long *now)
+PHPAPI signed long php_parse_date(char *string, signed long *now)
 {
timelib_time *parsed_time;
int   error1, error2;
http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.h?r1=1.27&r2=1.28&diff_format=u
Index: php-src/ext/date/php_date.h
diff -u php-src/ext/date/php_date.h:1.27 php-src/ext/date/php_date.h:1.28
--- php-src/ext/date/php_date.h:1.27Wed Jan  4 12:57:03 2006
+++ php-src/ext/date/php_date.h Sat Jan 28 06:18:18 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_date.h,v 1.27 2006/01/04 12:57:03 derick Exp $ */
+/* $Id: php_date.h,v 1.28 2006/01/28 06:18:18 fmk Exp $ */
 
 #ifndef PHP_DATE_H
 #define PHP_DATE_H
@@ -96,7 +96,7 @@
 #endif
 
 /* Backwards compability wrapper */
-signed long php_parse_date(char *string, signed long *now);
+PHPAPI signed long php_parse_date(char *string, signed long *now);
 PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt);
 PHPAPI int php_idate(char format, time_t ts, int localtime);
 #if HAVE_STRFTIME

-- 
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/date php_date.c php_date.h

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:18:01 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/date   php_date.c php_date.h 
  Log:
  Export symbols that will allow building WDDX as shared object
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.43.2.38&r2=1.43.2.39&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.38 
php-src/ext/date/php_date.c:1.43.2.39
--- php-src/ext/date/php_date.c:1.43.2.38   Wed Jan 18 21:40:38 2006
+++ php-src/ext/date/php_date.c Sat Jan 28 06:18:01 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.38 2006/01/18 21:40:38 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.39 2006/01/28 06:18:01 fmk Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -786,7 +786,7 @@
 /* }}} */
 
 /* {{{ php_parse_date: Backwards compability function */
-signed long php_parse_date(char *string, signed long *now)
+PHPAPI signed long php_parse_date(char *string, signed long *now)
 {
timelib_time *parsed_time;
int   error1, error2;
http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.h?r1=1.17.2.9&r2=1.17.2.10&diff_format=u
Index: php-src/ext/date/php_date.h
diff -u php-src/ext/date/php_date.h:1.17.2.9 
php-src/ext/date/php_date.h:1.17.2.10
--- php-src/ext/date/php_date.h:1.17.2.9Wed Jan  4 21:31:29 2006
+++ php-src/ext/date/php_date.h Sat Jan 28 06:18:01 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_date.h,v 1.17.2.9 2006/01/04 21:31:29 derick Exp $ */
+/* $Id: php_date.h,v 1.17.2.10 2006/01/28 06:18:01 fmk Exp $ */
 
 #ifndef PHP_DATE_H
 #define PHP_DATE_H
@@ -95,7 +95,7 @@
 #endif
 
 /* Backwards compability wrapper */
-signed long php_parse_date(char *string, signed long *now);
+PHPAPI signed long php_parse_date(char *string, signed long *now);
 PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt);
 PHPAPI int php_idate(char format, time_t ts, int localtime);
 #if HAVE_STRFTIME

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



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

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:17:09 2006 UTC

  Modified files:  
/php-src/ext/wddx   wddx.c 
  Log:
  MFB51 Add header so WDDX builds as shared
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/wddx/wddx.c?r1=1.128&r2=1.129&diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.128 php-src/ext/wddx/wddx.c:1.129
--- php-src/ext/wddx/wddx.c:1.128   Sun Jan  1 13:09:56 2006
+++ php-src/ext/wddx/wddx.c Sat Jan 28 06:17:09 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: wddx.c,v 1.128 2006/01/01 13:09:56 sniper Exp $ */
+/* $Id: wddx.c,v 1.129 2006/01/28 06:17:09 fmk Exp $ */
 
 #include "php.h"
 
@@ -35,6 +35,7 @@
 #include "ext/standard/html.h"
 #include "ext/standard/php_string.h"
 #include "ext/date/php_date.h"
+#include "zend_globals.h"
 
 #define WDDX_BUF_LEN   256
 #define PHP_CLASS_NAME_VAR "php_class_name"

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



[PHP-CVS] cvs: php-src /ext/session php_session.h session.c

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:16:45 2006 UTC

  Modified files:  
/php-src/ext/sessionphp_session.h session.c 
  Log:
  MFB51 Export symbols that will allow building WDDX as shared object
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/session/php_session.h?r1=1.102&r2=1.103&diff_format=u
Index: php-src/ext/session/php_session.h
diff -u php-src/ext/session/php_session.h:1.102 
php-src/ext/session/php_session.h:1.103
--- php-src/ext/session/php_session.h:1.102 Sun Jan  1 13:09:53 2006
+++ php-src/ext/session/php_session.h   Sat Jan 28 06:16:45 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_session.h,v 1.102 2006/01/01 13:09:53 sniper Exp $ */
+/* $Id: php_session.h,v 1.103 2006/01/28 06:16:45 fmk Exp $ */
 
 #ifndef PHP_SESSION_H
 #define PHP_SESSION_H
@@ -184,9 +184,9 @@
 
 PHPAPI void session_adapt_url(const char *, size_t, char **, size_t * 
TSRMLS_DC);
 
-void php_add_session_var(char *name, size_t namelen TSRMLS_DC);
-void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC);
-int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC);
+PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC);
+PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC);
+PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC);
 
 PHPAPI int php_session_register_module(ps_module *);
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/session/session.c?r1=1.426&r2=1.427&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.426 php-src/ext/session/session.c:1.427
--- php-src/ext/session/session.c:1.426 Sun Jan 15 16:51:34 2006
+++ php-src/ext/session/session.c   Sat Jan 28 06:16:45 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.426 2006/01/15 16:51:34 iliaa Exp $ */
+/* $Id: session.c,v 1.427 2006/01/28 06:16:45 fmk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -279,7 +279,7 @@
 
 #define MAX_STR 512
 
-void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
+PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
 {
zval **sym_track = NULL;

@@ -320,7 +320,7 @@
}
 }
 
-void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC)
+PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC)
 {
if (PG(register_globals)) {
zval **old_symbol;
@@ -360,7 +360,7 @@
}
 }
 
-int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC)
+PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC)
 {
int ret = FAILURE;
 

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



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c basic_functions.h incomplete_class.c php_incomplete_class.h

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:16:32 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c basic_functions.h 
incomplete_class.c php_incomplete_class.h 
  Log:
  MFB51 Export symbols that will allow building WDDX as shared object
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.748&r2=1.749&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.748 
php-src/ext/standard/basic_functions.c:1.749
--- php-src/ext/standard/basic_functions.c:1.748Tue Jan 17 12:18:52 2006
+++ php-src/ext/standard/basic_functions.c  Sat Jan 28 06:16:32 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.748 2006/01/17 12:18:52 dmitry Exp $ */
+/* $Id: basic_functions.c,v 1.749 2006/01/28 06:16:32 fmk Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -99,7 +99,7 @@
 
 
 #ifdef ZTS
-int basic_globals_id;
+PHPAPI int basic_globals_id;
 #else
 php_basic_globals basic_globals;
 #endif
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.h?r1=1.142&r2=1.143&diff_format=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.142 
php-src/ext/standard/basic_functions.h:1.143
--- php-src/ext/standard/basic_functions.h:1.142Sun Jan  1 13:09:54 2006
+++ php-src/ext/standard/basic_functions.h  Sat Jan 28 06:16:32 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: basic_functions.h,v 1.142 2006/01/01 13:09:54 sniper Exp $ */
+/* $Id: basic_functions.h,v 1.143 2006/01/28 06:16:32 fmk Exp $ */
 
 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -216,7 +216,7 @@
 
 #ifdef ZTS
 #define BG(v) TSRMG(basic_globals_id, php_basic_globals *, v)
-extern int basic_globals_id;
+PHPAPI extern int basic_globals_id;
 #else
 #define BG(v) (basic_globals.v)
 extern php_basic_globals basic_globals;
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/incomplete_class.c?r1=1.29&r2=1.30&diff_format=u
Index: php-src/ext/standard/incomplete_class.c
diff -u php-src/ext/standard/incomplete_class.c:1.29 
php-src/ext/standard/incomplete_class.c:1.30
--- php-src/ext/standard/incomplete_class.c:1.29Sun Jan  1 13:09:55 2006
+++ php-src/ext/standard/incomplete_class.c Sat Jan 28 06:16:32 2006
@@ -17,7 +17,7 @@
  */
 
 
-/* $Id: incomplete_class.c,v 1.29 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: incomplete_class.c,v 1.30 2006/01/28 06:16:32 fmk Exp $ */
 
 #include "php.h"
 #include "basic_functions.h"
@@ -122,7 +122,7 @@
 
 /* {{{ php_lookup_class_name
  */
-char *php_lookup_class_name(zval *object, zend_uint *nlen)
+PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen)
 {
zval **val;
char *retval = NULL;
@@ -144,7 +144,7 @@
 
 /* {{{ php_store_class_name
  */
-void php_store_class_name(zval *object, const char *name, zend_uint len)
+PHPAPI void php_store_class_name(zval *object, const char *name, zend_uint len)
 {
zval *val;
TSRMLS_FETCH();
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_incomplete_class.h?r1=1.18&r2=1.19&diff_format=u
Index: php-src/ext/standard/php_incomplete_class.h
diff -u php-src/ext/standard/php_incomplete_class.h:1.18 
php-src/ext/standard/php_incomplete_class.h:1.19
--- php-src/ext/standard/php_incomplete_class.h:1.18Sun Jan  1 13:09:55 2006
+++ php-src/ext/standard/php_incomplete_class.h Sat Jan 28 06:16:32 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_incomplete_class.h,v 1.18 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: php_incomplete_class.h,v 1.19 2006/01/28 06:16:32 fmk Exp $ */
 
 #ifndef PHP_INCOMPLETE_CLASS_H
 #define PHP_INCOMPLETE_CLASS_H
@@ -55,8 +55,8 @@

 zend_class_entry *php_create_incomplete_class(TSRMLS_D);
 
-char *php_lookup_class_name(zval *object, zend_uint *nlen);
-void  php_store_class_name(zval *object, const char *name, zend_uint len);
+PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen);
+PHPAPI void  php_store_class_name(zval *object, const char *name, zend_uint 
len);
 
 #ifdef __cplusplus
 };

-- 
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/wddx wddx.c

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:15:25 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/wddx   wddx.c 
  Log:
  Add header so WDDX builds as shared
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.8&r2=1.119.2.9&diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.119.2.8 php-src/ext/wddx/wddx.c:1.119.2.9
--- php-src/ext/wddx/wddx.c:1.119.2.8   Sun Jan  1 12:50:16 2006
+++ php-src/ext/wddx/wddx.c Sat Jan 28 06:15:25 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: wddx.c,v 1.119.2.8 2006/01/01 12:50:16 sniper Exp $ */
+/* $Id: wddx.c,v 1.119.2.9 2006/01/28 06:15:25 fmk Exp $ */
 
 #include "php.h"
 
@@ -35,6 +35,7 @@
 #include "ext/standard/html.h"
 #include "ext/standard/php_string.h"
 #include "ext/date/php_date.h"
+#include "zend_globals.h"
 
 #define WDDX_BUF_LEN   256
 #define PHP_CLASS_NAME_VAR "php_class_name"

-- 
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/session php_session.h session.c

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:14:49 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/sessionphp_session.h session.c 
  Log:
  Export symbols that will allow building WDDX as shared object
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/session/php_session.h?r1=1.101.2.1&r2=1.101.2.2&diff_format=u
Index: php-src/ext/session/php_session.h
diff -u php-src/ext/session/php_session.h:1.101.2.1 
php-src/ext/session/php_session.h:1.101.2.2
--- php-src/ext/session/php_session.h:1.101.2.1 Sun Jan  1 12:50:12 2006
+++ php-src/ext/session/php_session.h   Sat Jan 28 06:14:49 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_session.h,v 1.101.2.1 2006/01/01 12:50:12 sniper Exp $ */
+/* $Id: php_session.h,v 1.101.2.2 2006/01/28 06:14:49 fmk Exp $ */
 
 #ifndef PHP_SESSION_H
 #define PHP_SESSION_H
@@ -184,9 +184,9 @@
 
 PHPAPI void session_adapt_url(const char *, size_t, char **, size_t * 
TSRMLS_DC);
 
-void php_add_session_var(char *name, size_t namelen TSRMLS_DC);
-void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC);
-int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC);
+PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC);
+PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC);
+PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC);
 
 PHPAPI int php_session_register_module(ps_module *);
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/session/session.c?r1=1.417.2.6&r2=1.417.2.7&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.6 
php-src/ext/session/session.c:1.417.2.7
--- php-src/ext/session/session.c:1.417.2.6 Sun Jan 15 16:51:18 2006
+++ php-src/ext/session/session.c   Sat Jan 28 06:14:49 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.6 2006/01/15 16:51:18 iliaa Exp $ */
+/* $Id: session.c,v 1.417.2.7 2006/01/28 06:14:49 fmk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -277,7 +277,7 @@
 
 #define MAX_STR 512
 
-void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
+PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
 {
zval **sym_track = NULL;

@@ -318,7 +318,7 @@
}
 }
 
-void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC)
+PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC)
 {
if (PG(register_globals)) {
zval **old_symbol;
@@ -358,7 +358,7 @@
}
 }
 
-int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC)
+PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var 
TSRMLS_DC)
 {
int ret = FAILURE;
 

-- 
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/standard basic_functions.c basic_functions.h incomplete_class.c php_incomplete_class.h

2006-01-27 Thread Frank M. Kromann
fmk Sat Jan 28 06:14:34 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   basic_functions.c basic_functions.h 
incomplete_class.c php_incomplete_class.h 
  Log:
  Export symbols that will allow building WDDX as shared object
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.18&r2=1.725.2.19&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.18 
php-src/ext/standard/basic_functions.c:1.725.2.19
--- php-src/ext/standard/basic_functions.c:1.725.2.18   Fri Jan 13 13:04:27 2006
+++ php-src/ext/standard/basic_functions.c  Sat Jan 28 06:14:34 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.18 2006/01/13 13:04:27 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.19 2006/01/28 06:14:34 fmk Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -99,9 +99,9 @@
 
 
 #ifdef ZTS
-int basic_globals_id;
+PHPAPI int basic_globals_id;
 #else
-php_basic_globals basic_globals;
+PHPAPI php_basic_globals basic_globals;
 #endif
 
 #include "php_fopen_wrappers.h"
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.h?r1=1.139.2.1&r2=1.139.2.2&diff_format=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.139.2.1 
php-src/ext/standard/basic_functions.h:1.139.2.2
--- php-src/ext/standard/basic_functions.h:1.139.2.1Sun Jan  1 12:50:14 2006
+++ php-src/ext/standard/basic_functions.h  Sat Jan 28 06:14:34 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: basic_functions.h,v 1.139.2.1 2006/01/01 12:50:14 sniper Exp $ */
+/* $Id: basic_functions.h,v 1.139.2.2 2006/01/28 06:14:34 fmk Exp $ */
 
 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -216,10 +216,10 @@
 
 #ifdef ZTS
 #define BG(v) TSRMG(basic_globals_id, php_basic_globals *, v)
-extern int basic_globals_id;
+PHPAPI extern int basic_globals_id;
 #else
 #define BG(v) (basic_globals.v)
-extern php_basic_globals basic_globals;
+PHPAPI extern php_basic_globals basic_globals;
 #endif
 
 #if HAVE_PUTENV
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/incomplete_class.c?r1=1.28.2.1&r2=1.28.2.2&diff_format=u
Index: php-src/ext/standard/incomplete_class.c
diff -u php-src/ext/standard/incomplete_class.c:1.28.2.1 
php-src/ext/standard/incomplete_class.c:1.28.2.2
--- php-src/ext/standard/incomplete_class.c:1.28.2.1Sun Jan  1 12:50:15 2006
+++ php-src/ext/standard/incomplete_class.c Sat Jan 28 06:14:34 2006
@@ -17,7 +17,7 @@
  */
 
 
-/* $Id: incomplete_class.c,v 1.28.2.1 2006/01/01 12:50:15 sniper Exp $ */
+/* $Id: incomplete_class.c,v 1.28.2.2 2006/01/28 06:14:34 fmk Exp $ */
 
 #include "php.h"
 #include "basic_functions.h"
@@ -122,7 +122,7 @@
 
 /* {{{ php_lookup_class_name
  */
-char *php_lookup_class_name(zval *object, zend_uint *nlen)
+PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen)
 {
zval **val;
char *retval = NULL;
@@ -144,7 +144,7 @@
 
 /* {{{ php_store_class_name
  */
-void php_store_class_name(zval *object, const char *name, zend_uint len)
+PHPAPI void php_store_class_name(zval *object, const char *name, zend_uint len)
 {
zval *val;
TSRMLS_FETCH();
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_incomplete_class.h?r1=1.17.2.1&r2=1.17.2.2&diff_format=u
Index: php-src/ext/standard/php_incomplete_class.h
diff -u php-src/ext/standard/php_incomplete_class.h:1.17.2.1 
php-src/ext/standard/php_incomplete_class.h:1.17.2.2
--- php-src/ext/standard/php_incomplete_class.h:1.17.2.1Sun Jan  1 
12:50:15 2006
+++ php-src/ext/standard/php_incomplete_class.h Sat Jan 28 06:14:34 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_incomplete_class.h,v 1.17.2.1 2006/01/01 12:50:15 sniper Exp $ */
+/* $Id: php_incomplete_class.h,v 1.17.2.2 2006/01/28 06:14:34 fmk Exp $ */
 
 #ifndef PHP_INCOMPLETE_CLASS_H
 #define PHP_INCOMPLETE_CLASS_H
@@ -55,8 +55,8 @@

 zend_class_entry *php_create_incomplete_class(TSRMLS_D);
 
-char *php_lookup_class_name(zval *object, zend_uint *nlen);
-void  php_store_class_name(zval *object, const char *name, zend_uint len);
+PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen);
+PHPAPI void  php_store_class_name(zval *object, const char *name, zend_uint 
len);
 
 #ifdef __cplusplus
 };

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



[PHP-CVS] cvs: php-src /ext/xmldbx CREDITS config.m4 php_xmldbx.h sessionxml.php xmldbx.c xmldbx.h xmldbx.php

2006-01-27 Thread Mark L. Woodward
mlwmohawk   Sat Jan 28 02:29:55 2006 UTC

  Added files: 
/php-src/ext/xmldbx CREDITS config.m4 php_xmldbx.h sessionxml.php 
xmldbx.c xmldbx.h xmldbx.php 
  Log:
  Added
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/xmldbx/config.m4?view=markup&rev=1.1
Index: php-src/ext/xmldbx/config.m4
+++ php-src/ext/xmldbx/config.m4
dnl
dnl $Id: config.m4,v 1.1 2006/01/28 02:29:54 mlwmohawk Exp $
dnl

PHP_ARG_ENABLE(xmldbx,whether to enable XMLdbX support,
[  --enable-xmldbx   Enable XMLdbX support.])

if test "$PHP_XMLDBX" != "no"; then
  if test "$ext_shared" != "yes" && test "$enable_xml" = "no"; then
AC_MSG_WARN(Activating XML)
enable_xml=yes
  fi
  AC_DEFINE(HAVE_XMLDBX, 1, [ ])
  PHP_NEW_EXTENSION(xmldbx, xmldbx.c, $ext_shared)
fi

http://cvs.php.net/viewcvs.cgi/php-src/ext/xmldbx/php_xmldbx.h?view=markup&rev=1.1
Index: php-src/ext/xmldbx/php_xmldbx.h
+++ php-src/ext/xmldbx/php_xmldbx.h
/*
   +--+
   | PHP Version 4|
   +--+
   | Copyright (c) 1997-2003 The PHP Group|
   +--+
   | This source file is subject to version 2.02 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available at through the world-wide-web at   |
   | http://www.php.net/license/2_02.txt. |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
   | Credits: Andrei Zmievski <[EMAIL PROTECTED]> (wddx) |
   | Author: Mark Woodward  |
   +--+
 */

/* $Id: php_xmldbx.h,v 1.1 2006/01/28 02:29:54 mlwmohawk Exp $ */

#ifndef PHP_XMLDBX_H
#define PHP_XMLDBX_H

#if HAVE_XMLDBX

extern zend_module_entry xmldbx_module_entry;
#define xmldbx_module_ptr &xmldbx_module_entry

PHP_FUNCTION(xmldbx_serialize);
PHP_FUNCTION(xmldbx_deserialize);

int xmldbx_deserialize_xml(zval **zret, const char *value, int vallen);
char *xmldbx_serialize_xml(char *name, zval **obj);

#define XMLDBX_MOHAWK

#else

#define xmldbx_module_ptr NULL

#endif /* HAVE_XMLDBX */

#define phpext_xmldbx_ptr xmldbx_module_ptr

#endif /* !PHP_XMLDBX_H */

http://cvs.php.net/viewcvs.cgi/php-src/ext/xmldbx/sessionxml.php?view=markup&rev=1.1
Index: php-src/ext/xmldbx/sessionxml.php
+++ php-src/ext/xmldbx/sessionxml.php
count . "\n";
print "bybool = " . $this->mybool . "\n";
print "mystring = " . $this->mystring . "\n";

$this->count++;
if($this->mybool == True)
$this->mybool = False;
else
$this->mybool = True;
$this->mystring = $this->mystring . "+";
}
};


# Start sessions, this will set a cookie.
session_start();

session_register("count");
session_register("setarray");
session_register("mycls");
session_register("myinit");


if(!$myinit)
{
$mycls = new MyClass();
$myinit = true;
}

$count++;
if($count < 2)
{
$_SESSION['setarray'] = array();
$_SESSION['setarray']['time']=time();
$_SESSION['setarray']['name1'] = 'xml_test1';
$_SESSION['setarray']['name2'] = 'xml_test2';
$_SESSION['setarray']['name3'] = 'xml_test3';
$_SESSION['setarray']['name4'] = 'xml_test4';
$_SESSION['setarray']['name5'] = 'xml_test5';
$_SESSION['setarray']['name6'] = 'xml_test6';
$_SESSION['setarray']['name7'] = 'xml_test7';
}

echo $_SESSION['setarray']['name1'] . "\n";
echo $_SESSION['setarray']['name2'] . "\n";
echo $_SESSION['setarray']['name3'] . "\n";
echo $_SESSION['setarray']['name4'] . "\n";
echo $_SESSION['setarray']['name5'] . "\n";
echo $_SESSION['setarray']['name6'] . "\n";
echo $_SESSION['setarray']['name7']  . "\n";


$mycls->print_vars();

# Output some information.
echo "sid: " . $sid . "\n";
echo "Session Count: " . $count . "\n";


?>


http://cvs.php.net/viewcvs.cgi/php-src/ext/xmldbx/xmldbx.c?view=markup&rev=1.1
Index: php-src/ext/xmldbx/xmldbx.c
+++ php-src/ext/xmldbx/xmldbx.c
/*
   +--+
   | XMLDBX 1.0   |
   +--+
   | Copyright (c) 1997-2003 The PHP Group|
   +---

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

2006-01-27 Thread Pierre-Alain Joye
pajoye  Sat Jan 28 00:16:56 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  - #36185 entry
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.381&r2=1.2027.2.382&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.381 php-src/NEWS:1.2027.2.382
--- php-src/NEWS:1.2027.2.381   Fri Jan 27 20:11:54 2006
+++ php-src/NEWSSat Jan 28 00:16:56 2006
@@ -17,6 +17,7 @@
 - Added imap_savebody(). (Mike)
 - Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
   on error. (Pierre)
+- Fixed bug #36185 (str_rot13(NULL) crash). (Pierre)
 - Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP). (Mike)
 - Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the 
   end of the string). (Ilia)

-- 
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/standard string.c

2006-01-27 Thread Pierre-Alain Joye
pajoye  Sat Jan 28 00:14:01 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   string.c 
  Log:
  - MFH: #36185 str_rot13(NULL) crash
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.445.2.6&r2=1.445.2.7&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.6 
php-src/ext/standard/string.c:1.445.2.7
--- php-src/ext/standard/string.c:1.445.2.6 Thu Jan  5 20:49:37 2006
+++ php-src/ext/standard/string.c   Sat Jan 28 00:14:01 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.6 2006/01/05 20:49:37 tony2001 Exp $ */
+/* $Id: string.c,v 1.445.2.7 2006/01/28 00:14:01 pajoye Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4653,6 +4653,8 @@
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg)) {
WRONG_PARAM_COUNT;
}
+
+convert_to_string_ex(arg);
RETVAL_ZVAL(*arg, 1, 0);
 
php_strtr(Z_STRVAL_P(return_value), Z_STRLEN_P(return_value), 
rot13_from, rot13_to, 52);

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



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

2006-01-27 Thread Pierre-Alain Joye
pajoye  Sat Jan 28 00:13:13 2006 UTC

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  - #36185 str_rot13(NULL) crash
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.516&r2=1.517&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.516 php-src/ext/standard/string.c:1.517
--- php-src/ext/standard/string.c:1.516 Wed Jan 25 00:02:23 2006
+++ php-src/ext/standard/string.c   Sat Jan 28 00:13:13 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.516 2006/01/25 00:02:23 andrei Exp $ */
+/* $Id: string.c,v 1.517 2006/01/28 00:13:13 pajoye Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6324,6 +6324,8 @@
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg)) {
WRONG_PARAM_COUNT;
}
+
+   convert_to_string_ex(arg);
RETVAL_ZVAL(*arg, 1, 0);
 
php_strtr(Z_STRVAL_P(return_value), Z_STRLEN_P(return_value), 
rot13_from, rot13_to, 52);

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



[PHP-CVS] cvs: CVSROOT / avail

2006-01-27 Thread Pierre-Alain Joye
pajoye  Fri Jan 27 22:19:37 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - pear karma for anant
  
  
http://cvs.php.net/viewcvs.cgi/CVSROOT/avail?r1=1.1082&r2=1.1083&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1082 CVSROOT/avail:1.1083
--- CVSROOT/avail:1.1082Thu Jan 19 11:48:18 2006
+++ CVSROOT/avail   Fri Jan 27 22:19:36 2006
@@ -59,7 +59,7 @@
 # The PEAR Team has access to the full PEAR tree, the PEAR portion of
 # the PHP tree, the PEAR website, and the PEAR documentation.
 
-avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,!
 
darknoise,tarjei,toby,danielc,ieure,metz,gurugeek,rich_y,asnagy,muesli,hcebay,khassani,zamana,aidan,dufuz,sergiosgc,kouber,enemerson,iridium,ortega,guillaume,koyama,scottmattocks,eric,wenz,goetsch,tacker,aph,bolk,cweiske,amt,jinxidoru,cbleek,nosey,abaker,jayeshsh,fredericpoeydome,sean,toggg,navin,pfischer,davidc,markus,cross,crafics,roychri,kore,troehr,sfrausch,bdunlap,drewish,firman,epte,timj,taak,ssuceveanu,bate|pear,peardoc
+avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,!
 
darknoise,tarjei,toby,danielc,ieure,metz,gurugeek,rich_y,asnagy,muesli,hcebay,khassani,zamana,aidan,dufuz,sergiosgc,kouber,enemerson,iridium,ortega,guillaume,koyama,scottmattocks,eric,wenz,goetsch,tacker,aph,bolk,cweiske,amt,jinxidoru,cbleek,nosey,abaker,jayeshsh,fredericpoeydome,sean,toggg,navin,pfischer,davidc,markus,cross,crafics,roychri,kore,troehr,sfrausch,bdunlap,drewish,firman,epte,timj,taak,ssuceveanu,bate,anant|pear,peardoc
 
 # PEAR bits in the main php-src module
 
avail|cox,mj,vblavet,dickmann,tal,jmcastagnetto,alexmerz,cellog,pajoye,timj|php-src/pear,pear-core

-- 
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

2006-01-27 Thread Pierre-Alain Joye
pajoye  Fri Jan 27 20:11:54 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  - imagepng filter enty
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.380&r2=1.2027.2.381&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.380 php-src/NEWS:1.2027.2.381
--- php-src/NEWS:1.2027.2.380   Fri Jan 27 19:47:14 2006
+++ php-src/NEWSFri Jan 27 20:11:54 2006
@@ -8,6 +8,8 @@
 - Changed get_headers() to retrieve headers also from non-200 responses. (Ilia)
 - Changed get_headers() to use the default context. (Ilia)
 - Added a check for special characters in the session name. (Ilia)
+- Added a filtering mode option to imagepng, allow to reduce drastically
+  the file size (Pierre) 
 - Added "consumed" stream filter. (Marcus)
 - Added new mysqli constants for BIT and NEW_DECIMAL field types:
   MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)

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



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

2006-01-27 Thread Michael Wallner
mikeFri Jan 27 20:48:43 2006 UTC

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  MF5_1: include png.h prior php.h
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd.c?r1=1.341&r2=1.342&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.341 php-src/ext/gd/gd.c:1.342
--- php-src/ext/gd/gd.c:1.341   Fri Jan 27 18:05:26 2006
+++ php-src/ext/gd/gd.c Fri Jan 27 20:48:42 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.341 2006/01/27 18:05:26 pajoye Exp $ */
+/* $Id: gd.c,v 1.342 2006/01/27 20:48:42 mike Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -29,6 +29,11 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_GD_PNG
+/* needs to be first */
+#include 
+#endif
+
 #include "php.h"
 #include "ext/standard/head.h"
 #include 

-- 
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/gd gd.c

2006-01-27 Thread Michael Wallner
mikeFri Jan 27 20:46:03 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/gd gd.c 
  Log:
  - include png.h prior php.h
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd.c?r1=1.312.2.17&r2=1.312.2.18&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.17 php-src/ext/gd/gd.c:1.312.2.18
--- php-src/ext/gd/gd.c:1.312.2.17  Fri Jan 27 13:36:29 2006
+++ php-src/ext/gd/gd.c Fri Jan 27 20:46:02 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.17 2006/01/27 13:36:29 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.18 2006/01/27 20:46:02 mike Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -29,6 +29,11 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_GD_PNG
+/* needs to be first */
+#include 
+#endif
+
 #include "php.h"
 #include "ext/standard/head.h"
 #include 

-- 
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

2006-01-27 Thread Michael Wallner
mikeFri Jan 27 20:22:48 2006 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c 
  Log:
  MF_5_1
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/imap/php_imap.c?r1=1.213&r2=1.214&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.213 php-src/ext/imap/php_imap.c:1.214
--- php-src/ext/imap/php_imap.c:1.213   Fri Jan 27 19:44:40 2006
+++ php-src/ext/imap/php_imap.c Fri Jan 27 20:22:48 2006
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.213 2006/01/27 19:44:40 mike Exp $ */
+/* $Id: php_imap.c,v 1.214 2006/01/27 20:22:48 mike Exp $ */
 
 #define IMAP41
 
@@ -68,8 +68,6 @@
 static void _php_imap_parse_address(ADDRESS *addresslist, char **fulladdress, 
zval *paddress TSRMLS_DC);
 static int _php_imap_address_size(ADDRESS *addresslist);
 
-/* c-clients gets */
-static mailgets_t old_mail_gets;
 /* the gets we use */
 static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, 
GETS_DATA *md);
 
@@ -469,7 +467,6 @@
REGISTER_LONG_CONSTANT("NIL", NIL, CONST_PERSISTENT | CONST_CS);
 
/* plug in our gets */
-   old_mail_gets = mail_parameters(NIL, GET_GETS, NIL);
mail_parameters(NIL, SET_GETS, (void *) php_mail_gets);
 
/* set default timeout values */
@@ -4243,7 +4240,16 @@
}
return NULL;
} else {
-   return old_mail_gets(f, stream, size, md);
+   char *buf = malloc(size + 1);
+   
+   if (f(stream, size, buf)) {
+   buf[size] = '\0';
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to 
read from socket");
+   efree(buf);
+   buf = NULL;
+   }
+   return buf;
}
 }
 /* }}} */

-- 
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/imap php_imap.c

2006-01-27 Thread Michael Wallner
mikeFri Jan 27 20:18:03 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/imap   php_imap.c 
  Log:
  - fix imap_fetchbody(); there is no default mailgets()
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.5&r2=1.208.2.6&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.5 
php-src/ext/imap/php_imap.c:1.208.2.6
--- php-src/ext/imap/php_imap.c:1.208.2.5   Fri Jan 27 19:46:11 2006
+++ php-src/ext/imap/php_imap.c Fri Jan 27 20:18:03 2006
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.5 2006/01/27 19:46:11 mike Exp $ */
+/* $Id: php_imap.c,v 1.208.2.6 2006/01/27 20:18:03 mike Exp $ */
 
 #define IMAP41
 
@@ -68,8 +68,6 @@
 static void _php_imap_parse_address(ADDRESS *addresslist, char **fulladdress, 
zval *paddress TSRMLS_DC);
 static int _php_imap_address_size(ADDRESS *addresslist);
 
-/* c-clients gets */
-static mailgets_t old_mail_gets;
 /* the gets we use */
 static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, 
GETS_DATA *md);
 
@@ -469,7 +467,6 @@
REGISTER_LONG_CONSTANT("NIL", NIL, CONST_PERSISTENT | CONST_CS);
 
/* plug in our gets */
-   old_mail_gets = mail_parameters(NIL, GET_GETS, NIL);
mail_parameters(NIL, SET_GETS, (void *) php_mail_gets);
 
/* set default timeout values */
@@ -4243,7 +4240,16 @@
}
return NULL;
} else {
-   return old_mail_gets(f, stream, size, md);
+   char *buf = malloc(size + 1);
+   
+   if (f(stream, size, buf)) {
+   buf[size] = '\0';
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to 
read from socket");
+   efree(buf);
+   buf = NULL;
+   }
+   return buf;
}
 }
 /* }}} */

-- 
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

2006-01-27 Thread Michael Wallner
mikeFri Jan 27 19:47:14 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  - added imap_savebody()
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.379&r2=1.2027.2.380&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.379 php-src/NEWS:1.2027.2.380
--- php-src/NEWS:1.2027.2.379   Thu Jan 26 15:45:33 2006
+++ php-src/NEWSFri Jan 27 19:47:14 2006
@@ -12,6 +12,7 @@
 - Added new mysqli constants for BIT and NEW_DECIMAL field types:
   MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
 - Added ReflectionClass::newInstanceArgs($args). (Marcus)
+- Added imap_savebody(). (Mike)
 - Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
   on error. (Pierre)
 - Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP). (Mike)

-- 
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/imap php_imap.c php_imap.h

2006-01-27 Thread Michael Wallner
mikeFri Jan 27 19:46:11 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/imap   php_imap.c php_imap.h 
  Log:
  MFH: add imap_savebody()
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.4&r2=1.208.2.5&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.4 
php-src/ext/imap/php_imap.c:1.208.2.5
--- php-src/ext/imap/php_imap.c:1.208.2.4   Thu Jan  5 00:47:16 2006
+++ php-src/ext/imap/php_imap.c Fri Jan 27 19:46:11 2006
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.4 2006/01/05 00:47:16 iliaa Exp $ */
+/* $Id: php_imap.c,v 1.208.2.5 2006/01/27 19:46:11 mike Exp $ */
 
 #define IMAP41
 
@@ -36,6 +36,7 @@
 
 #include "php.h"
 #include "php_ini.h"
+#include "php_streams.h"
 #include "ext/standard/php_string.h"
 #include "ext/standard/info.h"
 #include "ext/standard/file.h"
@@ -67,6 +68,11 @@
 static void _php_imap_parse_address(ADDRESS *addresslist, char **fulladdress, 
zval *paddress TSRMLS_DC);
 static int _php_imap_address_size(ADDRESS *addresslist);
 
+/* c-clients gets */
+static mailgets_t old_mail_gets;
+/* the gets we use */
+static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, 
GETS_DATA *md);
+
 /* These function declarations are missing from the IMAP header files... */
 void rfc822_date(char *date);
 char *cpystr(const char *str);
@@ -93,6 +99,7 @@
PHP_FE(imap_body,   
NULL)
PHP_FE(imap_bodystruct, 
NULL)
PHP_FE(imap_fetchbody,  
NULL)
+   PHP_FE(imap_savebody,   
NULL)
PHP_FE(imap_fetchheader,
NULL)
PHP_FE(imap_fetchstructure, 
NULL)
PHP_FE(imap_expunge,
NULL)
@@ -418,6 +425,7 @@
imap_globals->quota_return = NIL;
imap_globals->imap_acl_list = NIL;
 #endif
+   imap_globals->gets_stream = NIL;
 }
 /* }}} */
 
@@ -460,6 +468,10 @@
/* lets allow NIL */
REGISTER_LONG_CONSTANT("NIL", NIL, CONST_PERSISTENT | CONST_CS);
 
+   /* plug in our gets */
+   old_mail_gets = mail_parameters(NIL, GET_GETS, NIL);
+   mail_parameters(NIL, SET_GETS, (void *) php_mail_gets);
+
/* set default timeout values */
mail_parameters(NIL, SET_OPENTIMEOUT, (void *) 
FG(default_socket_timeout));
mail_parameters(NIL, SET_READTIMEOUT, (void *) 
FG(default_socket_timeout));
@@ -650,6 +662,7 @@
 {
IMAPG(imap_errorstack) = NIL;
IMAPG(imap_alertstack) = NIL;
+   IMAPG(gets_stream) = NIL;
return SUCCESS;
 }
 /* }}} */
@@ -1845,6 +1858,57 @@
 
 /* }}} */
 
+/* {{{ proto bool imap_savebody(resource stream_id, string|resource file, int 
msg_no[, string section = ""[, int options = 0]])
+   Save a specific body section to a file */
+PHP_FUNCTION(imap_savebody)
+{
+   zval *stream, *out;
+   pils *imap_ptr = NULL;
+   php_stream *writer = NULL;
+   char *section = "";
+   int section_len = 0, close_stream = 1;
+   long msgno, flags = 0;
+   
+   if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"rzl|sl", &stream, &out, &msgno, §ion, §ion_len, &flags)) {
+   RETURN_FALSE;
+   }
+   
+   ZEND_FETCH_RESOURCE(imap_ptr, pils *, &stream, -1, "imap", le_imap);
+   
+   if (!imap_ptr) {
+   RETURN_FALSE;
+   }
+   
+   switch (Z_TYPE_P(out))
+   {
+   case IS_LONG:
+   case IS_RESOURCE:
+   close_stream = 0;
+   php_stream_from_zval(writer, &out);
+   break;
+
+   default:
+   convert_to_string_ex(&out);
+   writer = php_stream_open_wrapper(Z_STRVAL_P(out), "wb", 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+   break;
+   }
+   
+   if (!writer) {
+   RETURN_FALSE;
+   }
+   
+   IMAPG(gets_stream) = writer;
+   mail_fetchbody_full(imap_ptr->imap_stream, msgno, section, NULL, flags);
+   IMAPG(gets_stream) = NULL;
+   
+   if (close_stream) {
+   php_stream_close(writer);
+   }
+   
+   RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto string imap_base64(string text)
Decode BASE64 encoded text */
 PHP_FUNCTION(imap_base64)
@@ -4147,6 +4211,43 @@
 }
 /* }}} */
 
+#define GETS_FETCH_SIZE 8196LU
+/* {{{ php_mail_gets */
+static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, 
GETS_DATA *md)
+{
+   TSRMLS_FETCH();
+   
+   /*  wri

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

2006-01-27 Thread Michael Wallner
mikeFri Jan 27 19:44:40 2006 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c php_imap.h 
  Log:
  - add imap_savebody()
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/imap/php_imap.c?r1=1.212&r2=1.213&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.212 php-src/ext/imap/php_imap.c:1.213
--- php-src/ext/imap/php_imap.c:1.212   Thu Jan  5 00:51:34 2006
+++ php-src/ext/imap/php_imap.c Fri Jan 27 19:44:40 2006
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.212 2006/01/05 00:51:34 iliaa Exp $ */
+/* $Id: php_imap.c,v 1.213 2006/01/27 19:44:40 mike Exp $ */
 
 #define IMAP41
 
@@ -36,6 +36,7 @@
 
 #include "php.h"
 #include "php_ini.h"
+#include "php_streams.h"
 #include "ext/standard/php_string.h"
 #include "ext/standard/info.h"
 #include "ext/standard/file.h"
@@ -67,6 +68,11 @@
 static void _php_imap_parse_address(ADDRESS *addresslist, char **fulladdress, 
zval *paddress TSRMLS_DC);
 static int _php_imap_address_size(ADDRESS *addresslist);
 
+/* c-clients gets */
+static mailgets_t old_mail_gets;
+/* the gets we use */
+static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, 
GETS_DATA *md);
+
 /* These function declarations are missing from the IMAP header files... */
 void rfc822_date(char *date);
 char *cpystr(const char *str);
@@ -93,6 +99,7 @@
PHP_FE(imap_body,   
NULL)
PHP_FE(imap_bodystruct, 
NULL)
PHP_FE(imap_fetchbody,  
NULL)
+   PHP_FE(imap_savebody,   
NULL)
PHP_FE(imap_fetchheader,
NULL)
PHP_FE(imap_fetchstructure, 
NULL)
PHP_FE(imap_expunge,
NULL)
@@ -418,6 +425,7 @@
imap_globals->quota_return = NIL;
imap_globals->imap_acl_list = NIL;
 #endif
+   imap_globals->gets_stream = NIL;
 }
 /* }}} */
 
@@ -460,6 +468,10 @@
/* lets allow NIL */
REGISTER_LONG_CONSTANT("NIL", NIL, CONST_PERSISTENT | CONST_CS);
 
+   /* plug in our gets */
+   old_mail_gets = mail_parameters(NIL, GET_GETS, NIL);
+   mail_parameters(NIL, SET_GETS, (void *) php_mail_gets);
+
/* set default timeout values */
mail_parameters(NIL, SET_OPENTIMEOUT, (void *) 
FG(default_socket_timeout));
mail_parameters(NIL, SET_READTIMEOUT, (void *) 
FG(default_socket_timeout));
@@ -650,6 +662,7 @@
 {
IMAPG(imap_errorstack) = NIL;
IMAPG(imap_alertstack) = NIL;
+   IMAPG(gets_stream) = NIL;
return SUCCESS;
 }
 /* }}} */
@@ -1845,6 +1858,57 @@
 
 /* }}} */
 
+/* {{{ proto bool imap_savebody(resource stream_id, string|resource file, int 
msg_no[, string section = ""[, int options = 0]])
+   Save a specific body section to a file */
+PHP_FUNCTION(imap_savebody)
+{
+   zval *stream, *out;
+   pils *imap_ptr = NULL;
+   php_stream *writer = NULL;
+   char *section = "";
+   int section_len = 0, close_stream = 1;
+   long msgno, flags = 0;
+   
+   if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"rzl|sl", &stream, &out, &msgno, §ion, §ion_len, &flags)) {
+   RETURN_FALSE;
+   }
+   
+   ZEND_FETCH_RESOURCE(imap_ptr, pils *, &stream, -1, "imap", le_imap);
+   
+   if (!imap_ptr) {
+   RETURN_FALSE;
+   }
+   
+   switch (Z_TYPE_P(out))
+   {
+   case IS_LONG:
+   case IS_RESOURCE:
+   close_stream = 0;
+   php_stream_from_zval(writer, &out);
+   break;
+
+   default:
+   convert_to_string_ex(&out);
+   writer = php_stream_open_wrapper(Z_STRVAL_P(out), "wb", 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+   break;
+   }
+   
+   if (!writer) {
+   RETURN_FALSE;
+   }
+   
+   IMAPG(gets_stream) = writer;
+   mail_fetchbody_full(imap_ptr->imap_stream, msgno, section, NULL, flags);
+   IMAPG(gets_stream) = NULL;
+   
+   if (close_stream) {
+   php_stream_close(writer);
+   }
+   
+   RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto string imap_base64(string text)
Decode BASE64 encoded text */
 PHP_FUNCTION(imap_base64)
@@ -4147,6 +4211,43 @@
 }
 /* }}} */
 
+#define GETS_FETCH_SIZE 8196LU
+/* {{{ php_mail_gets */
+static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, 
GETS_DATA *md)
+{
+   TSRMLS_FETCH();
+   
+   /*  write to the gets stream if it is set, 
+   

Re: [PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests 007.phpt

2006-01-27 Thread Andi Gutmans
OK in that case it's probably best not to add inconsistency and leave 
it this way.


At 12:44 AM 1/25/2006, Marcus Boerger wrote:

Hello Andi,

  it was Sebastians idea and he took the name from invokeArgs().
I don't care, so if you can sleep better with your proposal change both
names and live with BC break.

marcus

Wednesday, January 25, 2006, 3:46:16 AM, you wrote:

> Might be nicer to call it newInstanceWithArgs() but it's a matter of
> taste so I'll leave it up to you to decide if you think it's 
nicer or not :)


> Andi

> At 12:19 PM 1/24/2006, Marcus Boerger wrote:
>>helly   Tue Jan 24 20:19:49 2006 UTC
>>
>>   Added files:
>> /php-src/ext/reflection/tests   007.phpt
>>
>>   Modified files:
>> /php-src/ext/reflection php_reflection.c
>>   Log:
>>   - Implemented #36141 Add ReflectionClass::newInstanceArgs($args)
>>
>>
>>http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflecti 
on.c?r1=1.200&r2=1.201&diff_format=u

>>Index: php-src/ext/reflection/php_reflection.c
>>diff -u php-src/ext/reflection/php_reflection.c:1.200
>>php-src/ext/reflection/php_reflection.c:1.201
>>--- php-src/ext/reflection/php_reflection.c:1.200   Tue Jan 17
>>12:18:52 2006
>>+++ php-src/ext/reflection/php_reflection.c Tue Jan 24 20:19:49 2006
>>@@ -20,7 +20,7 @@
>> 
+--+

>>  */
>>
>>-/* $Id: php_reflection.c,v 1.200 2006/01/17 12:18:52 dmitry Exp $ */
>>+/* $Id: php_reflection.c,v 1.201 2006/01/24 20:19:49 helly Exp $ */
>>
>>  #ifdef HAVE_CONFIG_H
>>  #include "config.h"
>>@@ -3193,8 +3193,6 @@
>> METHOD_NOTSTATIC(reflection_class_ptr);
>> GET_REFLECTION_OBJECT_PTR(ce);
>>
>>-   object_init_ex(return_value, ce);
>>-
>> /* Run the constructor if there is one */
>> if (ce->constructor) {
>> zval ***params;
>>@@ -3212,6 +3210,8 @@
>> RETURN_FALSE;
>> }
>>
>>+   object_init_ex(return_value, ce);
>>+
>> fci.size = sizeof(fci);
>> fci.function_table = EG(function_table);
>> fci.function_name = NULL;
>>@@ -3237,6 +3237,79 @@
>> zval_ptr_dtor(&retval_ptr);
>> }
>> efree(params);
>>+   } else if (!ZEND_NUM_ARGS()) {
>>+   object_init_ex(return_value, ce);
>>+   } else {
>>+
>>zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0
>>TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass
>>any constructor arguments", ce->name);
>>+   }
>>+}
>>+/* }}} */
>>+
>>+/* {{{ proto public stdclass ReflectionClass::newInstanceArgs(array args)
>>+   Returns an instance of this class */
>>+ZEND_METHOD(reflection_class, newInstanceArgs)
>>+{
>>+   zval *retval_ptr;
>>+   reflection_object *intern;
>>+   zend_class_entry *ce;
>>+   int argc;
>>+   HashTable *args;
>>+
>>+
>>+   METHOD_NOTSTATIC(reflection_class_ptr);
>>+   GET_REFLECTION_OBJECT_PTR(ce);
>>+
>>+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|h",
>>&args) == FAILURE) {
>>+   return;
>>+   }
>>+   argc = args->nNumOfElements;
>>+
>>+   /* Run the constructor if there is one */
>>+   if (ce->constructor) {
>>+   zval ***params;
>>+   zend_fcall_info fci;
>>+   zend_fcall_info_cache fcc;
>>+
>>+   if (!(ce->constructor->common.fn_flags & 
ZEND_ACC_PUBLIC)) {

>>+
>>zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0
>>TSRMLS_CC, "Access to non-public constructor of class %v", ce->name);
>>+   return;
>>+   }
>>+
>>+   params = safe_emalloc(sizeof(zval **), argc, 0);
>>+   zend_hash_apply_with_argument(args,
>>(apply_func_arg_t)_zval_array_to_c_array, ¶ms TSRMLS_CC);
>>+   params -= argc;
>>+
>>+   object_init_ex(return_value, ce);
>>+
>>+   fci.size = sizeof(fci);
>>+   fci.function_table = EG(function_table);
>>+   fci.function_name = NULL;
>>+   fci.symbol_table = NULL;
>>+   fci.object_pp = &return_value;
>>+   fci.retval_ptr_ptr = &retval_ptr;
>>+   fci.param_count = argc;
>>+   fci.params = params;
>>+   fci.no_separation = 1;
>>+
>>+   fcc.initialized = 1;
>>+   fcc.function_handler = ce->constructor;
>>+   fcc.calling_scope = EG(scope);
>>+   fcc.object_pp = &return_value;
>>+
>>+   if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
>>+   efree(params);
>>+   zval_ptr_dtor(&retval_ptr);
>>+   zend_error(E_WARNING, "Invocation of %v's
>>constructor failed", ce->name);
>>+   RETURN_NULL();
>>+   }
>>+   if (retval_ptr) {
>>+ 

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

2006-01-27 Thread Pierre-Alain Joye
pajoye  Fri Jan 27 18:05:26 2006 UTC

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  - add PNG filter constants
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd.c?r1=1.340&r2=1.341&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.340 php-src/ext/gd/gd.c:1.341
--- php-src/ext/gd/gd.c:1.340   Tue Jan 17 23:49:14 2006
+++ php-src/ext/gd/gd.c Fri Jan 27 18:05:26 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.340 2006/01/17 23:49:14 tony2001 Exp $ */
+/* $Id: gd.c,v 1.341 2006/01/27 18:05:26 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -402,6 +402,22 @@
 #else
REGISTER_LONG_CONSTANT("GD_BUNDLED", 0, CONST_CS | CONST_PERSISTENT);
 #endif
+
+#ifdef HAVE_GD_PNG
+   /*
+* cannot include #include "png.h"
+* /usr/include/pngconf.h:310:2: error: #error png.h already includes 
setjmp.h with some additional fixup.
+* as error, use the values for now...
+*/
+   REGISTER_LONG_CONSTANT("PNG_NO_FILTER", 0x00, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_NONE",   0x08, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_SUB",0x10, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_UP", 0x20, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_AVG",0x40, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_PAETH",  0x80, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_ALL_FILTERS",   0x08 | 0x10 | 0x20 | 0x40 | 
0x80, CONST_CS | CONST_PERSISTENT);
+#endif
+
return SUCCESS;
 }
 /* }}} */

-- 
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/gd gd.c gd_ctx.c /ext/gd/libgd gd.h gd_png.c

2006-01-27 Thread Pierre-Alain Joye
pajoye  Fri Jan 27 13:36:30 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/gd gd.c gd_ctx.c 
/php-src/ext/gd/libgd   gd.h gd_png.c 
  Log:
  - MFH: add filter option to imagepng
  - add constants
PS: If someone can check why #include "png.h" fails, it will be cleaner
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd.c?r1=1.312.2.16&r2=1.312.2.17&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.16 php-src/ext/gd/gd.c:1.312.2.17
--- php-src/ext/gd/gd.c:1.312.2.16  Tue Jan 17 23:47:08 2006
+++ php-src/ext/gd/gd.c Fri Jan 27 13:36:29 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.16 2006/01/17 23:47:08 tony2001 Exp $ */
+/* $Id: gd.c,v 1.312.2.17 2006/01/27 13:36:29 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -451,6 +451,22 @@
 #else
REGISTER_LONG_CONSTANT("GD_BUNDLED", 0, CONST_CS | CONST_PERSISTENT);
 #endif
+
+#ifdef HAVE_GD_PNG
+
+/*
+ * cannot include #include "png.h"
+ * /usr/include/pngconf.h:310:2: error: #error png.h already includes setjmp.h 
with some additional fixup.
+ * as error, use the values for now...
+ */
+   REGISTER_LONG_CONSTANT("PNG_NO_FILTER", 0x00, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_NONE",   0x08, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_SUB",0x10, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_UP", 0x20, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_AVG",0x40, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_FILTER_PAETH",  0x80, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("PNG_ALL_FILTERS",   0x08 | 0x10 | 0x20 | 
0x40 | 0x80, CONST_CS | CONST_PERSISTENT);
+#endif
return SUCCESS;
 }
 /* }}} */
http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd_ctx.c?r1=1.22.2.4&r2=1.22.2.5&diff_format=u
Index: php-src/ext/gd/gd_ctx.c
diff -u php-src/ext/gd/gd_ctx.c:1.22.2.4 php-src/ext/gd/gd_ctx.c:1.22.2.5
--- php-src/ext/gd/gd_ctx.c:1.22.2.4Sun Jan  1 12:50:06 2006
+++ php-src/ext/gd/gd_ctx.c Fri Jan 27 13:36:29 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: gd_ctx.c,v 1.22.2.4 2006/01/01 12:50:06 sniper Exp $ */
+/* $Id: gd_ctx.c,v 1.22.2.5 2006/01/27 13:36:29 pajoye Exp $ */
 
 #include "php_gd.h"
 
@@ -49,12 +49,13 @@
 /* {{{ _php_image_output_ctx */
 static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int 
image_type, char *tn, void (*func_p)())
 {
-   zval **imgind, **file, **quality;
+   zval **imgind, **file, **quality, **basefilter;
gdImagePtr im;
char *fn = NULL;
FILE *fp = NULL;
int argc = ZEND_NUM_ARGS();
int q = -1, i;
+   int f = -1;
gdIOCtx *ctx;
 
/* The third (quality) parameter for Wbmp stands for the threshold when 
called from image2wbmp().
@@ -65,7 +66,8 @@
if (argc < 2 && image_type == PHP_GDIMG_TYPE_XBM) {
WRONG_PARAM_COUNT;
}
-   if (argc < 1 || argc > 3 || zend_get_parameters_ex(argc, &imgind, 
&file, &quality) == FAILURE)
+
+   if (argc < 1 || argc > 4 || zend_get_parameters_ex(argc, &imgind, 
&file, &quality, &basefilter) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@@ -75,9 +77,13 @@
if (argc > 1) {
convert_to_string_ex(file);
fn = Z_STRVAL_PP(file);
-   if (argc == 3) {
+   if (argc >= 3) {
convert_to_long_ex(quality);
q = Z_LVAL_PP(quality);/* or colorindex for foreground 
of BW images (defaults to black) */
+   if (argc == 4) {
+   convert_to_long_ex(basefilter);
+   f = Z_LVAL_PP(basefilter);
+   }
}
}
 
@@ -115,9 +121,11 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Invalid threshold value '%d'. It must be between 0 and 255", q);
}
case PHP_GDIMG_TYPE_JPG:
-   case PHP_GDIMG_TYPE_PNG:
(*func_p)(im, ctx, q);
break;
+   case PHP_GDIMG_TYPE_PNG:
+   (*func_p)(im, ctx, q, f);
+   break;
case PHP_GDIMG_TYPE_XBM:
case PHP_GDIMG_TYPE_WBM:
if (argc < 3) {
http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/libgd/gd.h?r1=1.26.2.1&r2=1.26.2.2&diff_format=u
Index: php-src/ext/gd/libgd/gd.h
diff -u php-src/ext/gd/libgd/gd.h:1.26.2.1 php-src/ext/gd/libgd/gd.h:1.26.2.2
--- php-src/ext/gd/libgd/gd.h:1.26.2.1  Sun Oct  9 12:06:27 2005
+++ php-