cvs: php4 /ext/domxml php_domxml.c php_domxml.h
| From: | Christian Stocker | Date: | Fri, 14 Jun 2002 12:20:13 +0000 |
| Subject: | cvs: php4 /ext/domxml php_domxml.c php_domxml.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12360@lists.php.net to get a copy of this message | ||
chregu Fri Jun 14 08:20:13 2002 EDT
Modified files:
/php4/ext/domxml php_domxml.c php_domxml.h
Log:
- oops, that didn't even compile
- added domxml_parser_reference(reference)
Index: php4/ext/domxml/php_domxml.c
diff -u php4/ext/domxml/php_domxml.c:1.170 php4/ext/domxml/php_domxml.c:1.171
--- php4/ext/domxml/php_domxml.c:1.170 Fri Jun 14 08:12:02 2002
+++ php4/ext/domxml/php_domxml.c Fri Jun 14 08:20:13 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_domxml.c,v 1.170 2002/06/14 12:12:02 chregu Exp $ */
+/* $Id: php_domxml.c,v 1.171 2002/06/14 12:20:13 chregu Exp $ */
/* TODO
* - Support Notation Nodes
@@ -237,6 +237,7 @@
PHP_FE(domxml_parser_end_element, NULL)
PHP_FE(domxml_parser_comment, NULL)
PHP_FE(domxml_parser_characters, NULL)
+ PHP_FE(domxml_parser_reference, NULL)
PHP_FE(domxml_parser_cdata_block, NULL)
PHP_FE(domxml_parser_start_document, NULL)
PHP_FE(domxml_parser_end_document, NULL)
@@ -329,6 +330,7 @@
PHP_FALIAS(start_element, domxml_parser_start_element, NULL)
PHP_FALIAS(end_element, domxml_parser_end_element, NULL)
PHP_FALIAS(characters, domxml_parser_characters, NULL)
+ PHP_FALIAS(reference, domxml_parser_reference, NULL)
PHP_FALIAS(cdata_block, domxml_parser_cdata_block, NULL)
PHP_FALIAS(comment, domxml_parser_comment, NULL)
PHP_FALIAS(start_document, domxml_parser_start_document, NULL)
@@ -4093,17 +4095,17 @@
{
zval *id;
xmlParserCtxtPtr parserp;
- char *comment;
- int comment_len, error;
+ char *commentstring;
+ int commentstring_len, error;
- DOMXML_PARAM_TWO(parserp, id, le_domxmlparserp,"s", &comment, &comment_len);
+ DOMXML_PARAM_TWO(parserp, id, le_domxmlparserp,"s", &commentstring,
&commentstring_len);
if (parserp->myDoc == NULL) {
php_error(E_WARNING, "%s(): Document was not started",
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
- comment(parserp, (xmlChar *) comment);
+ comment(parserp, (xmlChar *) commentstring);
RETURN_TRUE;
}
@@ -4137,17 +4139,39 @@
{
zval *id;
xmlParserCtxtPtr parserp;
- char *characters;
+ char *charactersstring;
int characters_len, error;
- DOMXML_PARAM_TWO(parserp, id, le_domxmlparserp,"s", &characters,
&characters_len);
+ DOMXML_PARAM_TWO(parserp, id, le_domxmlparserp,"s", &charactersstring,
&characters_len);
if (parserp->myDoc == NULL) {
php_error(E_WARNING, "%s(): Document was not started",
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
- characters(parserp, (xmlChar *) characters, characters_len);
+ characters(parserp, (xmlChar *) charactersstring, characters_len);
+
+ RETURN_TRUE;
+}
+/* }}} */
+
+/* {{{ proto bool domxml_parser_reference(string reference)
+ Adds entity reference */
+PHP_FUNCTION(domxml_parser_reference)
+{
+ zval *id;
+ xmlParserCtxtPtr parserp;
+ char *referencestring;
+ int reference_len, error;
+
+ DOMXML_PARAM_TWO(parserp, id, le_domxmlparserp,"s", &referencestring,
&reference_len);
+
+ if (parserp->myDoc == NULL) {
+ php_error(E_WARNING, "%s(): Document was not started",
get_active_function_name(TSRMLS_C));
+ RETURN_FALSE;
+ }
+
+ reference(parserp, (xmlChar *) referencestring);
RETURN_TRUE;
}
Index: php4/ext/domxml/php_domxml.h
diff -u php4/ext/domxml/php_domxml.h:1.59 php4/ext/domxml/php_domxml.h:1.60
--- php4/ext/domxml/php_domxml.h:1.59 Fri Jun 14 08:12:04 2002
+++ php4/ext/domxml/php_domxml.h Fri Jun 14 08:20:13 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_domxml.h,v 1.59 2002/06/14 12:12:04 chregu Exp $ */
+/* $Id: php_domxml.h,v 1.60 2002/06/14 12:20:13 chregu Exp $ */
#ifndef PHP_DOMXML_H
#define PHP_DOMXML_H
@@ -189,6 +189,7 @@
PHP_FUNCTION(domxml_parser_start_element);
PHP_FUNCTION(domxml_parser_end_element);
PHP_FUNCTION(domxml_parser_characters);
+PHP_FUNCTION(domxml_parser_reference);
PHP_FUNCTION(domxml_parser_comment);
PHP_FUNCTION(domxml_parser_cdata_block);
PHP_FUNCTION(domxml_parser_start_document);