cvs: /php4/ext/standard output.c
| From: | Zeev Suraski | Date: | Thu, 13 Jan 2000 17:55:21 +0000 |
| Subject: | cvs: /php4/ext/standard output.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9113@lists.php.net to get a copy of this message | ||
zeev Thu Jan 13 09:55:21 2000 EDT
Modified files:
/php4/ext/standard output.c
Log:
Woops, forgot to commit the right version of the file...
Index: php4/ext/standard/output.c
diff -u php4/ext/standard/output.c:1.11 php4/ext/standard/output.c:1.12
--- php4/ext/standard/output.c:1.11 Thu Jan 13 09:37:20 2000
+++ php4/ext/standard/output.c Thu Jan 13 09:54:51 2000
@@ -67,6 +67,7 @@
PHP_FUNCTION(ob_end_flush);
PHP_FUNCTION(ob_end_clean);
PHP_FUNCTION(ob_get_contents);
+PHP_FUNCTION(ob_implicit_flush);
static void php_output_init_globals(OLS_D)
@@ -97,6 +98,7 @@
PHP_FE(ob_end_flush, NULL)
PHP_FE(ob_end_clean, NULL)
PHP_FE(ob_get_contents, NULL)
+ PHP_FE(ob_implicit_flush, NULL)
{NULL, NULL, NULL}
};
@@ -184,13 +186,18 @@
PHPAPI void php_start_implicit_flush()
{
- php_end_ob_buffering(1); /* Switch out of output buffering if we're in it */
+ OLS_FETCH();
+ php_end_ob_buffering(1); /* Switch out of output buffering if we're in it */
+ OG(implicit_flush)=1;
}
PHPAPI void php_end_implicit_flush()
{
+ OLS_FETCH();
+
+ OG(implicit_flush)=0;
}
@@ -329,6 +336,9 @@
free(newstr);
}
+ if (OG(implicit_flush)) {
+ sapi_flush();
+ }
return result;
}
@@ -399,6 +409,11 @@
convert_to_long_ex(zv_flag);
flag = (*zv_flag)->value.lval;
break;
+ }
+ if (flag) {
+ php_start_implicit_flush();
+ } else {
+ php_end_implicit_flush();
}
}