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

2007-02-20 Thread changelog
changelog   Wed Feb 21 01:31:03 2007 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1070r2=1.1071diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1070 ZendEngine2/ChangeLog:1.1071
--- ZendEngine2/ChangeLog:1.1070Tue Feb 20 01:31:05 2007
+++ ZendEngine2/ChangeLog   Wed Feb 21 01:31:03 2007
@@ -1,3 +1,12 @@
+2007-02-20  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  zend_strtod.c:
+  MFH: fix #40545 (multithreading issue in zend_strtod())
+
+* zend_strtod.c:
+  fix #40545 (multithreading issue in zend_strtod())
+
 2007-02-19  Antony Dovgal  [EMAIL PROTECTED]
 
 * (PHP_5_2)
@@ -16922,7 +16931,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1070 2007/02/20 01:31:05 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1071 2007/02/21 01:31:03 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -18646,7 +18655,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1070 2007/02/20 01:31:05 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1071 2007/02/21 01:31:03 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 09:09:47 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  MFB
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.312r2=1.313diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.312 php-src/sapi/cgi/cgi_main.c:1.313
--- php-src/sapi/cgi/cgi_main.c:1.312   Mon Feb 19 20:01:17 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Feb 20 09:09:47 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.312 2007/02/19 20:01:17 tony2001 Exp $ */
+/* $Id: cgi_main.c,v 1.313 2007/02/20 09:09:47 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -1569,7 +1569,8 @@
}
}
 
-   s = malloc(++len + 1);
+   len += 2;
+   s = malloc(len);
*s = '\0';  /* we 
are pretending it came from the environment  */
for (i = php_optind; i  argc; i++) {
strlcat(s, argv[i], len);

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



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

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 12:01:41 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.550r2=1.2027.2.547.2.551diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.550 php-src/NEWS:1.2027.2.547.2.551
--- php-src/NEWS:1.2027.2.547.2.550 Tue Feb 20 00:09:42 2007
+++ php-src/NEWSTue Feb 20 12:01:40 2007
@@ -11,6 +11,7 @@
 - Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
 - Fixed bug #40546 (SplFileInfo::getPathInfo() throws an execption if directory
   is in root dir). (Marcus)
+- Fixed bug #40545 (multithreading issue in zend_strtod()). (Tony)
 - Fixed bug #40503 (json_encode() value corruption on 32bit systems with 
   overflown values). (Ilia)
 - Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice

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



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

2007-02-20 Thread Marcus Boerger
helly   Tue Feb 20 13:07:53 2007 UTC

  Modified files:  
/php-src/ext/splspl_directory.c 
  Log:
  - Make stat based functions throw an exception
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.118r2=1.119diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.118 
php-src/ext/spl/spl_directory.c:1.119
--- php-src/ext/spl/spl_directory.c:1.118   Mon Feb 19 20:32:39 2007
+++ php-src/ext/spl/spl_directory.c Tue Feb 20 13:07:53 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.118 2007/02/19 20:32:39 helly Exp $ */
+/* $Id: spl_directory.c,v 1.119 2007/02/20 13:07:53 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -758,8 +758,10 @@
 { \
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \
  \
+   php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);\
spl_filesystem_object_get_file_name(intern TSRMLS_CC); \
php_u_stat(intern-file_name_type, intern-file_name, 
intern-file_name_len, func_num, FG(default_context), return_value TSRMLS_CC); \
+   php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);\
 }
 /* }}} */
 

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



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

2007-02-20 Thread Marcus Boerger
helly   Tue Feb 20 13:08:01 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/splspl_directory.c 
  Log:
  - Make stat based functions throw an exception
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.14r2=1.45.2.27.2.15diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.14 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.15
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.14  Mon Feb 19 20:34:29 2007
+++ php-src/ext/spl/spl_directory.c Tue Feb 20 13:08:01 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.14 2007/02/19 20:34:29 helly Exp $ */
+/* $Id: spl_directory.c,v 1.45.2.27.2.15 2007/02/20 13:08:01 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -679,8 +679,10 @@
 { \
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \
  \
+   php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);\
spl_filesystem_object_get_file_name(intern TSRMLS_CC); \
php_stat(intern-file_name, intern-file_name_len, func_num, 
return_value TSRMLS_CC); \
+   php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);\
 }
 /* }}} */
 

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



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

2007-02-20 Thread Marcus Boerger
helly   Tue Feb 20 13:09:54 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.551r2=1.2027.2.547.2.552diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.551 php-src/NEWS:1.2027.2.547.2.552
--- php-src/NEWS:1.2027.2.547.2.551 Tue Feb 20 12:01:40 2007
+++ php-src/NEWSTue Feb 20 13:09:54 2007
@@ -9,6 +9,8 @@
 - Added --ri switch to CLI which allows to check extension information. 
(Marcus)
 - Added tidyNode::getParent() method (John, Nuno)
 - Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
+- Fixed bug #40548 (SplFileInfo::getOwner/getGroup give a warning on broken
+  symlink). (Marcus)
 - Fixed bug #40546 (SplFileInfo::getPathInfo() throws an execption if directory
   is in root dir). (Marcus)
 - Fixed bug #40545 (multithreading issue in zend_strtod()). (Tony)

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



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

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 13:21:54 2007 UTC

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  fix #38406 (crash when assigning objects to SimpleXML attributes)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.228r2=1.229diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.228 
php-src/ext/simplexml/simplexml.c:1.229
--- php-src/ext/simplexml/simplexml.c:1.228 Mon Feb 12 21:13:01 2007
+++ php-src/ext/simplexml/simplexml.c   Tue Feb 20 13:21:54 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.228 2007/02/12 21:13:01 tony2001 Exp $ */
+/* $Id: simplexml.c,v 1.229 2007/02/20 13:21:54 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -56,6 +56,7 @@
 static zend_object_value php_sxe_register_object(php_sxe_object * TSRMLS_DC);
 static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data 
TSRMLS_DC);
 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, 
int use_data TSRMLS_DC);
+static zval *sxe_get_value(zval *z TSRMLS_DC);
 
 /* {{{ _node_as_zval()
  */
