home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Magazine / HomeAutomation / Apache / include / php / ext / standard / php_output.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  2.6 KB  |  73 lines

  1. /*
  2.    +----------------------------------------------------------------------+
  3.    | PHP version 4.0                                                      |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group                   |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 2.02 of the PHP license,      |
  8.    | that is bundled with this package in the file LICENSE, and is        |
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.php.net/license/2_02.txt.                                 |
  11.    | If you did not receive a copy of the PHP license and are unable to   |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@php.net so we can mail you a copy immediately.               |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: Zeev Suraski <zeev@zend.com>                                |
  16.    +----------------------------------------------------------------------+
  17. */
  18.  
  19.  
  20. #ifndef _OUTPUT_BUFFER
  21. #define _OUTPUT_BUFFER
  22.  
  23. #include "php.h"
  24.  
  25. PHPAPI void php_output_startup(void);
  26. PHPAPI int  php_body_write(const char *str, uint str_length);
  27. PHPAPI int  php_header_write(const char *str, uint str_length);
  28. PHPAPI void php_start_ob_buffering(void);
  29. PHPAPI void php_end_ob_buffering(int send_buffer);
  30. PHPAPI int php_ob_get_buffer(pval *p);
  31. PHPAPI void php_start_implicit_flush(void);
  32. PHPAPI void php_end_implicit_flush(void);
  33. PHPAPI char *php_get_output_start_filename(void);
  34. PHPAPI int php_get_output_start_lineno(void);
  35.  
  36. PHP_FUNCTION(ob_start);
  37. PHP_FUNCTION(ob_end_flush);
  38. PHP_FUNCTION(ob_end_clean);
  39. PHP_FUNCTION(ob_get_contents);
  40. PHP_FUNCTION(ob_implicit_flush);
  41.  
  42. PHP_GINIT_FUNCTION(output);
  43.  
  44. typedef struct {
  45.     int (*php_body_write)(const char *str, uint str_length);        /* string output */
  46.     int (*php_header_write)(const char *str, uint str_length);    /* unbuffer string output */
  47.     char *ob_buffer;
  48.     uint ob_size;
  49.     uint ob_block_size;
  50.     uint ob_text_length;
  51.     unsigned char implicit_flush;
  52.     char *output_start_filename;
  53.     int output_start_lineno;
  54. } php_output_globals;
  55.  
  56.  
  57. #ifdef ZTS
  58. #define OLS_D php_output_globals *output_globals
  59. #define OLS_C output_globals
  60. #define OG(v) (output_globals->v)
  61. #define OLS_FETCH() php_output_globals *output_globals = ts_resource(output_globals_id)
  62. ZEND_API extern int output_globals_id;
  63. #else
  64. #define OLS_D void
  65. #define OLS_C
  66. #define OG(v) (output_globals.v)
  67. #define OLS_FETCH()
  68. ZEND_API extern php_output_globals output_globals;
  69. #endif
  70.  
  71.  
  72. #endif /* _OUTPUT_BUFFER */
  73.