sas Sat Mar 31 07:53:14 2001 EDT
Modified files:
/php4/ext/ircg ircg.c php_ircg.h
Log:
Add ircg_html_encode() which is an interface to the standard
HTML encoder for URLs and color attributes.
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.53 php4/ext/ircg/ircg.c:1.54
--- php4/ext/ircg/ircg.c:1.53 Sat Mar 10 15:51:56 2001
+++ php4/ext/ircg/ircg.c Sat Mar 31 07:53:14 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.53 2001/03/10 23:51:56 sas Exp $ */
+/* $Id: ircg.c,v 1.54 2001/03/31 15:53:14 sas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -76,6 +76,7 @@
PHP_FE(ircg_nick, NULL)
PHP_FE(ircg_topic, NULL)
PHP_FE(ircg_channel_mode, NULL)
+ PHP_FE(ircg_html_encode, NULL)
PHP_FE(ircg_whois, NULL)
PHP_FE(ircg_kick, NULL)
PHP_FE(ircg_disconnect, NULL)
@@ -750,6 +751,21 @@
irc_handle_command(&conn->conn, "TOPIC", 2, Z_STRVAL_PP(p2), Z_STRVAL_PP(p3));
RETVAL_TRUE;
#endif
+}
+
+PHP_FUNCTION(ircg_html_encode)
+{
+ zval **p1;
+ smart_str res = {0};
+
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &p1) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_string_ex(p1);
+
+ ircg_mirc_color(Z_STRVAL_PP(p1), &res, Z_STRLEN_PP(p1));
+
+ RETVAL_STRINGL(res.c, res.len, 0);
}
PHP_FUNCTION(ircg_kick)
Index: php4/ext/ircg/php_ircg.h
diff -u php4/ext/ircg/php_ircg.h:1.8 php4/ext/ircg/php_ircg.h:1.9
--- php4/ext/ircg/php_ircg.h:1.8 Wed Mar 7 14:18:50 2001
+++ php4/ext/ircg/php_ircg.h Sat Mar 31 07:53:14 2001
@@ -37,6 +37,7 @@
PHP_FUNCTION(ircg_whois);
PHP_FUNCTION(ircg_msg);
PHP_FUNCTION(ircg_nick);
+PHP_FUNCTION(ircg_html_encode);
PHP_FUNCTION(ircg_kick);
PHP_FUNCTION(ircg_topic);
PHP_FUNCTION(ircg_channel_mode);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]