@@ -428,6 +429,7 @@
int is_attr = 0;
int nodendx = 0;
int test = 0;
+   int new_value = 0;
longcnt;
zvaltmp_zv, trim_zv, value_copy;
 
@@ -506,8 +508,17 @@
break;
case IS_STRING:
break;
+   case IS_OBJECT:
+   if (Z_OBJCE_P(value) == sxe_class_entry) {
+   value = sxe_get_value(value TSRMLS_CC);
+   INIT_PZVAL(value);
+   new_value = 1;
+   break;
+   }
+   /* break is missing intentionally */
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, It 
is not yet possible to assign complex types to %s, attribs ? attributes : 
properties);
+   return;
}
}
 
@@ -596,6 +607,9 @@
if (value  value == value_copy) {
zval_dtor(value);
}
+   if (new_value) {
+   zval_ptr_dtor(value);
+   }
 }
 /* }}} */
 
@@ -2396,7 +2410,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.228 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.229 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);

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



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

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 14:04:59 2007 UTC

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  fix leak, convert unicode values to string before assigning
  change error message to use zend_error() since there is no active function
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.229r2=1.230diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.229 
php-src/ext/simplexml/simplexml.c:1.230
--- php-src/ext/simplexml/simplexml.c:1.229 Tue Feb 20 13:21:54 2007
+++ php-src/ext/simplexml/simplexml.c   Tue Feb 20 14:04:59 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.229 2007/02/20 13:21:54 tony2001 Exp $ */
+/* $Id: simplexml.c,v 1.230 2007/02/20 14:04:59 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -513,11 +513,17 @@
value = sxe_get_value(value TSRMLS_CC);
INIT_PZVAL(value);
new_value = 1;
+   if (UG(unicode)) {
+   
convert_to_string_with_converter(value, UG(utf8_conv));
+   }
break;
}
/* break is missing intentionally */
default:
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, It 
is not yet possible to assign complex types to %s, attribs ? attributes : 
properties);
+   if (member == tmp_zv) {
+   zval_dtor(tmp_zv);
+   }
+   zend_error(E_WARNING, It is not yet possible 
to assign complex types to %s, attribs ? attributes : properties);
return;
}
}
@@ -2410,7 +2416,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.229 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.230 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);

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



[PHP-CVS] cvs: php-src /ext/simplexml/tests bug38406.phpt

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 14:06:05 2007 UTC

  Added files: 
/php-src/ext/simplexml/testsbug38406.phpt 
  Log:
  new test
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug38406.phpt?view=markuprev=1.1
Index: php-src/ext/simplexml/tests/bug38406.phpt
+++ php-src/ext/simplexml/tests/bug38406.phpt
--TEST--
Bug #38406 (crash when assigning objects to SimpleXML attributes)
--SKIPIF--
?php if (!extension_loaded(simplexml)) print skip; ?
--FILE--
?php

$item = new SimpleXMLElement(b'something /');
$item-attribute = b'something';
var_dump($item-attribute);

$item-otherAttribute = $item-attribute;
var_dump($item-otherAttribute);

$a = array();
$item-$a = new stdclass;

echo Done\n;
?
--EXPECTF-- 
object(SimpleXMLElement)#%d (1) {
  [0]=
  string(9) something
}
object(SimpleXMLElement)#%d (1) {
  [0]=
  string(9) something
}

Notice: Array to string conversion in %s on line %d

Warning: It is not yet possible to assign complex types to properties in %s on 
line %d
Done
--UEXPECTF--
object(SimpleXMLElement)#%d (1) {
  [0]=
  unicode(9) something
}
object(SimpleXMLElement)#%d (1) {
  [0]=
  unicode(9) something
}

Notice: Array to string conversion in %s on line %d

Warning: It is not yet possible to assign complex types to properties in %s on 
line %d
Done

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c /ext/simplexml/tests bug38406.phpt

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 14:08:43 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/simplexml/testsbug38406.phpt 

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  MFH: fix leak and errmsg
  add test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.22r2=1.151.2.22.2.23diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.22 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.23
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.22   Tue Feb 20 13:22:41 2007
+++ php-src/ext/simplexml/simplexml.c   Tue Feb 20 14:08:43 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.22 2007/02/20 13:22:41 tony2001 Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.23 2007/02/20 14:08:43 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -515,7 +515,10 @@
}
/* break is missing intentionally */
default:
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, It 
is not yet possible to assign complex types to %s, attribs ? attributes : 
properties);
+   if (member == tmp_zv) {
+   zval_dtor(tmp_zv);
+   }
+   zend_error(E_WARNING, It is not yet possible 
to assign complex types to %s, attribs ? attributes : properties);
return;
}
}
@@ -2356,7 +2359,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.22 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.23 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);

http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug38406.phpt?view=markuprev=1.1
Index: php-src/ext/simplexml/tests/bug38406.phpt
+++ php-src/ext/simplexml/tests/bug38406.phpt
--TEST--
Bug #38406 (crash when assigning objects to SimpleXML attributes)
--SKIPIF--
?php if (!extension_loaded(simplexml)) print skip; ?
--FILE--
?php

$item = new SimpleXMLElement(b'something /');
$item-attribute = b'something';
var_dump($item-attribute);

$item-otherAttribute = $item-attribute;
var_dump($item-otherAttribute);

$a = array();
$item-$a = new stdclass;

echo Done\n;
?
--EXPECTF-- 
object(SimpleXMLElement)#%d (1) {
  [0]=
  string(9) something
}
object(SimpleXMLElement)#%d (1) {
  [0]=
  string(9) something
}

Notice: Array to string conversion in %s on line %d

Warning: It is not yet possible to assign complex types to properties in %s on 
line %d
Done
--UEXPECTF--
object(SimpleXMLElement)#%d (1) {
  [0]=
  unicode(9) something
}
object(SimpleXMLElement)#%d (1) {
  [0]=
  unicode(9) something
}

Notice: Array to string conversion in %s on line %d

