diff --git a/cgi_main.c b/cgi_main.c index 24ceb764ea9..6056d4fd8d3 100644 --- a/cgi_main.c +++ b/cgi_main.c @@ -372,7 +372,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine break; case 'h': case '?': - zend_output_startup(); + php_output_startup(); SG(headers_sent) = 1; php_cgi_usage(argv[0]); exit(1); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 79034c447b8..e18813609d6 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2175,25 +2175,25 @@ void test_class_startup() PHP_FUNCTION(ob_start) { - zend_start_ob_buffering(); + php_start_ob_buffering(); } PHP_FUNCTION(ob_end_flush) { - zend_end_ob_buffering(1); + php_end_ob_buffering(1); } PHP_FUNCTION(ob_end_clean) { - zend_end_ob_buffering(0); + php_end_ob_buffering(0); } PHP_FUNCTION(ob_get_contents) { - if (zend_ob_get_buffer(return_value)==FAILURE) { + if (php_ob_get_buffer(return_value)==FAILURE) { RETURN_FALSE; } } diff --git a/main/main.c b/main/main.c index 2cef5cf7322..0b3c0541940 100644 --- a/main/main.c +++ b/main/main.c @@ -654,10 +654,10 @@ static void php_message_handler_for_zend(long message, void *data) int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) { - zend_output_startup(); + php_output_startup(); if (PG(output_buffering)) { - zend_start_ob_buffering(); + php_start_ob_buffering(); } #if APACHE /* @@ -732,7 +732,7 @@ void php_request_shutdown(void *dummy) SLS_FETCH(); sapi_send_headers(); - zend_end_ob_buffering(SG(request_info).headers_only?0:1); + php_end_ob_buffering(SG(request_info).headers_only?0:1); php3_call_shutdown_functions(); @@ -771,9 +771,9 @@ static void php3_config_ini_shutdown() } -static int zend_body_write_wrapper(const char *str, uint str_length) +static int php_body_write_wrapper(const char *str, uint str_length) { - return zend_body_write(str, str_length); + return php_body_write(str, str_length); } #ifdef ZTS @@ -825,11 +825,11 @@ int php_module_startup(sapi_module_struct *sf) sapi_module = *sf; - zend_output_startup(); + php_output_startup(); zuf.error_function = php_error; zuf.printf_function = php_printf; - zuf.write_function = zend_body_write_wrapper; + zuf.write_function = php_body_write_wrapper; zuf.fopen_function = php_fopen_wrapper_for_zend; zuf.message_handler = php_message_handler_for_zend; zuf.block_interruptions = BLOCK_INTERRUPTIONS; @@ -1210,7 +1210,7 @@ PHPAPI int apache_php_module_main(request_rec *r, int fd, int display_source_mod } php3_header(); /* Make sure headers have been sent */ - zend_end_ob_buffering(1); + php_end_ob_buffering(1); return (OK); } #endif /* APACHE */ diff --git a/main/php.h b/main/php.h index af977c8ccf6..fec1000107d 100644 --- a/main/php.h +++ b/main/php.h @@ -312,12 +312,12 @@ PHPAPI int cfg_get_string(char *varname, char **result); /* Output support */ #include "output.h" -#define PHPWRITE(str, str_len) zend_body_write((str), (str_len)) -#define PUTS(str) zend_body_write((str), strlen((str))) -#define PUTC(c) (zend_body_write(&(c), 1), (c)) -#define PHPWRITE_H(str, str_len) zend_header_write((str), (str_len)) -#define PUTS_H(str) zend_header_write((str), strlen((str))) -#define PUTC_H(c) (zend_header_write(&(c), 1), (c)) +#define PHPWRITE(str, str_len) php_body_write((str), (str_len)) +#define PUTS(str) php_body_write((str), strlen((str))) +#define PUTC(c) (php_body_write(&(c), 1), (c)) +#define PHPWRITE_H(str, str_len) php_header_write((str), (str_len)) +#define PUTS_H(str) php_header_write((str), strlen((str))) +#define PUTC_H(c) (php_header_write(&(c), 1), (c)) #include "zend_operators.h" diff --git a/output.c b/output.c index 7a64e544e5e..463875d6cec 100644 --- a/output.c +++ b/output.c @@ -24,22 +24,22 @@ #include "SAPI.h" /* output functions */ -PHPAPI int (*zend_body_write)(const char *str, uint str_length); /* string output */ -PHPAPI int (*zend_header_write)(const char *str, uint str_length); /* unbuffer string output */ -static int zend_ub_body_write(const char *str, uint str_length); -static int zend_ub_body_write_no_header(const char *str, uint str_length); -static int zend_b_body_write(const char *str, uint str_length); +PHPAPI int (*php_body_write)(const char *str, uint str_length); /* string output */ +PHPAPI int (*php_header_write)(const char *str, uint str_length); /* unbuffer string output */ +static int php_ub_body_write(const char *str, uint str_length); +static int php_ub_body_write_no_header(const char *str, uint str_length); +static int php_b_body_write(const char *str, uint str_length); /* output buffering */ static char *ob_buffer; static uint ob_buffer_size; static uint ob_block_size; static uint ob_text_length; -static void zend_ob_init(uint initial_size, uint block_size); -static void zend_ob_destroy(); -static void zend_ob_append(const char *text, uint text_length); -static void zend_ob_prepend(const char *text, uint text_length); -static inline void zend_ob_send(); +static void php_ob_init(uint initial_size, uint block_size); +static void php_ob_destroy(); +static void php_ob_append(const char *text, uint text_length); +static void php_ob_prepend(const char *text, uint text_length); +static inline void php_ob_send(); /* @@ -47,24 +47,24 @@ static inline void zend_ob_send(); */ /* Start output layer */ -PHPAPI void zend_output_startup() +PHPAPI void php_output_startup() { ob_buffer = NULL; - zend_body_write = zend_ub_body_write; - zend_header_write = sapi_module.ub_write; + php_body_write = php_ub_body_write; + php_header_write = sapi_module.ub_write; } /* Start output buffering */ -void zend_start_ob_buffering() +void php_start_ob_buffering() { - zend_ob_init(4096, 1024); - zend_body_write = zend_b_body_write; + php_ob_init(4096, 1024); + php_body_write = php_b_body_write; } /* End output buffering */ -void zend_end_ob_buffering(int send_buffer) +void php_end_ob_buffering(int send_buffer) { SLS_FETCH(); @@ -72,14 +72,14 @@ void zend_end_ob_buffering(int send_buffer) return; } if (SG(headers_sent) && !SG(request_info).headers_only) { - zend_body_write = zend_ub_body_write_no_header; + php_body_write = php_ub_body_write_no_header; } else { - zend_body_write = zend_ub_body_write; + php_body_write = php_ub_body_write; } if (send_buffer) { - zend_ob_send(); + php_ob_send(); } - zend_ob_destroy(); + php_ob_destroy(); } @@ -87,7 +87,7 @@ void zend_end_ob_buffering(int send_buffer) * Output buffering - implementation */ -static inline void zend_ob_allocate() +static inline void php_ob_allocate() { if (ob_buffer_size