cvs: php4 /ext/standard basic_functions.c /main output.c php_output.h

From: Date: Fri, 30 Nov 2001 10:48:39 +0000
Subject: cvs: php4 /ext/standard basic_functions.c /main output.c php_output.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8336@lists.php.net to get a copy of this message
derick Fri Nov 30 05:48:39 2001 EDT Modified files: /php4/main php_output.h output.c /php4/ext/standard basic_functions.c Log: - Added ob_flush and ob_clean functions, which do not end the buffer like ob_end_flush and ob_end_clean do. @- Added ob_flush and ob_clean functions, which flush and clean an @ output buffer without destroying the buffer. (Derick) Index: php4/main/php_output.h diff -u php4/main/php_output.h:1.30 php4/main/php_output.h:1.31 --- php4/main/php_output.h:1.30 Sun Aug 5 11:55:43 2001 +++ php4/main/php_output.h Fri Nov 30 05:48:38 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_output.h,v 1.30 2001/08/05 15:55:43 sas Exp $ */ +/* $Id: php_output.h,v 1.31 2001/11/30 10:48:38 derick Exp $ */ #ifndef PHP_OUTPUT_H #define PHP_OUTPUT_H @@ -43,6 +43,8 @@ PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size TSRMLS_DC); PHP_FUNCTION(ob_start); +PHP_FUNCTION(ob_flush); +PHP_FUNCTION(ob_clean); PHP_FUNCTION(ob_end_flush); PHP_FUNCTION(ob_end_clean); PHP_FUNCTION(ob_get_contents); Index: php4/main/output.c diff -u php4/main/output.c:1.79 php4/main/output.c:1.80 --- php4/main/output.c:1.79 Tue Sep 25 17:58:33 2001 +++ php4/main/output.c Fri Nov 30 05:48:38 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.79 2001/09/25 21:58:33 jeroen Exp $ */ +/* $Id: output.c,v 1.80 2001/11/30 10:48:38 derick Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -530,6 +530,22 @@ RETURN_FALSE; } RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto void ob_flush(void) + Flush (send) the output buffer */ +PHP_FUNCTION(ob_flush) +{ + php_end_ob_buffer(1, 1 TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto void ob_clean(void) + Clean (erase) the output buffer */ +PHP_FUNCTION(ob_clean) +{ + php_end_ob_buffer(0, 1 TSRMLS_CC); } /* }}} */ Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.422 php4/ext/standard/basic_functions.c:1.423 --- php4/ext/standard/basic_functions.c:1.422 Sun Nov 18 13:48:17 2001 +++ php4/ext/standard/basic_functions.c Fri Nov 30 05:48:38 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.422 2001/11/18 18:48:17 derick Exp $ */ +/* $Id: basic_functions.c,v 1.423 2001/11/30 10:48:38 derick Exp $ */ #include "php.h" #include "php_main.h" @@ -720,6 +720,8 @@ /* functions from output.c */ PHP_FE(ob_start, NULL) + PHP_FE(ob_flush, NULL) + PHP_FE(ob_clean, NULL) PHP_FE(ob_end_flush, NULL) PHP_FE(ob_end_clean, NULL) PHP_FE(ob_get_length, NULL)

« previous php.cvs (#8336) next »