cvs: php-src(PHP_5_2) /ext/tidy tidy.c
| From: | Nuno Lopes | Date: | Sat, 08 Jul 2006 00:13:17 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/tidy tidy.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-39066@lists.php.net to get a copy of this message | ||
nlopess Sat Jul 8 00:13:17 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/tidy tidy.c
Log:
MFH
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.3&r2=1.66.2.8.2.4&diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.3 php-src/ext/tidy/tidy.c:1.66.2.8.2.4
--- php-src/ext/tidy/tidy.c:1.66.2.8.2.3 Thu Jun 15 18:33:09 2006
+++ php-src/ext/tidy/tidy.c Sat Jul 8 00:13:17 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tidy.c,v 1.66.2.8.2.3 2006/06/15 18:33:09 dmitry Exp $ */
+/* $Id: tidy.c,v 1.66.2.8.2.4 2006/07/08 00:13:17 nlopess Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -91,9 +91,13 @@
} else { \
convert_to_string_ex(&_val); \
TIDY_SAFE_MODE_CHECK(Z_STRVAL_P(_val)); \
- if (tidyLoadConfig(_doc, Z_STRVAL_P(_val)) < 0) { \
+ switch (tidyLoadConfig(_doc, Z_STRVAL_P(_val))) { \
+ case -1: \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not load configuration file
'%s'", Z_STRVAL_P(_val)); \
- RETURN_FALSE; \
+ break; \
+ case 1: \
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "There were errors while parsing
the configuration file '%s'", Z_STRVAL_P(_val)); \
+ break; \
} \
} \
}
@@ -311,10 +315,6 @@
{NULL, NULL, NULL}
};
-zend_function_entry tidy_funcs_exception[] = {
- {NULL, NULL, NULL}
-};
-
zend_class_entry *tidy_ce_doc, *tidy_ce_node, *tidy_ce_exception;
static zend_object_handlers tidy_object_handlers_doc;
@@ -342,22 +342,22 @@
ZEND_GET_MODULE(tidy)
#endif
-void* TIDY_CALL php_tidy_malloc(size_t len)
+static void* TIDY_CALL php_tidy_malloc(size_t len)
{
return emalloc(len);
}
-void* TIDY_CALL php_tidy_realloc(void *buf, size_t len)
+static void* TIDY_CALL php_tidy_realloc(void *buf, size_t len)
{
return erealloc(buf, len);
}
-void TIDY_CALL php_tidy_free(void *buf)
+static void TIDY_CALL php_tidy_free(void *buf)
{
efree(buf);
}
-void TIDY_CALL php_tidy_panic(ctmbstr msg)
+static void TIDY_CALL php_tidy_panic(ctmbstr msg)
{
TSRMLS_FETCH();
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not allocate memory for tidy! (Reason:
%s)", (char *)msg);
@@ -463,19 +463,8 @@
TIDY_SET_DEFAULT_CONFIG(doc);
- /* We can't use TIDY_APPLY_CONFIG_ZVAL() here, it uses RETURN_FALSE */
-
if (ZEND_NUM_ARGS() > 1) {
- if(Z_TYPE_P(config) == IS_ARRAY) {
- _php_tidy_apply_config_array(doc, HASH_OF(config) TSRMLS_CC);
- } else {
- convert_to_string_ex(&config);
- TIDY_SAFE_MODE_CHECK(Z_STRVAL_P(config));
- if (tidyLoadConfig(doc, Z_STRVAL_P(config)) < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not load configuration file
'%s'", Z_STRVAL_P(config));
- RETVAL_FALSE;
- }
- }
+ TIDY_APPLY_CONFIG_ZVAL(doc, config);
}
if(enc_len) {
@@ -1003,7 +992,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Tidy support", "enabled");
php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
- php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id:
tidy.c,v 1.66.2.8.2.3 2006/06/15 18:33:09 dmitry Exp $)");
+ php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id:
tidy.c,v 1.66.2.8.2.4 2006/07/08 00:13:17 nlopess Exp $)");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();