home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / php / ext / standard / basic_functions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-11-29  |  5.8 KB  |  224 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: Andi Gutmans <andi@zend.com>                                |
  16.    |          Zeev Suraski <zeev@zend.com>                                |
  17.    +----------------------------------------------------------------------+
  18. */
  19.  
  20. /* $Id: basic_functions.h,v 1.69 2000/11/29 15:37:38 sterling Exp $ */
  21.  
  22. #ifndef BASIC_FUNCTIONS_H
  23. #define BASIC_FUNCTIONS_H
  24.  
  25. #include <sys/stat.h>
  26.  
  27. #include "zend_highlight.h"
  28.  
  29. #ifdef TRANS_SID
  30. #  include "url_scanner.h"
  31. #  include "url_scanner_ex.h"
  32. #endif
  33.  
  34. extern zend_module_entry basic_functions_module;
  35. #define basic_functions_module_ptr &basic_functions_module
  36.  
  37. PHP_MINIT_FUNCTION(basic);
  38. PHP_MSHUTDOWN_FUNCTION(basic);
  39. PHP_RINIT_FUNCTION(basic);
  40. PHP_RSHUTDOWN_FUNCTION(basic);
  41. PHP_MINFO_FUNCTION(basic);
  42. PHP_GINIT_FUNCTION(basic);
  43.  
  44. PHP_FUNCTION(constant);
  45. PHP_FUNCTION(intval);
  46. PHP_FUNCTION(doubleval);
  47. PHP_FUNCTION(strval);
  48. PHP_FUNCTION(toggle_short_open_tag);
  49. PHP_FUNCTION(sleep);
  50. PHP_FUNCTION(usleep);
  51. PHP_FUNCTION(flush);
  52. PHP_FUNCTION(gettype);
  53. PHP_FUNCTION(settype);
  54. PHP_FUNCTION(ip2long);
  55. PHP_FUNCTION(long2ip);
  56.  
  57. /* system functions */
  58. PHP_FUNCTION(getenv);
  59. PHP_FUNCTION(putenv);
  60.  
  61. PHP_FUNCTION(get_current_user);
  62. PHP_FUNCTION(set_time_limit);
  63.  
  64. PHP_FUNCTION(get_cfg_var);
  65. PHP_FUNCTION(set_magic_quotes_runtime);
  66. PHP_FUNCTION(get_magic_quotes_runtime);
  67. PHP_FUNCTION(get_magic_quotes_gpc);
  68.  
  69. void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type);
  70. PHP_FUNCTION(is_null);
  71. PHP_FUNCTION(is_resource);
  72. PHP_FUNCTION(is_bool);
  73. PHP_FUNCTION(is_long);
  74. PHP_FUNCTION(is_double);
  75. PHP_FUNCTION(is_numeric);
  76. PHP_FUNCTION(is_string);
  77. PHP_FUNCTION(is_array);
  78. PHP_FUNCTION(is_object);
  79.  
  80. PHP_FUNCTION(error_log);
  81.  
  82. PHP_FUNCTION(call_user_func);
  83. PHP_FUNCTION(call_user_func_array);
  84. PHP_FUNCTION(call_user_method);
  85.  
  86. PHP_FUNCTION(register_shutdown_function);
  87. PHP_FUNCTION(highlight_file);
  88. PHP_FUNCTION(highlight_string);
  89. ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini);
  90.  
  91. PHP_FUNCTION(ini_get);
  92. PHP_FUNCTION(ini_set);
  93. PHP_FUNCTION(ini_restore);
  94.  
  95. PHP_FUNCTION(print_r);
  96.  
  97. PHP_FUNCTION(connection_aborted);
  98. PHP_FUNCTION(connection_timeout);
  99. PHP_FUNCTION(connection_status);
  100. PHP_FUNCTION(ignore_user_abort);
  101.  
  102. PHP_FUNCTION(getservbyname);
  103. PHP_FUNCTION(getservbyport);
  104. PHP_FUNCTION(getprotobyname);
  105. PHP_FUNCTION(getprotobynumber);
  106.  
  107. PHP_NAMED_FUNCTION(php_if_crc32);
  108.  
  109. PHP_FUNCTION(get_loaded_extensions);
  110. PHP_FUNCTION(extension_loaded);
  111. PHP_FUNCTION(get_extension_funcs);
  112.  
  113. PHP_FUNCTION(register_tick_function);
  114. PHP_FUNCTION(unregister_tick_function);
  115.  
  116. PHP_FUNCTION(is_uploaded_file);
  117. PHP_FUNCTION(move_uploaded_file);
  118.  
  119. /* From the INI parser */
  120. PHP_FUNCTION(parse_ini_file);
  121.  
  122. #ifdef PHP_WIN32
  123. typedef unsigned int php_stat_len;
  124. #else
  125. typedef int php_stat_len;
  126. #endif
  127.  
  128. PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers);
  129.  
  130. #if SIZEOF_INT == 4
  131. /* Most 32-bit and 64-bit systems have 32-bit ints */
  132. typedef unsigned int php_uint32;
  133. #elif SIZEOF_LONG == 4
  134. /* 16-bit systems? */
  135. typedef unsigned long php_uint32;
  136. #else
  137. #error Need type which holds 32 bits
  138. #endif
  139.  
  140. #define MT_N (624)
  141.  
  142. typedef struct {
  143.     HashTable *user_shutdown_function_names;
  144.     HashTable putenv_ht;
  145.     char *strtok_string;
  146.     char *locale_string;
  147.     char *strtok_pos1;
  148.     char *strtok_pos2;
  149.     char str_ebuf[40];
  150.     zval **array_walk_func_name;
  151.     zval **user_compare_func_name;
  152.     zend_llist *user_tick_functions;
  153.  
  154.     zval *active_ini_file_section;
  155.     
  156.     HashTable sm_protected_env_vars;
  157.     char *sm_allowed_env_vars;
  158.  
  159.     /* pageinfo.c */
  160.     long page_uid;
  161.     long page_inode;
  162.     long page_mtime;
  163.  
  164.     /* filestat.c */
  165.     char *CurrentStatFile;
  166.     php_stat_len CurrentStatLength;
  167.     struct stat sb;
  168.     struct stat lsb;
  169.  
  170.     /* rand.c */
  171.     php_uint32   state[MT_N+1];  /* state vector + 1 extra to not violate ANSI C */
  172.     php_uint32   *next;       /* next random value is computed from here */
  173.     int      left;        /* can *next++ this many times before reloading */
  174.  
  175.     /* syslog.c */
  176.     int syslog_started;
  177.     char *syslog_device;
  178.  
  179.     /* var.c */
  180.     zend_class_entry *incomplete_class;
  181.     zend_bool use_trans_sid;
  182.  
  183. #ifdef TRANS_SID
  184.     /* url_scanner.c */
  185.     url_adapt_state_t url_adapt_state; 
  186.     /* url_scanner_ex.re */
  187.     url_adapt_state_ex_t url_adapt_state_ex; 
  188. #endif
  189. } php_basic_globals;
  190.  
  191. #ifdef ZTS
  192. #define BLS_D php_basic_globals *basic_globals
  193. #define BLS_DC , BLS_D
  194. #define BLS_C basic_globals
  195. #define BLS_CC , BLS_C
  196. #define BG(v) (basic_globals->v)
  197. #define BLS_FETCH() php_basic_globals *basic_globals = ts_resource(basic_globals_id)
  198. extern int basic_globals_id;
  199. #else
  200. #define BLS_D
  201. #define BLS_DC
  202. #define BLS_C
  203. #define BLS_CC
  204. #define BG(v) (basic_globals.v)
  205. #define BLS_FETCH()
  206. extern php_basic_globals basic_globals;
  207. #endif
  208.  
  209. #if HAVE_PUTENV
  210. typedef struct {
  211.     char *putenv_string;
  212.     char *previous_value;
  213.     char *key;
  214.     int key_len;
  215. } putenv_entry;
  216. #endif
  217.  
  218. /* Values are comma-delimited
  219.  */
  220. #define SAFE_MODE_PROTECTED_ENV_VARS    "LD_LIBRARY_PATH"
  221. #define SAFE_MODE_ALLOWED_ENV_VARS        "PHP_"
  222.  
  223. #endif /* BASIC_FUNCTIONS_H */
  224.