Warning: It is not yet possible to assign complex types to properties in %s on 
line %d
Done

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/ircg ircg.c php_ircg.h

2007-02-20 Thread Sascha Schumann
sas Tue Feb 20 19:04:28 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/ircg   ircg.c php_ircg.h 
  Log:
  - sync with current dev
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ircg/ircg.c?r1=1.137.2.18.4.2r2=1.137.2.18.4.3diff_format=u
Index: php-src/ext/ircg/ircg.c
diff -u php-src/ext/ircg/ircg.c:1.137.2.18.4.2 
php-src/ext/ircg/ircg.c:1.137.2.18.4.3
--- php-src/ext/ircg/ircg.c:1.137.2.18.4.2  Mon Jan  1 09:46:43 2007
+++ php-src/ext/ircg/ircg.c Tue Feb 20 19:04:28 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.137.2.18.4.2 2007/01/01 09:46:43 sebastian Exp $ */
+/* $Id: ircg.c,v 1.137.2.18.4.3 2007/02/20 19:04:28 sas Exp $ */
 
 /* {{{ includes */
 
@@ -124,6 +124,7 @@
 /* {{{ ircg_functions[] */
 function_entry ircg_functions[] = {
PHP_FE(ircg_set_on_die, NULL)
+   PHP_FE(ircg_create_file_on_die, NULL)
PHP_FE(ircg_pconnect, NULL)
PHP_FE(ircg_set_current, NULL)
PHP_FE(ircg_set_file, NULL)
@@ -204,6 +205,8 @@
struct in_addr od_ip;
short od_port;
 #endif
+
+   char *od_file;

int file_fd;

@@ -231,6 +234,7 @@
P_NICKNAME_JS = 3,
P_HTML= 4,
P_HTML_JS = 5,
+   P_XML = 6,
P_NOAUTO_LINKS = 8, /* Don't automatically convert links */
P_CONV_BR  = 16,/* Convert a special character to br */
P_COND_STOP= 32,/* If argument != username, stop */
@@ -393,6 +397,7 @@
 static void quit_handler(irconn_t *c, void *dummy)
 {
php_irconn_t *conn = dummy;
+   int fd;
 
irc_quit_handlers++;
if (conn-fd  -1) {
@@ -425,6 +430,14 @@
free(conn-od_data);
}
 #endif
+
+   if (conn-od_file) {
+   fd = open(conn-od_file, O_CREAT | O_WRONLY, 0666);
+   if (fd != -1) {
+   close(fd);
+   }
+   free(conn-od_file);
+   }

free(conn);
 }
@@ -451,6 +464,47 @@
}
 }
 
