Lines Matching refs:OG

64 	OG(php_body_write) = php_default_output_func;  in php_output_init_globals()
65 OG(php_header_write) = php_default_output_func; in php_output_init_globals()
66 OG(implicit_flush) = 0; in php_output_init_globals()
67 OG(output_start_filename) = NULL; in php_output_init_globals()
68 OG(output_start_lineno) = 0; in php_output_init_globals()
88 OG(php_body_write) = php_ub_body_write; in php_output_activate()
89 OG(php_header_write) = sapi_module.ub_write; in php_output_activate()
90 OG(ob_nesting_level) = 0; in php_output_activate()
91 OG(ob_lock) = 0; in php_output_activate()
92 OG(disable_output) = 0; in php_output_activate()
93 OG(output_start_filename) = NULL; in php_output_activate()
94 OG(output_start_lineno) = 0; in php_output_activate()
111 OG(disable_output) = !status; in php_output_set_status()
119 return OG(php_body_write)(str, str_length TSRMLS_CC); in php_body_write()
127 if (OG(disable_output)) { in php_header_write()
130 return OG(php_header_write)(str, str_length TSRMLS_CC); in php_header_write()
141 if (OG(ob_lock)) { in php_start_ob_buffer()
143 OG(php_body_write) = php_ub_body_write_no_header; in php_start_ob_buffer()
145 OG(php_body_write) = php_ub_body_write; in php_start_ob_buffer()
147 OG(ob_nesting_level) = 0; in php_start_ob_buffer()
196 if (OG(ob_nesting_level)==0) { in php_end_ob_buffer()
200 if (!OG(active_ob_buffer).status & PHP_OUTPUT_HANDLER_START) { in php_end_ob_buffer()
214 …fprintf(fp, "NestLevel: %d ObStatus: %d HandlerName: %s\n", OG(ob_nesting_level), status, OG(act… in php_end_ob_buffer()
219 if (OG(active_ob_buffer).internal_output_handler) { in php_end_ob_buffer()
220 final_buffer = OG(active_ob_buffer).internal_output_handler_buffer; in php_end_ob_buffer()
221 final_buffer_length = OG(active_ob_buffer).internal_output_handler_buffer_size; in php_end_ob_buffer()
222OG(active_ob_buffer).internal_output_handler(OG(active_ob_buffer).buffer, OG(active_ob_buffer).tex… in php_end_ob_buffer()
223 } else if (OG(active_ob_buffer).output_handler) { in php_end_ob_buffer()
228 if(OG(ob_lock)) { in php_end_ob_buffer()
230 OG(php_body_write) = php_ub_body_write_no_header; in php_end_ob_buffer()
232 OG(php_body_write) = php_ub_body_write; in php_end_ob_buffer()
234 OG(ob_nesting_level) = 0; in php_end_ob_buffer()
240 ZVAL_STRINGL(orig_buffer, OG(active_ob_buffer).buffer, OG(active_ob_buffer).text_length, 1); in php_end_ob_buffer()
247 OG(ob_lock) = 1; in php_end_ob_buffer()
249 …if (call_user_function_ex(CG(function_table), NULL, OG(active_ob_buffer).output_handler, &alternat… in php_end_ob_buffer()
256 OG(ob_lock) = 0; in php_end_ob_buffer()
258 zval_ptr_dtor(&OG(active_ob_buffer).output_handler); in php_end_ob_buffer()
265 final_buffer = OG(active_ob_buffer).buffer; in php_end_ob_buffer()
266 final_buffer_length = OG(active_ob_buffer).text_length; in php_end_ob_buffer()
269 if (OG(ob_nesting_level)==1) { /* end buffering */ in php_end_ob_buffer()
271 OG(php_body_write) = php_ub_body_write_no_header; in php_end_ob_buffer()
273 OG(php_body_write) = php_ub_body_write; in php_end_ob_buffer()
277 to_be_destroyed_buffer = OG(active_ob_buffer).buffer; in php_end_ob_buffer()
278 to_be_destroyed_handler_name = OG(active_ob_buffer).handler_name; in php_end_ob_buffer()
279 if (OG(active_ob_buffer).internal_output_handler in php_end_ob_buffer()
280 && (final_buffer != OG(active_ob_buffer).internal_output_handler_buffer) in php_end_ob_buffer()
281 && (final_buffer != OG(active_ob_buffer).buffer)) { in php_end_ob_buffer()
286 if (OG(active_ob_buffer).internal_output_handler) { in php_end_ob_buffer()
287 to_be_destroyed_handled_output[1] = OG(active_ob_buffer).internal_output_handler_buffer; in php_end_ob_buffer()
290 if (OG(ob_nesting_level)>1) { /* restore previous buffer */ in php_end_ob_buffer()
291 zend_stack_top(&OG(ob_buffers), (void **) &prev_ob_buffer_p); in php_end_ob_buffer()
292 orig_ob_buffer = OG(active_ob_buffer); in php_end_ob_buffer()
293 OG(active_ob_buffer) = *prev_ob_buffer_p; in php_end_ob_buffer()
294 zend_stack_del_top(&OG(ob_buffers)); in php_end_ob_buffer()
295 if (!just_flush && OG(ob_nesting_level)==2) { /* destroy the stack */ in php_end_ob_buffer()
296 zend_stack_destroy(&OG(ob_buffers)); in php_end_ob_buffer()
299 OG(ob_nesting_level)--; in php_end_ob_buffer()
305 OG(php_body_write)(final_buffer, final_buffer_length TSRMLS_CC); in php_end_ob_buffer()
310 zend_stack_push(&OG(ob_buffers), &OG(active_ob_buffer), sizeof(php_ob_buffer)); in php_end_ob_buffer()
311 OG(active_ob_buffer) = orig_ob_buffer; in php_end_ob_buffer()
313 OG(ob_nesting_level)++; in php_end_ob_buffer()
326 OG(active_ob_buffer).text_length = 0; in php_end_ob_buffer()
327 OG(active_ob_buffer).status |= PHP_OUTPUT_HANDLER_START; in php_end_ob_buffer()
328 OG(php_body_write) = php_b_body_write; in php_end_ob_buffer()
343 while (OG(ob_nesting_level)!=0) { in php_end_ob_buffers()
353 OG(implicit_flush) = 1; in php_start_implicit_flush()
361 OG(implicit_flush) = 0; in php_end_implicit_flush()
369 return OG(output_start_filename); in php_get_output_start_filename()
377 return OG(output_start_lineno); in php_get_output_start_lineno()
385 …if (OG(ob_nesting_level) == 0 || OG(active_ob_buffer).internal_output_handler || strcmp(OG(active_… in php_ob_set_internal_handler()
389 OG(active_ob_buffer).internal_output_handler = internal_output_handler; in php_ob_set_internal_handler()
390 OG(active_ob_buffer).internal_output_handler_buffer = (char *) emalloc(buffer_size); in php_ob_set_internal_handler()
391 OG(active_ob_buffer).internal_output_handler_buffer_size = buffer_size; in php_ob_set_internal_handler()
392 if (OG(active_ob_buffer).handler_name) { in php_ob_set_internal_handler()
393 efree(OG(active_ob_buffer).handler_name); in php_ob_set_internal_handler()
395 OG(active_ob_buffer).handler_name = estrdup(handler_name); in php_ob_set_internal_handler()
396 OG(active_ob_buffer).erase = erase; in php_ob_set_internal_handler()
408 uint new_len = OG(active_ob_buffer).text_length + text_length; in php_ob_allocate()
410 if (OG(active_ob_buffer).size < new_len) { in php_ob_allocate()
411 uint buf_size = OG(active_ob_buffer).size; in php_ob_allocate()
413 buf_size += OG(active_ob_buffer).block_size; in php_ob_allocate()
416 OG(active_ob_buffer).buffer = (char *) erealloc(OG(active_ob_buffer).buffer, buf_size+1); in php_ob_allocate()
417 OG(active_ob_buffer).size = buf_size; in php_ob_allocate()
419 OG(active_ob_buffer).text_length = new_len; in php_ob_allocate()
458 if (OG(ob_nesting_level)>0) { in php_ob_init_named()
464 if (OG(ob_nesting_level)==1) { /* initialize stack */ in php_ob_init_named()
465 zend_stack_init(&OG(ob_buffers)); in php_ob_init_named()
467 zend_stack_push(&OG(ob_buffers), &OG(active_ob_buffer), sizeof(php_ob_buffer)); in php_ob_init_named()
469 OG(ob_nesting_level)++; in php_ob_init_named()
470 OG(active_ob_buffer) = tmp_buf; in php_ob_init_named()
471 OG(php_body_write) = php_b_body_write; in php_ob_init_named()
593 if (OG(ob_nesting_level)) { in php_ob_handler_used()
594 if (!strcmp(OG(active_ob_buffer).handler_name, handler_name)) { in php_ob_handler_used()
597 if (OG(ob_nesting_level)>1) { in php_ob_handler_used()
598 …zend_stack_apply_with_argument(&OG(ob_buffers), ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *element,… in php_ob_handler_used()
612 original_ob_text_length=OG(active_ob_buffer).text_length; in php_ob_append()
615 target = OG(active_ob_buffer).buffer+original_ob_text_length; in php_ob_append()
620 if (OG(active_ob_buffer).chunk_size in php_ob_append()
621 && OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size) { in php_ob_append()
638 p = OG(ob_buffer)+OG(ob_text_length);
639 start = OG(ob_buffer);
644 memcpy(OG(ob_buffer), text, text_length);
645 OG(ob_buffer)[OG(active_ob_buffer).text_length]=0;
653 if (OG(ob_nesting_level)==0) { in php_ob_get_buffer()
656 ZVAL_STRINGL(p, OG(active_ob_buffer).buffer, OG(active_ob_buffer).text_length, 1); in php_ob_get_buffer()
665 if (OG(ob_nesting_level) == 0) { in php_ob_get_length()
668 ZVAL_LONG(p, OG(active_ob_buffer).text_length); in php_ob_get_length()
690 if (OG(disable_output)) { in php_ub_body_write_no_header()
694 result = OG(php_header_write)(str, str_length TSRMLS_CC); in php_ub_body_write_no_header()
696 if (OG(implicit_flush)) { in php_ub_body_write_no_header()
719 OG(output_start_filename) = zend_get_compiled_filename(TSRMLS_C); in php_ub_body_write()
720 OG(output_start_lineno) = zend_get_compiled_lineno(TSRMLS_C); in php_ub_body_write()
722 OG(output_start_filename) = zend_get_executed_filename(TSRMLS_C); in php_ub_body_write()
723 OG(output_start_lineno) = zend_get_executed_lineno(TSRMLS_C); in php_ub_body_write()
726 OG(php_body_write) = php_ub_body_write_no_header; in php_ub_body_write()
798 if (!OG(ob_nesting_level)) { in PHP_FUNCTION()
803 if (!OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) { in PHP_FUNCTION()
804 …php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer %s", OG(active_ob_b… in PHP_FUNCTION()
821 if (!OG(ob_nesting_level)) { in PHP_FUNCTION()
826 if (!OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) { in PHP_FUNCTION()
827 …php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_… in PHP_FUNCTION()
844 if (!OG(ob_nesting_level)) { in PHP_FUNCTION()
849 if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) { in PHP_FUNCTION()
850 …php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_… in PHP_FUNCTION()
867 if (!OG(ob_nesting_level)) { in PHP_FUNCTION()
872 if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) { in PHP_FUNCTION()
873 …php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_… in PHP_FUNCTION()
894 if (!OG(ob_nesting_level)) { in PHP_FUNCTION()
900 if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) { in PHP_FUNCTION()
901 …php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_… in PHP_FUNCTION()
922 if (!OG(ob_nesting_level)) { in PHP_FUNCTION()
927 if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) { in PHP_FUNCTION()
928 …php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_… in PHP_FUNCTION()
959 RETURN_LONG(OG(ob_nesting_level)); in PHP_FUNCTION()
987 if (OG(ob_nesting_level)) { in PHP_FUNCTION()
988 if (OG(ob_nesting_level) > 1) { in PHP_FUNCTION()
989 …zend_stack_apply_with_argument(&OG(ob_buffers), ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *element,… in PHP_FUNCTION()
991 php_ob_list_each(&OG(active_ob_buffer), return_value); in PHP_FUNCTION()
1009 if (OG(ob_nesting_level) > 1) { in PHP_FUNCTION()
1010 …zend_stack_apply_with_argument(&OG(ob_buffers), ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *elem, vo… in PHP_FUNCTION()
1012 …if (OG(ob_nesting_level) > 0 && php_ob_buffer_status(&OG(active_ob_buffer), return_value) == FAILU… in PHP_FUNCTION()
1015 } else if (OG(ob_nesting_level) > 0) { in PHP_FUNCTION()
1016 add_assoc_long(return_value, "level", OG(ob_nesting_level)); in PHP_FUNCTION()
1017 if (OG(active_ob_buffer).internal_output_handler) { in PHP_FUNCTION()
1022 add_assoc_long(return_value, "status", OG(active_ob_buffer).status); in PHP_FUNCTION()
1023 add_assoc_string(return_value, "name", OG(active_ob_buffer).handler_name, 1); in PHP_FUNCTION()
1024 add_assoc_bool(return_value, "del", OG(active_ob_buffer).erase); in PHP_FUNCTION()