cvs: php4 /main output.c
| From: | Marcus B�rger | Date: | Mon, 19 Aug 2002 18:47:23 +0000 |
| Subject: | cvs: php4 /main output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13468@lists.php.net to get a copy of this message | ||
helly Mon Aug 19 14:47:23 2002 EDT
Modified files:
/php4/main output.c
Log:
-use of php_error_docref
-some more information in ob_get_status()
Index: php4/main/output.c
diff -u php4/main/output.c:1.109 php4/main/output.c:1.110
--- php4/main/output.c:1.109 Tue Aug 13 00:36:18 2002
+++ php4/main/output.c Mon Aug 19 14:47:23 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.109 2002/08/13 04:36:18 rasmus Exp $ */
+/* $Id: output.c,v 1.110 2002/08/19 18:47:23 helly Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -120,7 +120,7 @@
uint initial_size, block_size;
if (OG(ob_lock)) {
- php_error(E_ERROR, "%s() Cannot use output buffering in output buffering display
handlers", get_active_function_name(TSRMLS_C));
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_ERROR, "Cannot use output buffering
in output buffering display handlers");
return FAILURE;
}
if (chunk_size) {
@@ -366,7 +366,7 @@
{
if (php_ob_handler_used(handler_set TSRMLS_CC))
{
- php_error(E_WARNING, "%s() output handler '%s' conflicts with
'%s'", get_active_function_name(TSRMLS_C), handler_new, handler_set);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "output handler
'%s' conflicts with '%s'", handler_new, handler_set);
return 1;
}
return 0;
@@ -386,7 +386,7 @@
/* apply rules */
if (!handler_gz || !handler_mb || !handler_ic) {
if (php_ob_handler_used(handler_name TSRMLS_CC)) {
- php_error(E_WARNING, "%s() output handler '%s' cannot be used twice",
get_active_function_name(TSRMLS_C), handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "output handler
'%s' cannot be used twice", handler_name);
return FAILURE;
}
if (!handler_gz && php_ob_init_conflict(handler_name, "zlib output compression"
TSRMLS_CC))
@@ -508,7 +508,7 @@
}
if (array_init(return_value) == FAILURE) {
- php_error(E_ERROR, "%s(): Unable to initialize array",
get_active_function_name(TSRMLS_C));
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_ERROR, "Unable to initialize
array");
RETURN_FALSE;
}
if (OG(ob_nesting_level)) {
@@ -718,8 +718,7 @@
WRONG_PARAM_COUNT;
if (!OG(ob_nesting_level)) {
- php_error(E_NOTICE, "%s() failed to flush buffer. No buffer to flush.",
- get_active_function_name(TSRMLS_C));
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer. No
buffer to flush.");
RETURN_FALSE;
}
@@ -737,13 +736,11 @@
if (!OG(ob_nesting_level)) {
- php_error(E_NOTICE, "%s() failed to delete buffer. No buffer to delete.",
- get_active_function_name(TSRMLS_C));
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer.
No buffer to delete.");
RETURN_FALSE;
}
- if (OG(ob_nesting_level) && !OG(active_ob_buffer).status &&
!OG(active_ob_buffer).erase) {
- php_error(E_NOTICE, "%s() failed to delete buffer %s.",
- get_active_function_name(TSRMLS_C), OG(active_ob_buffer).handler_name);
+ if (!OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer
%s.", OG(active_ob_buffer).handler_name);
RETURN_FALSE;
}
@@ -760,13 +757,11 @@
WRONG_PARAM_COUNT;
if (!OG(ob_nesting_level)) {
- php_error(E_NOTICE, "%s() failed to delete and flush buffer. No buffer to delete or
flush.",
- get_active_function_name(TSRMLS_C));
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush
buffer. No buffer to delete or flush.");
RETURN_FALSE;
}
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status &&
!OG(active_ob_buffer).erase) {
- php_error(E_NOTICE, "%s() failed to delete buffer %s.",
- get_active_function_name(TSRMLS_C), OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer
%s.", OG(active_ob_buffer).handler_name);
RETURN_FALSE;
}
@@ -783,13 +778,11 @@
WRONG_PARAM_COUNT;
if (!OG(ob_nesting_level)) {
- php_error(E_NOTICE, "%s() failed to delete buffer. No buffer to delete.",
- get_active_function_name(TSRMLS_C));
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer.
No buffer to delete.");
RETURN_FALSE;
}
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status &&
!OG(active_ob_buffer).erase) {
- php_error(E_NOTICE, "%s() failed to delete buffer %s.",
- get_active_function_name(TSRMLS_C), OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer
%s.", OG(active_ob_buffer).handler_name);
RETURN_FALSE;
}
@@ -846,9 +839,12 @@
if (ob_buffer->internal_output_handler) {
add_assoc_long(elem, "type", PHP_OUTPUT_HANDLER_INTERNAL);
+ add_assoc_long(elem, "buffer_size", ob_buffer->internal_output_handler_buffer_size);
}
else {
add_assoc_long(elem, "type", PHP_OUTPUT_HANDLER_USER);
+ add_assoc_long(elem, "initial_size", ob_buffer->size);
+ add_assoc_long(elem, "chunk_size", ob_buffer->chunk_size);
}
add_assoc_long(elem, "status", ob_buffer->status);
add_assoc_string(elem, "name", ob_buffer->handler_name, 1);