+static void ircg_xml_escape(smart_str *input, smart_str *output)
+{
+   unsigned char *p;
+   unsigned char *end;
+   unsigned char c;
+
+   end = input-c + input-len;
+
+   for(p = input-c; p  end; p++) {
+   c = *p;
+
+   if (c = 0  c  32) {
+   smart_str_appendl_ex(output, #, 2, 1);
+   smart_str_append_long_ex(output, c, 1);
+   smart_str_appendc_ex(output, ';', 1);
+   continue;
+   }
+   
+   switch (c) {
+   case '':
+   smart_str_appendl_ex(output, quot;, 6, 1);
+   break;
+   case '\'':
+   smart_str_appendl_ex(output, #039;, 6, 1);
+   break;
+
+   case '':
+   smart_str_appendl_ex(output, lt;, 4, 1);
+   break;
+
+   case '':
+   smart_str_appendl_ex(output, gt;, 4, 1);
+   break;
+
+   default:
+   smart_str_appendc_ex(output, c, 1);
+   break;
+   }
+   }
+}
+
 static const char hextab[] = 0123456789abcdef;
 
 #define NICKNAME_ESC_CHAR '|'
@@ -621,6 +675,7 @@
case '4': mode |= P_CONV_BR; goto next;
case '5': mode |= P_COND_STOP; goto next;
case '6': mode |= P_HTML; goto next;
+   case '7': mode |= P_XML; goto next;
 
/* associate mode bits with each command where applicable */
case 'c': NEW_TOKEN(C_CHANNEL, v) = mode; break;
@@ -701,6 +756,10 @@
ircg_js_escape(tmp, result);   \
smart_str_free_ex(tmp, 1); 
\
break;  
\
+   case P_XML: 
\
+   if (!what) break;   
\
+   ircg_xml_escape(what, result);  \
+   break;  
\
case P_HTML:
\
if (!what) break;   
\
if (use_cache) {
\
@@ -1442,6 +1501,33 @@
 #endif
 /* }}} */
 
+/* {{{ proto bool ircg_create_file_on_die(int connection, string path) 
+   Sets hostaction to be executed when connection dies */
+PHP_FUNCTION(ircg_create_file_on_die)
+{
+   zval **p1, **p2;
+   php_irconn_t *conn;
+   
+   if 

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

2007-02-20 Thread Derick Rethans
On Tue, 20 Feb 2007, Sascha Schumann wrote:

 sas   Tue Feb 20 19:04:28 2007 UTC
 
   Modified files:  (Branch: PHP_4_4)
 /php-src/ext/ircg ircg.c php_ircg.h 
   Log:
   - sync with current dev

Please revert that, PHP 4 is a bug-fix only branch AND the idea is to do 
a quick PHP 4.4.6 soon because of the mentioned problem. If you want new 
features - PECL.

regards,
Derick

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



[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c /sapi/cli php_cli.c

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 19:19:14 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
/php-src/sapi/cli   php_cli.c 
  Log:
  don't call php_module_startup() directly, use startup functions
  patch by Andrei Nigmatulin
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.313r2=1.314diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.313 php-src/sapi/cgi/cgi_main.c:1.314
--- php-src/sapi/cgi/cgi_main.c:1.313   Tue Feb 20 09:09:47 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Feb 20 19:19:14 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.313 2007/02/20 09:09:47 tony2001 Exp $ */
+/* $Id: cgi_main.c,v 1.314 2007/02/20 19:19:14 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -116,6 +116,7 @@
 
 static char *php_optarg = NULL;
 static int php_optind = 1;
+static zend_module_entry cgi_module_entry;
 
 static const opt_struct OPTIONS[] = {
{'a', 0, interactive},
@@ -542,7 +543,7 @@
 
 static int php_cgi_startup(sapi_module_struct *sapi_module)
 {
-   if (php_module_startup(sapi_module, NULL, 0) == FAILURE) {
+   if (php_module_startup(sapi_module, cgi_module_entry, 1) == FAILURE) {
return FAILURE;
}
return SUCCESS;
@@ -1211,7 +1212,7 @@
cgi_sapi_module.additional_functions = additional_functions;
 
/* startup after we get the above ini override se we get things right */
-   if (php_module_startup(cgi_sapi_module, cgi_module_entry, 1) == 
FAILURE) {
+   if (cgi_sapi_module.startup(cgi_sapi_module) == FAILURE) {
 #ifdef ZTS
tsrm_shutdown();
 #endif
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.167r2=1.168diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.167 php-src/sapi/cli/php_cli.c:1.168
--- php-src/sapi/cli/php_cli.c:1.167Tue Jan 23 20:02:29 2007
+++ php-src/sapi/cli/php_cli.c  Tue Feb 20 19:19:14 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.167 2007/01/23 20:02:29 helly Exp $ */
+/* $Id: php_cli.c,v 1.168 2007/02/20 19:19:14 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -710,7 +710,7 @@
 #endif
 
/* startup after we get the above ini override se we get things right */
-   if (php_module_startup(cli_sapi_module, NULL, 0)==FAILURE) {
+   if (cli_sapi_module.startup(cli_sapi_module)==FAILURE) {
/* there is no way to see if we must call zend_ini_deactivate()
 * since we cannot check if EG(ini_directives) has been 
initialised
 * because the executor's constructor does not set initialize 
it.

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



[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi cgi_main.c /sapi/cli php_cli.c

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 19:20:41 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cgi   cgi_main.c 
/php-src/sapi/cli   php_cli.c 
  Log:
  MFH: make use of startup hooks
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.26r2=1.267.2.15.2.27diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.26 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.27
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.26 Mon Feb 19 23:52:13 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Feb 20 19:20:41 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.26 2007/02/19 23:52:13 iliaa Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.27 2007/02/20 19:20:41 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -119,6 +119,7 @@
 
 static char *php_optarg = NULL;
 static int php_optind = 1;
+static zend_module_entry cgi_module_entry;
 
 static const opt_struct OPTIONS[] = {
{'a', 0, interactive},
@@ -567,7 +568,7 @@
 
 static int php_cgi_startup(sapi_module_struct *sapi_module)
 {
-   if (php_module_startup(sapi_module, NULL, 0) == FAILURE) {
+   if (php_module_startup(sapi_module, cgi_module_entry, 1) == FAILURE) {
return FAILURE;
}
return SUCCESS;
@@ -1262,7 +1263,7 @@
cgi_sapi_module.executable_location = argv[0];
 
/* startup after we get the above ini override se we get things right */
-   if (php_module_startup(cgi_sapi_module, cgi_module_entry, 1) == 
FAILURE) {
+   if (cgi_sapi_module.startup(cgi_sapi_module) == FAILURE) {
 #ifdef ZTS
tsrm_shutdown();
 #endif
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.13r2=1.129.2.13.2.14diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.13 
php-src/sapi/cli/php_cli.c:1.129.2.13.2.14
--- php-src/sapi/cli/php_cli.c:1.129.2.13.2.13  Thu Feb  8 16:55:34 2007
+++ php-src/sapi/cli/php_cli.c  Tue Feb 20 19:20:41 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.129.2.13.2.13 2007/02/08 16:55:34 helly Exp $ */
+/* $Id: php_cli.c,v 1.129.2.13.2.14 2007/02/20 19:20:41 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -698,7 +698,7 @@
 #endif
 
/* startup after we get the above ini override se we get things right */
-   if (php_module_startup(cli_sapi_module, NULL, 0)==FAILURE) {
+   if (cli_sapi_module.startup(cli_sapi_module)==FAILURE) {
/* there is no way to see if we must call zend_ini_deactivate()
 * since we cannot check if EG(ini_directives) has been 
initialised
 * because the executor's constructor does not set initialize 
it.

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



[PHP-CVS] cvs: php-src / acinclude.m4 configure.in /sapi/cgi config9.m4

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 20:10:53 2007 UTC

  Modified files:  
/php-srcacinclude.m4 configure.in 
/php-src/sapi/cgi   config9.m4 
  Log:
  move PHP_TEST_WRITE_STDOUT to acinclude.m4 and use it in configure.in
  its result is used in sapi/cli  sapi/embed, not just sapi/cgi
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.361r2=1.362diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.361 php-src/acinclude.m4:1.362
--- php-src/acinclude.m4:1.361  Wed Jan 31 21:29:53 2007
+++ php-src/acinclude.m4Tue Feb 20 20:10:53 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.361 2007/01/31 21:29:53 tony2001 Exp $
+dnl $Id: acinclude.m4,v 1.362 2007/02/20 20:10:53 tony2001 Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2712,3 +2712,33 @@
 AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
   fi
 ])
+
+AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
+  AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
+AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+#include unistd.h
+#endif
+
+#define TEXT This is the test message -- 
+
+main()
+{
+  int n;
+
+  n = write(1, TEXT, sizeof(TEXT)-1);
+  return (!(n == sizeof(TEXT)-1));
+}
+],[
+  ac_cv_write_stdout=yes
+],[
+  ac_cv_write_stdout=no
+],[
+  ac_cv_write_stdout=no
+])
+  ])
+  if test $ac_cv_write_stdout = yes; then
+AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
+  fi
+])
+
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.622r2=1.623diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.622 php-src/configure.in:1.623
--- php-src/configure.in:1.622  Fri Jan 26 11:13:50 2007
+++ php-src/configure.inTue Feb 20 20:10:53 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.622 2007/01/26 11:13:50 tony2001 Exp $ -*- autoconf 
-*-
+ ## $Id: configure.in,v 1.623 2007/02/20 20:10:53 tony2001 Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -286,6 +286,9 @@
 dnl Check whether the system byte ordering is bigendian
 PHP_C_BIGENDIAN
 
+dnl Check whether writing to stdout works
+PHP_TEST_WRITE_STDOUT
+
 dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
 dnl and source packages.  This should be harmless on other OSs.
 if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/config9.m4?r1=1.21r2=1.22diff_format=u
Index: php-src/sapi/cgi/config9.m4
diff -u php-src/sapi/cgi/config9.m4:1.21 php-src/sapi/cgi/config9.m4:1.22
--- php-src/sapi/cgi/config9.m4:1.21Thu Feb  2 10:00:09 2006
+++ php-src/sapi/cgi/config9.m4 Tue Feb 20 20:10:53 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config9.m4,v 1.21 2006/02/02 10:00:09 dmitry Exp $
+dnl $Id: config9.m4,v 1.22 2007/02/20 20:10:53 tony2001 Exp $
 dnl
 
 AC_ARG_ENABLE(cgi,
@@ -10,36 +10,6 @@
   PHP_SAPI_CGI=yes
 ])
 
-AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
-  AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
-AC_TRY_RUN([
-#ifdef HAVE_UNISTD_H
-#include unistd.h
-#endif
-
-#define TEXT This is the test message -- 
-
-main()
-{
-  int n;
-
-  n = write(1, TEXT, sizeof(TEXT)-1);
-  return (!(n == sizeof(TEXT)-1));
-}
-],[
-  ac_cv_write_stdout=yes
-],[
-  ac_cv_write_stdout=no
-],[
-  ac_cv_write_stdout=no
-])
-  ])
-  if test $ac_cv_write_stdout = yes; then
-AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
-  fi
-])
-
-
 if test $PHP_SAPI = default; then
   AC_MSG_CHECKING(for CGI build)
   if test $PHP_SAPI_CGI != no; then
@@ -82,8 +52,6 @@
 esac
 PHP_SUBST(SAPI_CGI_PATH)
 
-PHP_TEST_WRITE_STDOUT
-
 INSTALL_IT=@echo \Installing PHP CGI into: 
\$(INSTALL_ROOT)\$(bindir)/\; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) 
\$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)
 PHP_SELECT_SAPI(cgi, program, fastcgi.c cgi_main.c getopt.c, , 
'$(SAPI_CGI_PATH)')
 

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



[PHP-CVS] cvs: php-src(PHP_5_2) / acinclude.m4 configure.in /sapi/cgi config9.m4

2007-02-20 Thread Antony Dovgal
tony2001Tue Feb 20 20:11:11 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcacinclude.m4 configure.in 
/php-src/sapi/cgi   config9.m4 
  Log:
  MFH: move PHP_TEST_WRITE_STDOUT to acinclude.m4 and use it in configure.in
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.10r2=1.332.2.14.2.11diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.332.2.14.2.10 
php-src/acinclude.m4:1.332.2.14.2.11
--- php-src/acinclude.m4:1.332.2.14.2.10Mon Jan  1 20:10:01 2007
+++ php-src/acinclude.m4Tue Feb 20 20:11:11 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.332.2.14.2.10 2007/01/01 20:10:01 nlopess Exp $
+dnl $Id: acinclude.m4,v 1.332.2.14.2.11 2007/02/20 20:11:11 tony2001 Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2645,3 +2645,33 @@
 AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
   fi
 ])
+
+AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
+  AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
+AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+#include unistd.h
+#endif
+
+#define TEXT This is the test message -- 
+
+main()
+{
+  int n;
+
+  n = write(1, TEXT, sizeof(TEXT)-1);
+  return (!(n == sizeof(TEXT)-1));
+}
+],[
+  ac_cv_write_stdout=yes
+],[
+  ac_cv_write_stdout=no
+],[
+  ac_cv_write_stdout=no
+])
+  ])
+  if test $ac_cv_write_stdout = yes; then
+AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
+  fi
+])
+
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.43r2=1.579.2.52.2.44diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.43 
php-src/configure.in:1.579.2.52.2.44
--- php-src/configure.in:1.579.2.52.2.43Wed Feb  7 11:16:52 2007
+++ php-src/configure.inTue Feb 20 20:11:11 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.52.2.43 2007/02/07 11:16:52 tony2001 Exp $ -*- 
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.52.2.44 2007/02/20 20:11:11 tony2001 Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -288,6 +288,9 @@
 dnl Check whether the system byte ordering is bigendian
 PHP_C_BIGENDIAN
 
+dnl Check whether writing to stdout works
+PHP_TEST_WRITE_STDOUT
+
 dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
 dnl and source packages.  This should be harmless on other OSs.
 if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/config9.m4?r1=1.17.2.2.2.1r2=1.17.2.2.2.2diff_format=u
Index: php-src/sapi/cgi/config9.m4
diff -u php-src/sapi/cgi/config9.m4:1.17.2.2.2.1 
php-src/sapi/cgi/config9.m4:1.17.2.2.2.2
--- php-src/sapi/cgi/config9.m4:1.17.2.2.2.1Thu Sep 28 09:37:52 2006
+++ php-src/sapi/cgi/config9.m4 Tue Feb 20 20:11:11 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config9.m4,v 1.17.2.2.2.1 2006/09/28 09:37:52 dmitry Exp $
+dnl $Id: config9.m4,v 1.17.2.2.2.2 2007/02/20 20:11:11 tony2001 Exp $
 dnl
 
 AC_ARG_ENABLE(cgi,
@@ -50,36 +50,6 @@
   PHP_ENABLE_PATHINFO_CHECK=yes
 ])
 
-AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
-  AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
-AC_TRY_RUN([
-#ifdef HAVE_UNISTD_H
-#include unistd.h
-#endif
-
-#define TEXT This is the test message -- 
-
-main()
-{
-  int n;
-
-  n = write(1, TEXT, sizeof(TEXT)-1);
-  return (!(n == sizeof(TEXT)-1));
-}
-],[
-  ac_cv_write_stdout=yes
-],[
-  ac_cv_write_stdout=no
-],[
-  ac_cv_write_stdout=no
-])
-  ])
-  if test $ac_cv_write_stdout = yes; then
-AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
-  fi
-])
-
-
 if test $PHP_SAPI = default; then
   AC_MSG_CHECKING(for CGI build)
   if test $PHP_SAPI_CGI != no; then
@@ -96,8 +66,6 @@
 esac
 PHP_SUBST(SAPI_CGI_PATH)
 
-PHP_TEST_WRITE_STDOUT
-
 AC_MSG_CHECKING(whether to force Apache CGI redirect)
 if test $PHP_FORCE_CGI_REDIRECT = yes; then
   REDIRECT=1

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



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

2007-02-20 Thread Stanislav Malyshev
stasTue Feb 20 20:30:36 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/com_dotnet com_dotnet.c 
  Log:
  fix unallocated free
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/com_dotnet/com_dotnet.c?r1=1.14.2.1.2.2r2=1.14.2.1.2.3diff_format=u
Index: php-src/ext/com_dotnet/com_dotnet.c
diff -u php-src/ext/com_dotnet/com_dotnet.c:1.14.2.1.2.2 
php-src/ext/com_dotnet/com_dotnet.c:1.14.2.1.2.3
--- php-src/ext/com_dotnet/com_dotnet.c:1.14.2.1.2.2Mon Jan  1 09:35:48 2007
+++ php-src/ext/com_dotnet/com_dotnet.c Tue Feb 20 20:30:36 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_dotnet.c,v 1.14.2.1.2.2 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: com_dotnet.c,v 1.14.2.1.2.3 2007/02/20 20:30:36 stas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -275,8 +275,9 @@
char buf[1024];
char *err = php_win_err(hr);
snprintf(buf, sizeof(buf), Failed to instantiate .Net object 
[%s] [0x%08x] %s, where, hr, err);
-   if (err)
+   if (err  err[0]) {
LocalFree(err);
+   }
php_com_throw_exception(hr, buf TSRMLS_CC);
ZVAL_NULL(object);
return;

-- 
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/ircg ircg.c php_ircg.h

2007-02-20 Thread Marcus Boerger
Hello Sascha,

  can we all please stick to our rules and not add new code to mini
releases. We even did not apply the patch we need for gcov testing.
If that is a problem I suggest to move this to extension pecl or
create a copy in pecl and do the changes there.

best regards
marcus

Tuesday, February 20, 2007, 8:04:28 PM, you wrote:

 sas Tue Feb 20 19:04:28 2007 UTC

   Modified files:  (Branch: PHP_4_4)
 /php-src/ext/ircg   ircg.c php_ircg.h 
   Log:
   - sync with current dev
   
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/ircg/ircg.c?r1=1.137.2.18.4.2r2=1.137.2.18.4.3diff_format=u
 Index: php-src/ext/ircg/ircg.c
 diff -u php-src/ext/ircg/ircg.c:1.137.2.18.4.2
 php-src/ext/ircg/ircg.c:1.137.2.18.4.3
 --- php-src/ext/ircg/ircg.c:1.137.2.18.4.2  Mon Jan  1 09:46:43 2007
 +++ php-src/ext/ircg/ircg.c Tue Feb 20 19:04:28 2007
 @@ -16,7 +16,7 @@
 +--+
   */
  
 -/* $Id: ircg.c,v 1.137.2.18.4.2 2007/01/01 09:46:43 sebastian Exp $ */
 +/* $Id: ircg.c,v 1.137.2.18.4.3 2007/02/20 19:04:28 sas Exp $ */
  
  /* {{{ includes */
  
 @@ -124,6 +124,7 @@
  /* {{{ ircg_functions[] */
  function_entry ircg_functions[] = {
 PHP_FE(ircg_set_on_die, NULL)
 +   PHP_FE(ircg_create_file_on_die, NULL)
 PHP_FE(ircg_pconnect, NULL)
 PHP_FE(ircg_set_current, NULL)
 PHP_FE(ircg_set_file, NULL)
 @@ -204,6 +205,8 @@
 struct in_addr od_ip;
 short od_port;
  #endif
 +
 +   char *od_file;
 
 int file_fd;
 
 @@ -231,6 +234,7 @@
 P_NICKNAME_JS = 3,
 P_HTML= 4,
 P_HTML_JS = 5,
 +   P_XML = 6,
 P_NOAUTO_LINKS = 8, /* Don't automatically convert links */
 P_CONV_BR  = 16,/* Convert a special character to br */
 P_COND_STOP= 32,/* If argument != username, stop */
 @@ -393,6 +397,7 @@
  static void quit_handler(irconn_t *c, void *dummy)
  {
 php_irconn_t *conn = dummy;
 +   int fd;
  
 irc_quit_handlers++;
 if (conn-fd  -1) {
 @@ -425,6 +430,14 @@
 free(conn-od_data);
 }
  #endif
 +
 +   if (conn-od_file) {
 +   fd = open(conn-od_file, O_CREAT | O_WRONLY, 0666);
 +   if (fd != -1) {
 +   close(fd);
 +   }
 +   free(conn-od_file);
 +   }
 
 free(conn);
  }
 @@ -451,6 +464,47 @@
 }
  }
  
 +static void ircg_xml_escape(smart_str *input, smart_str *output)
 +{
 +   unsigned char *p;
 +   unsigned char *end;
 +   unsigned char c;
 +
 +   end = input-c + input-len;
 +
 +   for(p = input-c; p  end; p++) {
 +   c = *p;
 +
 +   if (c = 0  c  32) {
 +   smart_str_appendl_ex(output, #, 2, 1);
 +   smart_str_append_long_ex(output, c, 1);
 +   smart_str_appendc_ex(output, ';', 1);
 +   continue;
 +   }
 +   
 +   switch (c) {
 +   case '':
 +   smart_str_appendl_ex(output, quot;, 6, 1);
 +   break;
 +   case '\'':
 +   smart_str_appendl_ex(output, #039;, 6, 1);
 +   break;
 +
 +   case '':
 +   smart_str_appendl_ex(output, lt;, 4, 1);
 +   break;
 +
 +   case '':
 +   smart_str_appendl_ex(output, gt;, 4, 1);
 +   break;
 +
 +   default:
 +   smart_str_appendc_ex(output, c, 1);
 +   break;
 +   }
 +   }
 +}
 +
  static const char hextab[] = 0123456789abcdef;
  
  #define NICKNAME_ESC_CHAR '|'
 @@ -621,6 +675,7 @@
 case '4': mode |= P_CONV_BR; goto next;
 case '5': mode |= P_COND_STOP; goto next;
 case '6': mode |= P_HTML; goto next;
 +   case '7': mode |= P_XML; goto next;
  
 /* associate mode bits with each command where applicable */
 case 'c': NEW_TOKEN(C_CHANNEL, v) = mode; break;
 @@ -701,6 +756,10 @@
 ircg_js_escape(tmp, result);   \
 smart_str_free_ex(tmp, 1);  
 break;   
 +   case P_XML:  
 +   if (!what) break;
 +   ircg_xml_escape(what, result);  \
 +   break;   
 case P_HTML: 
 if (!what) break;
 if (use_cache) {   

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

2007-02-20 Thread Stanislav Malyshev
stasWed Feb 21 01:11:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/com_dotnet com_dotnet.c 
  Log:
  CreateInstance requires BSTR (should fix #33188)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/com_dotnet/com_dotnet.c?r1=1.14.2.1.2.3r2=1.14.2.1.2.4diff_format=u
Index: php-src/ext/com_dotnet/com_dotnet.c
diff -u php-src/ext/com_dotnet/com_dotnet.c:1.14.2.1.2.3 
php-src/ext/com_dotnet/com_dotnet.c:1.14.2.1.2.4
--- php-src/ext/com_dotnet/com_dotnet.c:1.14.2.1.2.3Tue Feb 20 20:30:36 2007
+++ php-src/ext/com_dotnet/com_dotnet.c Wed Feb 21 01:11:11 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_dotnet.c,v 1.14.2.1.2.3 2007/02/20 20:30:36 stas Exp $ */
+/* $Id: com_dotnet.c,v 1.14.2.1.2.4 2007/02/21 01:11:11 stas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -188,6 +188,7 @@
int assembly_name_len, datatype_name_len;
struct dotnet_runtime_stuff *stuff;
OLECHAR *oleassembly, *oletype;
+   BSTR oleassembly_sys, oletype_sys;
HRESULT hr;
int ret = FAILURE;
char *where = ;
@@ -223,10 +224,14 @@
 
oletype = php_com_string_to_olestring(datatype_name, datatype_name_len, 
obj-code_page TSRMLS_CC);
oleassembly = php_com_string_to_olestring(assembly_name, 
assembly_name_len, obj-code_page TSRMLS_CC);
+   oletype_sys = SysAllocString(oletype);
+   oleassembly_sys = SysAllocString(oleassembly);
where = CreateInstance;
-   hr = stuff-dotnet_domain-lpVtbl-CreateInstance(stuff-dotnet_domain, 
oleassembly, oletype, unk);
+   hr = stuff-dotnet_domain-lpVtbl-CreateInstance(stuff-dotnet_domain, 
oleassembly_sys, oletype_sys, unk);
efree(oletype);
efree(oleassembly);
+   SysFreeString(oletype_sys);
+   SysFreeString(oleassembly_sys);
 
if (SUCCEEDED(hr)) {
VARIANT unwrapped;

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



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

2007-02-20 Thread Stanislav Malyshev
stasWed Feb 21 01:13:44 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/com_dotnet com_olechar.c 
  Log:
  Cosmetic fix - safe_emalloc(nmemb, size, offset)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/com_dotnet/com_olechar.c?r1=1.5.2.1.2.2r2=1.5.2.1.2.3diff_format=u
Index: php-src/ext/com_dotnet/com_olechar.c
diff -u php-src/ext/com_dotnet/com_olechar.c:1.5.2.1.2.2 
php-src/ext/com_dotnet/com_olechar.c:1.5.2.1.2.3
--- php-src/ext/com_dotnet/com_olechar.c:1.5.2.1.2.2Mon Feb 19 17:29:19 2007
+++ php-src/ext/com_dotnet/com_olechar.cWed Feb 21 01:13:44 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: com_olechar.c,v 1.5.2.1.2.2 2007/02/19 17:29:19 dmitry Exp $ */
+/* $Id: com_olechar.c,v 1.5.2.1.2.3 2007/02/21 01:13:44 stas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -45,7 +45,7 @@
}
 
if (string_len  0) {
-   olestring = (OLECHAR*)safe_emalloc(sizeof(OLECHAR), string_len, 
0);
+   olestring = (OLECHAR*)safe_emalloc(string_len, sizeof(OLECHAR), 
0);
ok = MultiByteToWideChar(codepage, flags, string, string_len, 
olestring, string_len);
} else {
ok = FALSE;
@@ -75,7 +75,7 @@
length = WideCharToMultiByte(codepage, 0, olestring, -1, NULL, 0, NULL, 
NULL);
 
if (length) {
-   string = (char*)safe_emalloc(sizeof(char), length, 0);
+   string = (char*)safe_emalloc(length, sizeof(char), 0);
length = WideCharToMultiByte(codepage, 0, olestring, -1, 
string, length, NULL, NULL);
ok = length  0;
} else {

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



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

2007-02-20 Thread Stanislav Malyshev
stasWed Feb 21 01:21:24 2007 UTC

  Modified files:  
/php-src/ext/com_dotnet com_dotnet.c 
  Log:
  MF5.2: CreateInstance requires BSTR (should fix #33188)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/com_dotnet/com_dotnet.c?r1=1.17r2=1.18diff_format=u
Index: php-src/ext/com_dotnet/com_dotnet.c
diff -u php-src/ext/com_dotnet/com_dotnet.c:1.17 
php-src/ext/com_dotnet/com_dotnet.c:1.18
--- php-src/ext/com_dotnet/com_dotnet.c:1.17Mon Jan  1 09:29:21 2007
+++ php-src/ext/com_dotnet/com_dotnet.c Wed Feb 21 01:21:24 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_dotnet.c,v 1.17 2007/01/01 09:29:21 sebastian Exp $ */
+/* $Id: com_dotnet.c,v 1.18 2007/02/21 01:21:24 stas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -188,6 +188,7 @@
int assembly_name_len, datatype_name_len;
struct dotnet_runtime_stuff *stuff;
OLECHAR *oleassembly, *oletype;
+   BSTR oleassembly_sys, oletype_sys;
HRESULT hr;
int ret = FAILURE;
char *where = ;
@@ -223,10 +224,14 @@
 
oletype = php_com_string_to_olestring(datatype_name, datatype_name_len, 
obj-code_page TSRMLS_CC);
oleassembly = php_com_string_to_olestring(assembly_name, 
assembly_name_len, obj-code_page TSRMLS_CC);
+   oletype_sys = SysAllocString(oletype);
+   oleassembly_sys = SysAllocString(oleassembly);
where = CreateInstance;
-   hr = stuff-dotnet_domain-lpVtbl-CreateInstance(stuff-dotnet_domain, 
oleassembly, oletype, unk);
+   hr = stuff-dotnet_domain-lpVtbl-CreateInstance(stuff-dotnet_domain, 
oleassembly_sys, oletype_sys, unk);
efree(oletype);
efree(oleassembly);
+   SysFreeString(oletype_sys);
+   SysFreeString(oleassembly_sys);
 
if (SUCCEEDED(hr)) {
VARIANT unwrapped;
@@ -275,8 +280,9 @@
char buf[1024];
char *err = php_win_err(hr);
snprintf(buf, sizeof(buf), Failed to instantiate .Net object 
[%s] [0x%08x] %s, where, hr, err);
-   if (err)
+   if (err  err[0]) {
LocalFree(err);
+   }
php_com_throw_exception(hr, buf TSRMLS_CC);
ZVAL_NULL(object);
return;

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



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

2007-02-20 Thread Stanislav Malyshev
stasWed Feb 21 03:03:37 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   basic_functions.c 
  Log:
  fix putenv - if there was no previous, remove variable from environ
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.41r2=1.725.2.31.2.42diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.41 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.42
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.41  Fri Feb 16 
16:35:04 2007
+++ php-src/ext/standard/basic_functions.c  Wed Feb 21 03:03:37 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.41 2007/02/16 16:35:04 dmitry Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.42 2007/02/21 03:03:37 stas Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3851,6 +3851,10 @@
 # if HAVE_UNSETENV
unsetenv(pe-key);
 # elif defined(PHP_WIN32)
+   char *del_string = emalloc(pe-key_len+2);
+   snprintf(del_string, pe-key_len+2, %s=, pe-key);
+   putenv(del_string);
+   efree(del_string);
SetEnvironmentVariable(pe-key, NULL);
 # else
char **env;

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



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

2007-02-20 Thread Ilia Alshanetsky
iliaa   Wed Feb 21 03:59:05 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   html.c 
  Log:
  Use strlcpy() rather then strcpy()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.6r2=1.111.2.2.2.7diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.111.2.2.2.6 
php-src/ext/standard/html.c:1.111.2.2.2.7
--- php-src/ext/standard/html.c:1.111.2.2.2.6   Thu Jan 18 16:21:32 2007
+++ php-src/ext/standard/html.c Wed Feb 21 03:59:05 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: html.c,v 1.111.2.2.2.6 2007/01/18 16:21:32 tony2001 Exp $ */
+/* $Id: html.c,v 1.111.2.2.2.7 2007/02/21 03:59:05 iliaa Exp $ */
 
 /*
  * HTML entity resources:
@@ -1138,7 +1138,7 @@
}
 
replaced[len++] = '';
-   strcpy(replaced + len, rep);
+   strlcpy(replaced + len, rep, maxlen);
len += l;
replaced[len++] = ';';
}

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



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

2007-02-20 Thread Ilia Alshanetsky
iliaa   Wed Feb 21 04:29:15 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/soap   php_http.c 
  Log:
  
  Improve redirect validation
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.77.2.11.2.5r2=1.77.2.11.2.6diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.77.2.11.2.5 
php-src/ext/soap/php_http.c:1.77.2.11.2.6
--- php-src/ext/soap/php_http.c:1.77.2.11.2.5   Mon Jan  1 09:36:06 2007
+++ php-src/ext/soap/php_http.c Wed Feb 21 04:29:15 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_http.c,v 1.77.2.11.2.5 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_http.c,v 1.77.2.11.2.6 2007/02/21 04:29:15 iliaa Exp $ */
 
 #include php_soap.h
 #include ext/standard/base64.h
@@ -910,19 +910,20 @@
efree(http_body);
efree(loc);
if (new_url-scheme == NULL  new_url-path != 
NULL) {
-   new_url-scheme = 
estrdup(phpurl-scheme);
-   new_url-host = estrdup(phpurl-host);
+   new_url-scheme = NULL;
+   new_url-host = phpurl-host ? 
estrdup(phpurl-host) : NULL;
new_url-port = phpurl-port;
if (new_url-path  new_url-path[0] 
!= '/') {
-   char *t = 
phpurl-path?phpurl-path:/;
+   char *t = phpurl-path;
char *p = strrchr(t, '/');
-   char *s = emalloc((p - t) + 
strlen(new_url-path) + 2);
-
-   strncpy(s, t, (p - t) + 1);
-   s[(p - t) + 1] = 0;
-   strcat(s, new_url-path);
-   efree(new_url-path);
-   new_url-path = s;
+   if (p) {
+   char *s = emalloc((p - 
t) + strlen(new_url-path) + 2);
+   strncpy(s, t, (p - t) + 
1);
+   s[(p - t) + 1] = 0;
+   strcat(s, 
new_url-path);
+   efree(new_url-path);
+   new_url-path = s;
+   }
}
}
phpurl = new_url;

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